public static void CreateZombieDetector() { ZombieObjectDetector m_ZombieDetector = FindObjectOfType <ZombieObjectDetector>(); if (m_ZombieDetector == null) { Debug.Log("Creating A Default Zombie Object Detector"); new GameObject("ZombieObjectDetector", typeof(ZombieObjectDetector)); } else { Debug.LogWarning("Zombie Object Detector Already Exists."); } }
private void OnEnable() { m_SerializedZombieDetector = new SerializedObject(target); m_ZombieDetector = (ZombieObjectDetector)(target); m_LoggingOptions = m_SerializedZombieDetector.FindProperty("m_LoggingOptions"); m_LogTag = m_SerializedZombieDetector.FindProperty("m_LogTag"); m_LogZombieKeyCode = m_SerializedZombieDetector.FindProperty("m_LogZombieKeyCode"); m_IgnoredTypeStrings = m_SerializedZombieDetector.FindProperty("m_IgnoredTypeStrings"); m_TypesToScanStrings = m_SerializedZombieDetector.FindProperty("m_TypesToScanStrings"); }