void Awake(){ //duplicate instance check: if ( _instance != null ) { Destroy( this ); Debug.LogError( "ColliderTouchDispatcher error! You should only have one instance of ColliderTouchDispatcher in your scene!" ); } if ( renderingCamera == null ) { renderingCamera = Camera.main; } _instance = this; }
void Awake() { //duplicate instance check: if (_instance != null) { Destroy(this); Debug.LogError("ColliderTouchDispatcher error! You should only have one instance of ColliderTouchDispatcher in your scene!"); } if (renderingCamera == null) { renderingCamera = Camera.main; } _instance = this; }