- Home /
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.
Comment
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.
Best Answer
Answer by tank_kun · Nov 10, 2015 at 05:35 PM
you can use this: Sprite sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>("UI/Skin/Background.psd");
I tried it at Unity 5.2.2f1