fix: NetworkIdentity default execution order set to -1. guarantees Awake() initializing all NetworkBehaviours before their Awake is called. [imer, FakeByte]

This commit is contained in:
vis2k 2021-05-28 19:59:06 +08:00
parent a0e062af94
commit 3efc917b6e

View File

@ -31,6 +31,9 @@ public struct NetworkIdentitySerialization
/// <summary>NetworkIdentity identifies objects across the network.</summary>
[DisallowMultipleComponent]
// NetworkIdentity.Awake initializes all NetworkComponents.
// let's make sure it's always called before their Awake's.
[DefaultExecutionOrder(-1)]
[AddComponentMenu("Network/NetworkIdentity")]
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-identity")]
public sealed class NetworkIdentity : MonoBehaviour