コード例 #1
0
        private void SetState(DebugBehaviour db, bool state)
        {
            db.gameObject.SetActive(state);

            //Log a warning if the DebugBehaviour is not tagged correctly.
            //The intended design is to have a separate object contain all debugging related
            //functions so that we can activate/deactivate it to keep debugging
            //code from affecting performance when it isn't desired.
            if (db.gameObject.tag != DebugTag)
            {
                UnityEngine.Debug.LogWarning(db.gameObject.name + " has a DebugBehaviour component but is not tagged as a debug object.");
            }
        }
コード例 #2
0
 private void OnNewDebugBehaviour(DebugBehaviour db)
 {
     db.gameObject.SetActive(DebuggingActive);
 }