67 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System.Collections;
 | ||
| using System.Collections.Generic;
 | ||
| using UnityEngine;
 | ||
| 
 | ||
| public class LoadTools : MonoBehaviour
 | ||
| {
 | ||
|     public Transform content;
 | ||
|     // Start is called before the first frame update
 | ||
|     void Start()
 | ||
|     {
 | ||
|         HoldToolsCheck holdToolsCheck = GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>();
 | ||
|         for (int i = 0; i < holdToolsCheck.넣唐묏야.Count; i++)
 | ||
|         {
 | ||
|             if (Resources.Load("Prefab/묏야UI渡齡객큐/" + holdToolsCheck.넣唐묏야[i])!=null)
 | ||
|             {
 | ||
| 
 | ||
|                 var load = Resources.Load("Prefab/묏야UI渡齡객큐/" + holdToolsCheck.넣唐묏야[i]);
 | ||
| 
 | ||
|                 GameObject 묏야객큐 = Instantiate(load) as GameObject;
 | ||
|                 묏야객큐.transform.SetParent(content.transform);
 | ||
|                 묏야객큐.transform.localScale = new Vector3(1, 1, 1);
 | ||
|                 묏야객큐.transform.localPosition = new Vector3(0, 0, 0);
 | ||
|                 묏야객큐.transform.localEulerAngles = new Vector3(0, 0, 0);
 | ||
|                 // 묏야객큐.GetComponent<Tools_object_UI>().sprite_name = toolsname;
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|             }
 | ||
|             else
 | ||
|             {
 | ||
| 
 | ||
|                 var load = Resources.Load("Prefab/묏야객큐");
 | ||
|                 GameObject 묏야객큐 = Instantiate(load) as GameObject;
 | ||
|                 묏야객큐.transform.SetParent(content.transform);
 | ||
|               
 | ||
|                 묏야객큐.transform.localScale = new Vector3(1, 1, 1);
 | ||
|                 묏야객큐.transform.localPosition = new Vector3(0, 0, 0);
 | ||
|                 묏야객큐.transform.localEulerAngles = new Vector3(0, 0, 0);
 | ||
|                 // 묏야객큐.GetComponent<Tools_object_UI>().sprite_name = toolsname;
 | ||
|                
 | ||
|                 // Debug.Log(묏야객큐.GetComponent<Tools_object_UI>().sprite_name);
 | ||
|                 묏야객큐.GetComponent<Tools_object_UI>().UI_name = holdToolsCheck.넣唐묏야[i];
 | ||
|                 묏야객큐.GetComponent<Tools_object_UI>().<EFBFBD>뇜.gameObject.SetActive(false);
 | ||
|                 묏야객큐.GetComponent<Tools_object_UI>().change();
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|             }
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
|         }
 | ||
|     }
 | ||
| 
 | ||
|     // Update is called once per frame
 | ||
|     void Update()
 | ||
|     {
 | ||
|         
 | ||
|     }
 | ||
| }
 |