콘텐츠로 건너뛰기

Built-in extra asset

private const string kStandardSpritePath = "UI/Skin/UISprite.psd";
private const string kBackgroundSpriteResourcePath = "UI/Skin/Background.psd";
private const string kInputFieldBackgroundPath = "UI/Skin/InputFieldBackground.psd";
private const string kKnobPath = "UI/Skin/Knob.psd";
private const string kCheckmarkPath = "UI/Skin/Checkmark.psd";
Image image = buttonRoot.AddComponent<Image>();
image.sprite = AssetDatabase.GetBuiltinExtraResource<Sprite>(kStandardSpritePath);

https://forum.unity.com/threads/accessing-ui-build-in-sprites-in-c.305075/

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다