Hi there…
i tried to extend the Scene View of the Unity Editor today. And got stuck in a problem - NOTHING is shown…
this is my script right now:
using UnityEditor;
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class RTM_SysScene : Editor{
void OnSceneGUI(){
Handles.BeginGUI(new Rect(0, 0, Screen.width, Screen.height));
GUILayout.Label("Test");
Handles.EndGUI();
}
}
What i want:
1st: No Script attaching to a GO
2nd: Showing a Label (later Positions…etc) as 2D GUI Element on the Scene view
3rd: Updating the Label as something changes
What it should be later:
Later i want to move a Box of Lines to the mouse position in the Scene View, according to a grid (tile mapper). And create a GO at the click position.
My problem:
How to do Step 1 and 2? My Script shows nothing… and i´m nearly despairing at this. The reference and docs are not really helpful…
How can i show a 2D label (or other GUI Element) on the Scene View - Like the lightmap, Occlusion or navmesh Widget