I’m trying to create an Editor Window, but I’m getting this error:
Unable to find required resource at ‘Editor Default Resources/Builtin Skins/Lucida Grande Small.ttf’
I am probably going to want to put what I’m doing on the wiki eventually, so I would like to know of a fix that will work easily for everybody with Unity iPhone.
further testing reveals…
The window is white at first, but its buttons/text show up fine after I click this button, which is invisible until clicked. It’s possible I’m not implementing the Editor Window well. I haven’t worked with it in Unity iPhone before.
using UnityEngine;
using UnityEditor;
class FBX_SyncWindow : EditorWindow {
static EditorWindow fbxSyncWindow = new FBX_SyncWindow();
class FBX_Sync : AssetPostprocessor {
void OnPostprocessModel (Object fbxFile)
{
if(!EditorUtility.FindAsset("Assets/Prefabs/" + fbxFile.name, typeof(GameObject) ) )
fbxSyncWindow.Show();
}
}
void OnGUI ()
{
if (GUI.Button (new Rect (10,10,150,100), "I am a button")) {
Debug.Log ("You clicked the button!");
}
}
}
No. I kept coming across Editor window issues and gave up, assuming that none of it was actually worth having been put into the Unity iPhone release. (I didn’t bother to test much with 2.5, considering I knew I wouldn’t be using it anyway.)
I’m not too sure about the static EditorWindow variable in there. I could imagine that being initialised before the font or other resources. Try instantiating the window in OnPostProcessModel (ie, check if the static variable is null and instantiate only if it is).
I wish there were. So far it would unfortunately appear we’ll have to live with this until Unity iPhone is merged with Unity desktop (won’t be long now) since Unity 2.x doesn’t have this bug.