ImaageQ_Unity_App/Assets/UI button pack 2/Scene/CreateObj.cs
Ignacio Gómez Puga 5847d844a5 Removed TOTU 103
2025-03-04 12:04:52 -06:00

27 lines
564 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CreateObj : MonoBehaviour {
public Image PP;
public Sprite[] temp;
public GameObject parent;
// Use this for initialization
void Start () {
for (int i = 0; i < temp.Length; i++) {
var createImage = Instantiate(PP) as Image;
createImage.transform.SetParent(parent.transform, false);
createImage.sprite = temp [i];
createImage.gameObject.SetActive (true);
}
}
// Update is called once per frame
void Update () {
}
}