/// <summary> /// Static constructor is called at most one time, before any /// instance constructor is invoked or member is accessed. /// </summary> static TimeManager() { // Check to see if an input manager stub exists. If so, associate it. // If not, we'll need to create one. The core is what manages our update cycle. Core = Component.FindObjectOfType <TimeManagerCore>(); if (Core == null) { #pragma warning disable 0414 GameObject lCoreGameObject = new GameObject("TimeManagerCore", typeof(TimeManagerCore)); lCoreGameObject.hideFlags = HideFlags.HideInHierarchy; Core = lCoreGameObject.GetComponent <TimeManagerCore>(); #pragma warning restore 0414 } }
/// <summary> /// Static constructor is called at most one time, before any /// instance constructor is invoked or member is accessed. /// </summary> static TimeManager() { // Check to see if an input manager stub exists. If so, associate it. // If not, we'll need to create one. The core is what manages our update cycle. Core = Component.FindObjectOfType<TimeManagerCore>(); if (Core == null) { #pragma warning disable 0414 GameObject lCoreGameObject = new GameObject("TimeManagerCore", typeof(TimeManagerCore)); lCoreGameObject.hideFlags = HideFlags.HideInHierarchy; Core = lCoreGameObject.GetComponent<TimeManagerCore>(); #pragma warning restore 0414 } }