public GameObject[] pre; // 프리팹 private void Start() { objectToSpawn = FindObjectOfType <ObjectSpawner>(); // ObjectToSpawn 컴포넌트(스크립트) 활성 비활성에 쓰일 게임오브젝트 placementIndicator = FindObjectOfType <PlacementIndicator>(); checkedButton.SetActive(false); objectSpawner.GetComponent <ObjectSpawner>().enabled = true; }
void Start() { githubApi = new Api.Github(); sendGithubApi(); placementIndicator = GetComponent <PlacementIndicator>(); }
void Start() { rayManager = FindObjectOfType <ARRaycastManager> (); placementIndicator = FindObjectOfType <PlacementIndicator> (); audioData = GetComponents <AudioSource> (); iter = 0; }
private void OnDisable() { if (PlacementIndicator != null) { PlacementIndicator.SetActive(false); } }
void Awake() { instance = this; raycastManager = FindObjectOfType <ARRaycastManager>(); visual = transform.GetChild(0).gameObject; cam = Camera.main; }
// Start is called before the first frame update void Start() { objectPlaced = false; numLines = 0; lineRend = GetComponent <LineRenderer>(); placementIndicator = FindObjectOfType <PlacementIndicator>(); }
void Start() { cam = Camera.main; core.SetActive(false); placementIndicator = FindObjectOfType <PlacementIndicator>(); }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); #if !UNITY_EDITOR fingerID = 0; #endif }
public GameObject menuButton; // UI Panel void OnEnable() // 오브젝트 스포너 스크립트가 활성화가 되면 { placementIndicator = FindObjectOfType <PlacementIndicator>(); // 스크립트 찾아서 컴포넌트 속성값 넣어줌. if (placementIndicator != null) // 평면 감지 되었으면 { objectToSpawns[MenuButton.menuNum].SetActive(true); // 오브젝트 비주얼 활성화 } }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); obj = Instantiate(objectToSpawn); //obj.SetActive(false); Button btn = button.GetComponent <Button>(); btn.onClick.AddListener(TaskOnClick); }
private void Update() { #if UNITY_EDITOR var screenCenter = Camera.ViewportToWorldPoint(new Vector3(0.5f, 0.65f, 30)); OnScreenCenter.Invoke(screenCenter); #else var screenCenter = Camera.ViewportToScreenPoint(new Vector3(0.5f, 0.65f)); if (Raycast(screenCenter, out var planePoint, out var planeRotation)) { PlacementIndicator.SetActive(true); PlacementIndicator.transform.SetPositionAndRotation(planePoint, planeRotation); OnScreenCenter.Invoke(planePoint); }
// Use this for initialization void Awake() { indicator = placementIndicator.GetComponent<PlacementIndicator>(); twrPlacementScript = inputManager.GetComponent<TowerPlacement>(); curAvailableUnit1s = maxUnit1Number; curAvailableUnit2s = maxUnit2Number; curAvailableUnit3s = maxUnit3Number; unit1availableText.text = curAvailableUnit1s + " Unit 1 available"; unit2availableText.text = curAvailableUnit2s + " Unit 2 available"; unit3availableText.text = curAvailableUnit3s + " Unit 3 available"; lookAtPathPoint = Vector3.zero; }
public void CheckForPortal() { myCheckForPortal = Physics.BoxCast(gameObject.transform.position, transform.localScale / 2, transform.up, out myPortalHit, Quaternion.identity, 1f, myPortalMask); if (myCheckForPortal == true) { PathManager pathManager = FindObjectOfType <PathManager>(); List <Portals> portals = pathManager.GetPortals; for (int i = 0; i < portals.Count; i++) { if (portals[i].name == myPortalHit.collider.gameObject.name) { myPlacement = FindObjectOfType <Placement>(); myPlacement.SetValidPlacement(i); myPlacementIndicator = FindObjectOfType <PlacementIndicator>(); myPlacementIndicator.transform.position = portals[i].GetExit() + gameObject.transform.position; myPlacementIndicator.CheckPlacementIndicators(); break; } } } }
void Start() { spawnNum = 1; placementIndicator = FindObjectOfType <PlacementIndicator>(); }
void Start() { rayManager = FindObjectOfType <ARRaycastManager>(); placementIndicator = FindObjectOfType <PlacementIndicator>(); }
void Awake() { indicator = placementIndicator.GetComponent<PlacementIndicator>(); }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); canSpawnModel = true; }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); hasSpawned = false; }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); obj = Instantiate(objectToSpawn); obj.SetActive(false); }
void Awake() { placementIndicator = FindObjectOfType <PlacementIndicator>(); }
void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); }
public void Start() { allowSpawn = true; placementIndicator = FindObjectOfType <PlacementIndicator>(); }
private void Start() { placementIndicator = FindObjectOfType <PlacementIndicator>(); string[] lines = System.IO.File.ReadAllLines(path); //Debug.Log("Contents of ARMolecules.txt = "); int i = 0; int num_atoms = 0; foreach (string line in lines) { if (i < 14) { i++; continue; } if (i == 14) { num_atoms = Int32.Parse(line); Debug.Log(num_atoms); i++; continue; } //here means i>14 string[] atom = line.Split(' '); foreach (string el in atom) { //Debug.Log(el); switch (el) { case "Br": Debug.Log("It is Br"); break; case "H": Debug.Log("It is H"); break; case "O": Debug.Log("It is O"); break; case "C": Debug.Log("It is C"); break; case "N": Debug.Log("It is N"); break; default: Debug.Log("Nothing"); break; } } Debug.Log("\n"); i++; if (i == (15 + num_atoms)) { i = 0; //continue; break; } //GameObject obj = Instantiate(objectToSpawn, placementIndicator.transform.position, placementIndicator.transform.rotation); } }