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.
网友评论