예제 #1
0
 public static void Instantiate()
 {
     if(_Current == null && Debug.isDebugBuild) {
     var obj = new GameObject("FPSCounter", typeof(GUIText), typeof(FPSCounter)).GetComponent<FPSCounter>();
     _Current = obj;
     obj.m_FpsNextPeriod = Time.realtimeSinceStartup + fpsMeasurePeriod;
     obj.m_GuiText = obj.GetComponent<GUIText>();
     obj.m_GuiText.anchor = TextAnchor.UpperCenter;
     obj.transform.position = new Vector3(0.5f, 1f, 0f);
     DontDestroyOnLoad(obj.gameObject);
       }
 }
예제 #2
0
 public static void Instantiate()
 {
     if (_Current == null && Debug.isDebugBuild)
     {
         var obj = new GameObject("FPSCounter", typeof(GUIText), typeof(FPSCounter)).GetComponent <FPSCounter>();
         _Current               = obj;
         obj.m_FpsNextPeriod    = Time.realtimeSinceStartup + fpsMeasurePeriod;
         obj.m_GuiText          = obj.GetComponent <GUIText>();
         obj.m_GuiText.anchor   = TextAnchor.UpperCenter;
         obj.transform.position = new Vector3(0.5f, 1f, 0f);
         DontDestroyOnLoad(obj.gameObject);
     }
 }