public GameObject target1; void Start() { GameObject newTarget1 = (GameObject)Instantiate(target1); newTarget1.name = target1.name; }
void OnTriggerEnter(Collider other) { Debug.Log(other.name); }
transform.SetParent(GameObject.Find("oya").transform);
transform.position = new Vector3(x, y, z); transform.rotation = new Quaternion(x, y, z, w);
int Count = _RootObject.transform.childCount;
public Transform target; void Update() { transform.LookAt(target); }
using UnityEngine.UI;
public Text B; private int A; void Update() { B.text = "AAA:" + A; }
他のスクリプト名 AAA 他のスクリプト内にある値(int) BBB
FindObjectOfType<AAA>().BBB = 0
if(FindObjectOfType<AAA>().BBB == 0){}