// Start is called before the first frame update void Start() { _targetCubeScript = _targetCube.transform.Find("PlateCube").gameObject.GetComponent <PlateCube>(); _meshRenderer = GetComponent <MeshRenderer>(); _greenLight = transform.Find("Green Light").gameObject; _light = transform.Find("Light").gameObject; }
void Reset() { transform.position = _origin; foreach (Transform child in _floorGrid.transform) { PlateCube script = child.Find("PlateCube").gameObject.GetComponent<PlateCube>(); script.SetInactive(); } }
private void OnTriggerEnter(Collider other) { _runtimeData._showingSolution = true; foreach (string cube in _runtimeData._solveCubes) { PlateCube script = GameObject.Find(cube).transform.Find("PlateCube").gameObject.GetComponent <PlateCube>(); script.SetActive(); } }