Skip to content

Commit dad140e

Browse files
author
FirstGearGames
committed
4.7.3R
- Fixed ZigZagDecode improperly decoding values in IL2CPP with specific backing CPP libraries. - Fixed Scene object expecting prefab ID (#1032). - Fixed eliminated or significantly reduced wobble in local reconcile resimulations on server-authoritative objects. - Fixed NetworkAnimator delay/desync on host owned object, observed by clients (#1062). - Fixed NetworkCollider/2D tick comparison error (#1041). - Fixed prefab objects generator cannot include folders with spaces in the path (#1045). - Fixed large writers pooling incorrectly, causing them to not be re-used (#1054). - Fixed LiteNetLib wrong data length after BasePacketLayer modification (#1064). - Fixed NetworkTrigger2D by uncommenting entire file. - Fixed nested NetworkObjects not spawning recursively when spawned via OnStartServer of their parent. - Fixed SyncType values being reset to default before OnStopServer as clientHost (#1036). - Fixed disconnecting clients not being cleared on Transport shutdown (#1044). - Fixed Quaternion ScaleToFloat helper math, cause of marginal rotational errors (#1067). - Fixed loading scenes by path not loading the scene for clients under certain conditions (#1060). - Obsoleted SceneLookupData.Name in favor of SceneLookupData.FullName. - Added NetworkBehaviour.ToString null safety (#1046). - Added Unity 6.5 scene handle change support (#1052 / #1051 merge). - Added Unity 6.5 GetEntityId/GetInstanceId support. - Added NetworkCollider2D use PhysicsScene2D.OverlapCollider as a fallback (#1042). - Added NetworkCollider/2D.RemoveEnteredCollider. - Added NetworkCollider/2D InvokeStayOnEnter. - Added NetworkAnimator channel option - under Beta menu, Animator Channel (#1039).
1 parent 73f30cf commit dad140e

63 files changed

Lines changed: 2457 additions & 729 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Assets/FishNet/CodeGenerating/Helpers/NetworkBehaviourHelper.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ internal void CreateReplicateDelegate(MethodDefinition originalMethodDef, Method
213213
/// <param name = "rpcType"></param>
214214
internal void CreateRpcDelegate(bool runLocally, TypeDefinition typeDef, MethodDefinition readerMethodDef, RpcType rpcType, uint methodHash, CustomAttribute rpcAttribute)
215215
{
216-
217216
MethodDefinition methodDef = typeDef.GetMethod(NetworkBehaviourProcessor.NETWORKINITIALIZE_EARLY_INTERNAL_NAME);
218217
ILProcessor processor = methodDef.Body.GetILProcessor();
219218

‎Assets/FishNet/CodeGenerating/ILCore/FishNetILPP.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
6262
if (!session.Initialize(assemblyDef.MainModule))
6363
return null;
6464

65-
6665
bool modified = false;
6766

6867
bool fnAssembly = IsFishNetAssembly(compiledAssembly);
@@ -334,7 +333,6 @@ private bool CreateQOLAttributes(CodegenSession session)
334333
modified |= session.GetClass<QolAttributeProcessor>().Process(td, codeStripping);
335334
}
336335

337-
338336
return modified;
339337
}
340338

‎Assets/FishNet/CodeGenerating/Processing/NetworkBehaviourProcessor.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ internal bool ProcessLocal(TypeDefinition typeDef)
7878
CreateNetworkInitializeMethods(td, out networkInitializeIfDisabledMd);
7979
CallNetworkInitialize(networkInitializeIfDisabledMd);
8080

81-
8281
/* Prediction. */
8382
/* Run prediction first since prediction will modify
8483
* user data passed into prediction methods. Because of this
@@ -195,7 +194,6 @@ internal bool NonNetworkBehaviourHasInvalidAttributes(Collection<TypeDefinition>
195194
return false;
196195
}
197196

198-
199197
/// <summary>
200198
/// Calls the next awake method if the nested awake was created by codegen.
201199
/// </summary>

‎Assets/FishNet/CodeGenerating/Processing/QOLAttributeProcessor.cs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal bool Process(TypeDefinition typeDef, bool moveStrippedCalls)
1818
bool modified = false;
1919
List<MethodDefinition> methods = typeDef.Methods.ToList();
2020

21-
2221
foreach (MethodDefinition md in methods)
2322
{
2423
// Has RPC attribute, doesn't quality for a quality of life attribute.
@@ -153,11 +152,10 @@ private void CreateAttributeMethod(MethodDefinition methodDef, CustomAttribute q
153152

154153
bool StripMethod(MethodDefinition md)
155154
{
156-
157155
// Fall through.
158156
return false;
159157
}
160158
}
161159

162-
}
160+
}
163161
}

‎Assets/FishNet/CodeGenerating/Processing/Rpc/RpcProcessor.cs‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ private MethodDefinition CreateRpcWriterMethod(List<ParameterDefinition> seriali
257257
{
258258
intentionallyNull = false;
259259

260-
261260
string methodName = $"{WRITER_PREFIX}{GetRpcMethodName(cr)}";
262261
/* If method already exist then clear it. This
263262
* can occur when a method needs to be rebuilt due to
@@ -364,7 +363,7 @@ private bool CreateClientRpcWriterMethod(List<ParameterDefinition> serializedPar
364363
/* Creates basic ServerRpc and ClientRpc
365364
* conditions such as if requireOwnership ect..
366365
* or if (!base.isClient) */
367-
CreateClientRpcConditionsForServer(writerMd, cr.Attribute);
366+
CreateClientRpcConditionsForServer(writerMd, cr.Attribute);
368367

369368
VariableDefinition channelVariableDef = CreateAndPopulateChannelVariable(writerMd, channelParameterDef);
370369
/* Create a local PooledWriter variable. */
@@ -421,7 +420,7 @@ private bool CreateServerRpcWriterMethod(List<ParameterDefinition> serializedPar
421420
/* Creates basic ServerRpc
422421
* conditions such as if requireOwnership ect..
423422
* or if (!base.isClient) */
424-
CreateServerRpcConditionsForClient(writerMd, cr.Attribute);
423+
CreateServerRpcConditionsForClient(writerMd, cr.Attribute);
425424

426425
VariableDefinition channelVariableDef = CreateAndPopulateChannelVariable(writerMd, channelParameterDef);
427426
// Create a local PooledWriter variable.
@@ -485,7 +484,6 @@ private MethodDefinition CreateRpcReaderMethod(List<ParameterDefinition> seriali
485484
MethodDefinition logicMd = cr.LogicMethodDef;
486485
CustomAttribute rpcAttribute = cr.Attribute;
487486

488-
489487
string methodName = $"{READER_PREFIX}{GetRpcMethodName(cr)}";
490488
/* If method already exist then just return it. This
491489
* can occur when a method needs to be rebuilt due to
@@ -856,7 +854,6 @@ private MethodDefinition CreateRpcLogicMethod(List<AttributeData> datas, Created
856854
TypeDefinition typeDef = cr.TypeDef;
857855
MethodDefinition originalMd = cr.OriginalMethodDef;
858856

859-
860857
//Methodname for logic methods do not use prefixes because there can be only one.
861858
string methodName = $"{LOGIC_PREFIX}{GetMethodNameAsParameters(originalMd)}";
862859

@@ -969,7 +966,6 @@ private void RedirectOriginalToWriter(List<CreatedRpc> createdRpcs)
969966
* entry. */
970967
MethodDefinition originalMd = createdRpcs[0].OriginalMethodDef;
971968

972-
973969
ILProcessor processor = originalMd.Body.GetILProcessor();
974970
originalMd.Body.Instructions.Clear();
975971

‎Assets/FishNet/Demos/ColliderRollback/Scripts/Player/Fire.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ namespace FishNet.Example.ColliderRollbacks
1313
/// </summary>
1414
public class Fire : NetworkBehaviour
1515
{
16-
}
16+
}
1717
}

Assets/FishNet/Demos/Prediction/Rigidbody/Scripts/Prefabs.meta renamed to Assets/FishNet/Demos/Prediction/Rigidbody/Prefabs.meta

File renamed without changes.

Assets/FishNet/Demos/Prediction/Rigidbody/Scripts/Prefabs/RigidbodyPrediction.prefab renamed to Assets/FishNet/Demos/Prediction/Rigidbody/Prefabs/RigidbodyPrediction.prefab

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Transform:
258258
m_PrefabAsset: {fileID: 0}
259259
m_GameObject: {fileID: 303449598114786579}
260260
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
261-
m_LocalPosition: {x: -4.80351, y: 0.18147132, z: 5.430528}
261+
m_LocalPosition: {x: -4.80351, y: 12, z: 5.430528}
262262
m_LocalScale: {x: 1, y: 0.5, z: 1}
263263
m_ConstrainProportionsScale: 0
264264
m_Children:
@@ -320,7 +320,10 @@ MonoBehaviour:
320320
_initializeOrder: 0
321321
_preventDespawnOnDisconnect: 0
322322
_defaultDespawnType: 0
323-
_initializedTimestamp: -8584297170534745459
323+
_initializedTimestamp: -8584212275557132306
324+
_localLevelOfDetailCalculationType: 0
325+
_useLevelOfDetail: 0
326+
_useRootLevelOfDetail: 1
324327
NetworkObserver: {fileID: 0}
325328
_enablePrediction: 1
326329
_predictionType: 1
@@ -336,12 +339,12 @@ MonoBehaviour:
336339
_spectatorInterpolation: 3
337340
_enableTeleport: 0
338341
_teleportThreshold: 1
339-
<PrefabId>k__BackingField: 3
342+
<PrefabId>k__BackingField: 9
340343
<SpawnableCollectionId>k__BackingField: 0
341-
<AssetPathHash>k__BackingField: 5247723621796122902
344+
<AssetPathHash>k__BackingField: 13573084401941807464
342345
SceneId: 0
343346
SerializedTransformProperties:
344-
Position: {x: -4.80351, y: 0.18147132, z: 5.430528}
347+
Position: {x: -4.80351, y: 4, z: 5.430528}
345348
Rotation: {x: 0, y: 0, z: 0, w: 1}
346349
Scale: {x: 1, y: 0.5, z: 1}
347350
IsValid: 1

Assets/FishNet/Demos/Prediction/Rigidbody/Scripts/Prefabs/RigidbodyPrediction.prefab.meta renamed to Assets/FishNet/Demos/Prediction/Rigidbody/Prefabs/RigidbodyPrediction.prefab.meta

File renamed without changes.

‎Assets/FishNet/Runtime/Editor/CodeStripping.cs‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace FishNet.Configuring
1313
{
1414
public class CodeStripping
15-
{
15+
{
1616
/// <summary>
1717
/// True if making a release build for client.
1818
/// </summary>
@@ -29,7 +29,6 @@ public static bool RemoveServerLogic
2929
{
3030
get
3131
{
32-
3332
/* This is to protect non pro users from enabling this
3433
* without the extra logic code. */
3534
#pragma warning disable CS0162 // Unreachable code detected
@@ -44,7 +43,6 @@ public static bool StripBuild
4443
{
4544
get
4645
{
47-
4846
/* This is to protect non pro users from enabling this
4947
* without the extra logic code. */
5048
#pragma warning disable CS0162 // Unreachable code detected
@@ -66,7 +64,7 @@ public void OnPreprocessBuild(BuildReport report)
6664
CompilationPipeline.compilationStarted += CompilationPipelineOnCompilationStarted;
6765
CompilationPipeline.compilationFinished += CompilationPipelineOnCompilationFinished;
6866

69-
}
67+
}
7068

7169
/* Solution for builds ending with errors and not triggering OnPostprocessBuild.
7270
* Link: https://gamedev.stackexchange.com/questions/181611/custom-build-failure-callback
@@ -91,13 +89,12 @@ private void CompilationPipelineOnCompilationFinished(object compilationContext)
9189

9290
private void BuildingEnded()
9391
{
94-
9592
Generator.IgnorePostProcess = false;
9693
}
9794

9895
public void OnPostprocessBuild(BuildReport report)
9996
{
100-
BuildingEnded();
97+
BuildingEnded();
10198
}
10299
}
103100
}

0 commit comments

Comments
 (0)