private static void CreateSingletonReference() { if (Instance == null) { GameObject batchUpdateObject = new GameObject("BatchUpdate"); BatchedUpdate batchedUpdate = batchUpdateObject.AddComponent <BatchedUpdate>(); Instance = batchedUpdate; DontDestroyOnLoad(batchUpdateObject); } }
public override void OnEnable() { base.OnEnable(); _reference = (BatchedUpdate)target; if (_reference == null) { return; } showTracker = serializedObject.FindProperty("showTracker"); }