void Start() { if (gameObject.GetComponent <navigateActionHotspot> ()) { navigationHotspot = FindObjectOfType <AddHotspot> (); posx = navigationHotspot.posx; posy = navigationHotspot.posy; posz = navigationHotspot.posz; } if (gameObject.GetComponent <textActionHotspot> ()) { textHotspot = FindObjectOfType <AddTextHotspot> (); posx = textHotspot.posx; posy = textHotspot.posy; posz = textHotspot.posz; } if (gameObject.GetComponent <NewActionHotspot> ()) { actionHotspot = FindObjectOfType <AddActiveHotspot> (); posx = actionHotspot.posx; posy = actionHotspot.posy; posz = actionHotspot.posz; } if (gameObject.GetComponent <helpActionHotspot>()) { HelpActionHotpot = FindObjectOfType <helpActionHotspot>(); posx = HelpActionHotpot.xpos; posy = HelpActionHotpot.yPos; posz = HelpActionHotpot.zPos; } if (gameObject.GetComponent <MenuHotspot>()) { MenuHotspot = FindObjectOfType <MenuHotspot>(); posx = MenuHotspot.posx; posy = MenuHotspot.posy; posz = MenuHotspot.posz; } if (gameObject.GetComponent <MediaHotspot>()) { MediaHotspot = FindObjectOfType <MediaHotspot>(); posx = MediaHotspot.posx; posy = MediaHotspot.posy; posz = MediaHotspot.posz; } radius = 10; posz.text = "10"; R = 107f; }
void Start() { textHotspot = FindObjectOfType <AddTextHotspot> (); ActionLable = textHotspot.ActionLable; LableTitle_InputField = textHotspot.LableTitle_InputField; LableText_InputField = textHotspot.LableText_InputField; posx = textHotspot.posx; posy = textHotspot.posy; posz = textHotspot.posz; Hotspot_Name = textHotspot.HotspotName; GameObject lable = GameObject.Instantiate(LableBox); lable.transform.parent = gameObject.transform; lable.GetComponent <RectTransform>().localPosition = new Vector3(0f, 0f, 95f); GameObject.Destroy(gameObject.transform.GetChild(0).gameObject); ActionFunction = "Display text lable"; Dome = GameObject.Find("DomeFull").GetComponent <SetupDome>(); navigationPanel = textHotspot.navigationPanel; textPanel = textHotspot.ActionTextPanal; actionHotspotPanel = textHotspot.ActionHotspotPanel; AlwaysToggle = textHotspot.AlwaysToggle; glanceOver = textHotspot.glanceOver; LableTitle_InputField.text = ""; LableTitle_InputField.onEndEdit.AddListener(delegate { addLableTitle(); }); LableText_InputField.text = ""; LableText_InputField.onEndEdit.AddListener(delegate { addLableText(); }); AlwaysToggle.isOn = false; glanceOver.isOn = false; AlwaysToggle.onValueChanged.AddListener(delegate { alwaysToggleListener(); }); glanceOver.onValueChanged.AddListener(delegate { glanceListener(); }); }