Hello!
I feel really dumb, but I can’t get to show an Editor Window… Here’s my code (mostly taken from the documentation):
using UnityEngine;
using UnityEditor;
public class Validation : EditorWindow
{
private string _text;
[MenuItem ("Validation/Validate Scene Materials...")]
static void Init()
{
Validation window = (Validation) EditorWindow.GetWindow(typeof (Validation));
window.Show ();
}
void OnGUI ()
{
string test = "";
foreach (Transform t in Selection.transforms)
{
test += t.name;
}
EditorGUI.TextField(new Rect(50, 50, 100, 30), "allo", test);
}
}
I get the following error:
Any clues on what I’m doing wrong… O_o’
Thanks!