美文网首页
"Editor Default Resources&q

"Editor Default Resources&q

作者: UnityAsk | 来源:发表于2017-08-14 11:23 被阅读90次

To access assets inside the "Editor Default Resources", you need to use EditorGUIUtility.Load.
Take note that unlike Resources.Load, EditorGUIUtility.Load requires you to specify the filename extension of the asset you're trying to load. So it has to be "myPlugin/mySkin.guiskin" instead of "myPlugin/mySkin".
To free memory used by EditorGUIUtility.Load, call Object.Destroy on the object, then call EditorUtility.UnloadUnusedAssets.
Afaik, only one "Editor Default Resources" folder can be present, and it has to be directly under the top Assets folder.

相关文章

网友评论

      本文标题:"Editor Default Resources&q

      本文链接:https://www.haomeiwen.com/subject/udxurxtx.html