OnSceneGUI() public method

public OnSceneGUI ( tk2dCamera target ) : void
target tk2dCamera
return void
Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    void OnSceneGUI()
    {
        if (sceneGUIHandler == null)
        {
            sceneGUIHandler = new tk2dEditor.tk2dCameraSceneGUI();
        }

        sceneGUIHandler.OnSceneGUI(target as tk2dCamera);
    }