Mostrar la unidad de script de imagen
public class Test : MonoBehaviour
{
private Sprite img1;
public GameObject MyImage;
// Start is called before the first frame update
void Start()
{
MyImage.AddComponent(typeof(Image));
img1 = Resources.Load<Sprite>("ARInfo/Magazine1/1");
MyImage.GetComponent<Image>().sprite = img1;
Debug.Log("Test script started");
}
}
Thoughtless Tortoise