Super confused I thought this was how you were supposed to create new assets?!
I created a repo here:
https://github.com/scrapcupcake/UnityEditorBug
And submitted a bug to Unity:
http://fogbugz.unity3d.com/default.asp?672290_6brq5t26hruhs7n2
- What happened
Super basic call to AssetDatabase.CreateAsset returns the following errors, which are… super generic and provide me no direction to solve the issue.
Couldn’t create asset file!
UnityEditor.AssetDatabase:CreateAsset(Object, String)
TileBoardEditor:OnGUI() (at Assets/Editor/TileBoardEditor.cs:26)
UnityEditor.DockArea:OnGUI()
UnityException: Creating asset at path /Users/scrapcupcake/Documents/Personal Projects/Unity/BugTest/Assets/Board.asset failed.
TileBoardEditor.OnGUI () (at Assets/Editor/TileBoardEditor.cs:26)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
- How can we reproduce it using the example you attached.
Window > Match 3 Board Editor
In created window:
Click “New Board”
Accept default path (or any other path I’ve tested, same result)