void OnDisable() { if (global_instance == this) { global_instance = null; } Camera.onPreCull -= DrawWithCamera; }
void OnEnable() { if (global_instance == null) { global_instance = this; } Camera.onPreCull -= DrawWithCamera; Camera.onPreCull += DrawWithCamera; }