ShanxiKnowledgeBase/SXElectricalInspection/Assets/Script/UGUI/ToolsButton_click_count.cs

105 lines
2.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using System;
public class ToolsButton_click_count : MonoBehaviour
{
public string[] ;
public string[] ;
public string ;
// public string[] 뇰랙렘랬;
/// <summary>
/// 객큐속潼鹿빈왠齡膠竟역폘밑균돨렘랬
/// </summary>
//[SerializeField]
// private UnityEvent events;
// Start is called before the first frame update
void Start()
{
GetComponent<Button>().onClick.AddListener(onclick);
}
// Update is called once per frame
void Update()
{
}
public void Fangfa() {
}
public void onclick() {
GameObject.Find("묏야芎충겼").SetActive(false);
var load = Resources.Load("Prefab/Tools/"+ );
GameObject = Instantiate(load) as GameObject;
.transform.SetParent(GameObject.Find("Tools").transform);
.transform.localScale = new Vector3(1, 1, 1);
.transform.localPosition = .GetComponent<Tool_objects_base>().inHandPos;
.transform.localEulerAngles = .GetComponent<Tool_objects_base>().inHandRot;
var load2 = Resources.Load("Prefab/Tools/묏야澗폅객큐");
GameObject = Instantiate(load2) as GameObject;
.transform.SetParent(GameObject.Find("묏야澗쀼객큐북섞").transform);
.GetComponent<ToolsReceive_UICount>().toolgo = ;
//events?.Invoke();
GameObject[] gameObjects = Resources.FindObjectsOfTypeAll<GameObject>();
for (int i = 0; i < .Length; i++)
{
for (int g = 0; g < gameObjects.Length; g++)
{
if (gameObjects[g].name == [i])
{
gameObjects[g].SetActive(false);
}
}
}
for (int i = 0; i < .Length; i++)
{
for (int g = 0; g < gameObjects.Length; g++)
{
if (gameObjects[g].name == [i])
{
gameObjects[g].SetActive(true);
}
}
}
}
}