// ---- inherited handlers ---- void Awake() { if (Raycaster.instance != null) { throw new UnityException("Singleton error: instance already set"); } // quick and easy singleton Raycaster.instance = this; if (Raycaster.sorter == null) { Raycaster.sorter = new RaycastDistanceSorter(); } }
// ---- inherited handlers ---- void Awake() { if (Raycaster.instance != null) throw new UnityException("Singleton error: instance already set"); // quick and easy singleton Raycaster.instance = this; if (Raycaster.sorter == null) Raycaster.sorter = new RaycastDistanceSorter(); }