/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> void OnEnable() { ExecuteOrderTest.Log("[ManagerB] OnEnable"); Debug.Log("ManagerB. this=" + GetInstanceID() + " sInstance=" + (ManagerB.sInstance == null ? "null" : "" + ManagerB.sInstance.GetInstanceID())); count = 1; //Debug.Log("Check ManagerA. " + ManagerA.Instance.count); // ken: this cause forever loop }
/// <summary> /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. /// </summary> void FixedUpdate() { mFixedUpdateCount++; if (mFixedUpdateCount >= 1 && mFixedUpdateCount <= 2) { ExecuteOrderTest.Log("[MonoA] " + CountToStr(mFixedUpdateCount) + " FixedUpdate"); } }
// Update is called once per frame void Update() { mUpdateCount++; if (mUpdateCount >= 1 && mUpdateCount <= 2) { ExecuteOrderTest.Log("[MonoB] " + CountToStr(mUpdateCount) + " Update"); } }
public ManagerA() { ExecuteOrderTest.Log("[ManagerA] Construction: " + GetInstanceID()); }
/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> void OnEnable() { ExecuteOrderTest.Log("[ManagerA] OnEnable"); count = ManagerB.Instance.count; Debug.Log("[ManagerA] managerB.count=" + ManagerB.Instance.count); }
public ScriptableObjB() { ExecuteOrderTest.Log("[ScriptableObjB] Construction"); }
/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> void OnEnable() { ExecuteOrderTest.Log("[ScriptableObjB] OnEnable"); }
public void Use() { ExecuteOrderTest.Log("[ScriptableObjB] Use"); }
public void Hello() { ExecuteOrderTest.Log("[MonoA] Hello"); }
// Use this for initialization void Start() { ExecuteOrderTest.Log("[MonoA] Start"); }
/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { ExecuteOrderTest.Log("[MonoA] awake"); }