How do I load resources for EditorGUI?

How do I load images (and anything else that might be in the editor folder I need) that I want to use as custom components for a EditorGUI? Like a graphical Button?

So... The answer to my own question is:

myObject = EditorGUIUtility.Load(Path) as SomeType;

Where "Path" is a path contained with "Assets/Editor Default Resources" that includes the file extension.

An example might be


Where the full relative project path of image would be

"Assets/Editor Default Resources/MyEditor/images/icon.png" 

I'm not sure why Unity chooses to include file extensions in this case but not in others and why the default specific folder would have very little association with the Editor folder where one's scripts resides but I'll let someone more "official" provide that explanation. The documentation is somewhat lacking on this subject. I had to finally stumble across the description under the EditorGUIUntility.Load call and I wasn't sure if I was right.

AssetDatabase.LoadAssetAtPath looked like it might be a solution but it wasn't. I'm still not sure what that method does.

Actually – you’ll find that if you include the whole path, EditorGUIUtility.Load AND AssetDatabase.LoadAssetAtPath seem to work almost exactly the same:

previewTexture = (Texture)AssetDatabase.LoadAssetAtPath ("Assets/Scripts/Editor/video-icon.png", typeof(Texture));
previewTexture = (Texture)EditorGUIUtility.Load ("Assets/Scripts/Editor/video-icon.png");

I’m not clear on what the differences are other than one letting you specify the type argument, nor am I clear on which one to use for general-purpose editor scripting, but both of these work.