Loading built-in resources

Trying to programmatically load the built-in resource “Background” that is used on the image component of UI (4.6) element Scrollbar.

I’ve tried:

Resources.GetBuiltinResource(typeof(Sprite), "Background") as Sprite;
Resources.GetBuiltinResource(typeof(Sprite), "Background.psd") as Sprite;

But both return null. Don’t know how to proceed.

Well you are not telling me anything I don't already know :). I'm not posting a different question because I've explained my problem as well as I can in my original question, I don't know how to phrase it any clearer.

I too would like to know the answer to this.

Anyone got an answer to this ? Thanks.

1 Answer

1

you can use this:
Sprite sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/Background.psd");
I tried it at Unity 5.2.2f1