public GameObject ClickEventReturn() { GameObject NewObj = Instantiate(obj, spwnPoint.transform.position, spwnPoint.transform.rotation); IllValue ultval = NewObj.transform.GetChild(0).GetComponent <IllValue>(); ultval.sensorType = type; return(NewObj); }
public void ClickEvent() { IllValue ultval = Instantiate(obj, spwnPoint.transform.position, spwnPoint.transform.rotation).transform.GetChild(0).GetComponent <IllValue>(); ultval.sensorType = type; //ultval.gameObject.transform.parent = GameObject.Find("CraftTable").transform; //IllValue illval = Instantiate(obj, new Vector3(-40, 115, 35), Quaternion.Euler(90, 0, 0)).transform.Find("DetectLight").GetComponent<IllValue>(); //illval.sensorType = type; }
public void ClickEvent() { if (int.Parse(input1.text) <= 0 || input1.text == null || input1.text == "") { return; } IllValue illval = Instantiate(obj, new Vector3(-40, 115, 35), new Quaternion(90, 0, 0, 0)).transform.Find("DetectLight").GetComponent <IllValue>(); illval.sensorType = type; illval.CustomOhm = int.Parse(input1.text); penel.SetActive(false); }
public void ClickEvent() { IllValue illval = Instantiate(obj, new Vector3(-40, 115, 35), Quaternion.Euler(90, 0, 0)).transform.Find("DetectLight").GetComponent <IllValue>(); illval.sensorType = type; }