- Home /
How to build using standard button sprite loaded via code?
Hello there,
I am developing a game entirely via code (there is a precise purpose for that) and when I create buttons for the UI I use:
image.sprite = UnityEditor.AssetDatabase.GetBuiltinExtraResource(kStandardSpritePath);
BUT I then understand that I can't obv use UnityEditor.* when I go to build (I'm quite new at Unity dev).
So my question is: how can I use the standard sprites (or other standard resources) directly in my script/s? Thank you.
Your answer
Follow this Question
Related Questions
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
UNITY build Error windows !!! 2 Answers
How can I stop the variable values reverting to its default values after being built? 1 Answer
Errors related to standard assets while build, but not during play mode. 0 Answers