Ejemplo n.º 1
0
 private void OnDestroy()
 {
     if (_mainLoopScanner == this)
     {
         _mainLoopScanner = null;
     }
 }
Ejemplo n.º 2
0
		private void Awake() {
			// Severals instances of MainLoopScanner are not allowed.
			if(_mainLoopScanner != null) {
				EditorUtility.DisplayDialog("Invalid operation", "Can't add 'MainLoopEditorScanner' to "+gameObject.name+" because a 'MainLoopEditorScanner' is already added to another game object in the scene!", "Ok", "");
				DestroyImmediate(this);
				return;
			}
			_mainLoopScanner = this;
		}