Removed TOTU 103
This commit is contained in:
		
							
								
								
									
										26
									
								
								Assets/UI button pack 2/Scene/CreateObj.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								Assets/UI button pack 2/Scene/CreateObj.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| 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 () { | ||||
| 		 | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Ignacio Gómez Puga
					Ignacio Gómez Puga