Last active
January 13, 2019 04:49
-
-
Save TomoG29/6e6105eed7e4c642c9ecd1f51a9d3da0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class Sample : MonoBehaviour { | |
private Sprite image; | |
private Image draw; | |
void Start () { | |
image = Resources.Load<Sprite>("読み込みたい画像のパス"); | |
gameObject.GetComponent<Image>().sprite = image; | |
draw.sprite = image; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment