void OnSceneGUI() { tk2dCamera target = this.target as tk2dCamera; Handles.color = new Color32(255, 255, 255, 255); #if UNITY_5 DrawCameraBounds(target.GetComponent <Camera>().worldToCameraMatrix, target.Editor__GetFinalProjectionMatrix()); Handles.color = new Color32(55, 203, 105, 102); DrawCameraBounds(target.GetComponent <Camera>().worldToCameraMatrix, target.Editor__GetNativeProjectionMatrix()); #else DrawCameraBounds(target.camera.worldToCameraMatrix, target.Editor__GetFinalProjectionMatrix()); Handles.color = new Color32(55, 203, 105, 102); DrawCameraBounds(target.camera.worldToCameraMatrix, target.Editor__GetNativeProjectionMatrix()); #endif Handles.color = Color.white; // Draw scene gui if (sceneGUIHandler == null) { sceneGUIHandler = new tk2dEditor.tk2dCameraSceneGUI(); } sceneGUIHandler.OnSceneGUI(target); }
void OnSceneGUI() { if (sceneGUIHandler == null) { sceneGUIHandler = new tk2dEditor.tk2dCameraSceneGUI(); } sceneGUIHandler.OnSceneGUI(target as tk2dCamera); }