Open rifaterdemsahin opened 6 years ago
unity should be aware of this folder
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class ResourceLoader : MonoBehaviour {
public GameObject myImage;
public GameObject myWord;
// Use this for initialization
void Start () {
var sprite = Resources.Load<Sprite>("2_dog");
myImage.GetComponent<SpriteRenderer>().sprite = sprite;
myWord.GetComponent<TextMesh>().text = sprite.name;
}
// Update is called once per frame
void Update () {
}
}
Image load and gets to a question. Load images from resources Image displays after a delay the text of the image shows up