void Update() { if (Dome == null) { Dome = GameObject.FindObjectOfType <SetupDome>(); } }
// Use this for initialization void Start() { Index = 2; myint = 10; myinttext = 10; domeSetup = GameObject.FindObjectOfType <SetupDome> (); }
public void textdown() { domeSetup = GameObject.FindObjectOfType <SetupDome> (); current = domeSetup.selectedHotstop; current.GetComponent <generalHotspot> ().radius--; myint = current.GetComponent <generalHotspot> ().radius; // textsize.text = myinttext.ToString (); current.transform.localScale = new Vector3((float)myint / 10, (float)myint / 10, (float)myint / 10); }
public void up() { Debug.Log(SetupDome.SelectedHotspot); domeSetup = GameObject.FindObjectOfType <SetupDome> (); current = domeSetup.selectedHotstop; current.GetComponent <generalHotspot> ().radius++; myint = current.GetComponent <generalHotspot> ().radius; // size.text = myint.ToString (); current.transform.localScale = new Vector3((float)myint / 10, (float)myint / 10, (float)myint / 10); }
void Update() { if (DomeCamera == null) { DomeCamera = GameObject.Find("DomeCamera"); } if (DomeSetup == null) { DomeSetup = GameObject.FindObjectOfType <SetupDome> (); } }
// Use this for initialization void Start() { transition = 0; GameObject hotspot = GameObject.Instantiate(Hotspot); hotspot.transform.parent = gameObject.transform; // hotspot.transform.localPosition = Vector3.zero; hotspot.GetComponent <RectTransform> ().localPosition = new Vector3(0f, 0f, 95f); GameObject.Destroy(gameObject.transform.GetChild(0).gameObject); gameObject.transform.localPosition = new Vector3(gameObject.transform.localPosition.x, gameObject.transform.localPosition.y, 60f); ActionFunction = "Navigate to"; NewHotspotContainer = GameObject.Find("NavigationCanvas"); AddHotspot = FindObjectOfType <AddHotspot> (); Action_SceneList = AddHotspot.Action_SceneList; UserAction_InputField = AddHotspot.UserAction_InputField; locationDome = AddHotspot.locationDome; transition0 = AddHotspot.transition0; transition1 = AddHotspot.transition1; transition2 = AddHotspot.transition2; transition3 = AddHotspot.transition3; Dome = GameObject.Find("DomeFull").GetComponent <SetupDome> (); viewCamera = AddHotspot.viewCamera; textPanal = AddHotspot.redHotspotPanal; navigationPanal = AddHotspot.ActiveHotspotPanal; actionHotspotPanal = AddHotspot.greenHotspotPanal; for (int i = 0; i < NewHotspotContainer.transform.childCount; i++) { if (NewHotspotContainer.transform.GetChild(i).GetComponent <SceneProperties>()) { SceneDropDownName.Add(NewHotspotContainer.transform.GetChild(i).gameObject.name); SceneTexture.Add(NewHotspotContainer.transform.GetChild(i).GetComponent <SceneProperties>().SceneTexture); Debug.Log(i + " == " + NewHotspotContainer.transform.childCount); } } Action_SceneList.ClearOptions(); List <Dropdown.OptionData> SceneFlag = new List <Dropdown.OptionData> (); for (int i = 0; i < SceneDropDownName.Count; i++) { var flagOptionNavigate = new Dropdown.OptionData(SceneDropDownName [i]); SceneFlag.Add(flagOptionNavigate); } Action_SceneList.GetComponent <Dropdown> ().AddOptions(SceneFlag); Action_SceneList.onValueChanged.AddListener(delegate { DropdownValueChanged(Action_SceneList); }); UserAction_InputField.text = ""; UserAction_InputField.onEndEdit.AddListener(delegate { userActionSetName(); }); }
void Update() { if (Dome == null) { Dome = GameObject.FindObjectOfType <SetupDome>(); } if (Selected == true) { gameObject.transform.GetChild(4).gameObject.SetActive(false); } else { gameObject.transform.GetChild(4).gameObject.SetActive(true); } }
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(); }); }
// Update is called once per frame void Update() { if (HotspotContainer == null) { // HotspotContainer = GameObject.FindGameObjectWithTag ("HotSpotContainer"); } if (DomeCamera == null) { DomeCamera = GameObject.Find("DomeCamera"); } if (DomeSetup == null) { DomeSetup = GameObject.FindObjectOfType <SetupDome> (); } if (CheckerScene != HotspotContainer.transform.childCount) { InsertSceneList(); } }
// Update is called once per frame void Update() { if (DomeCamera == null) { DomeCamera = GameObject.Find("DomeCamera"); } if (DomeSetup == null) { DomeSetup = GameObject.FindObjectOfType <SetupDome> (); } if (Required != null) { msg = Required.isOn; } if (msg) { if (GetMsg.text.Length != CharChacker) { if (DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ()) { DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ().Msg = true; DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ().GetMgs = GetMsg.text.ToString(); } } } else { if (DomeSetup.selectedHotstop != null) { if (DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ()) { DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ().Msg = false; DomeSetup.selectedHotstop.GetComponent <NewActionHotspot> ().GetMgs = ""; } } } }
// Use this for initialization void Start() { text = false; movie = false; helpHotspot = FindObjectOfType <AddHelpHotspot> (); Action_Name = helpHotspot.ActionLable; Lable_Text = helpHotspot.LableText_InputField; Lable_Title = helpHotspot.LableTitle_InputField; VideoOption = helpHotspot.VideoOption; TextOption = helpHotspot.TextOption; LableBox = helpHotspot.LableBox; MediaFilePrfb = helpHotspot.MediaFilePrefab; targetObject = helpHotspot.targetObject; menuPanal = helpHotspot.BlueHotspotPanal; navigationPanal = helpHotspot.yellowHotspotPanal; mediaPanal = helpHotspot.purpleHotspotPanal; textPanal = helpHotspot.ActionTextPanal; actionPanal = helpHotspot.ActionHotspotPanel; helpPanal = helpHotspot.HelpHotspotPanal; timeLine = helpHotspot.timeLine; ColorGiver = helpHotspot.ColorGiver; NewHotspotContainer = helpHotspot.NewHotspotContainer; ActionList_DropDown = helpHotspot.ActionList_DropDown; AlwaysVisible = helpHotspot.AlwaysToggle; Action_Name.text = ""; targetObject.value = 0; VideoOption.gameObject.SetActive(false); TextOption.gameObject.SetActive(false); Dome = GameObject.Find("DomeFull").GetComponent <SetupDome>(); mySprite = helpHotspot.mySprite; Lable_Text.text = ""; Lable_Text.onEndEdit.AddListener(delegate { addLableText(); }); Lable_Title.text = ""; Lable_Title.onEndEdit.AddListener(delegate { addLableTitle(); }); targetObject.onValueChanged.AddListener(delegate { Debug.Log("abc"); if (SetupDome.SelectedHotspot == gameObject) { InstantiateObjects(targetObject.captionText.text); ActionFunction = targetObject.captionText.text; Debug.Log("bac"); } }); Action_Name.onEndEdit.AddListener(delegate { if (SetupDome.SelectedHotspot == gameObject) { addActionText(); } }); //InstantiateLable (); AlwaysVisible.onValueChanged.AddListener(delegate { // VisibleAfter(); }); }
private void FindGameObjectWithName() { AddActiveHotspotScript = FindObjectOfType <AddActiveHotspot> (); Dome = GameObject.Find("DomeFull").GetComponent <SetupDome>(); NewHotspotContainer = GameObject.Find("NavigationCanvas"); NewActionHotspotTemplet = GameObject.Find("ActionHotspotTemplet"); //NewActionHotspotTemplet.transform.GetChild(0).gameObject.SetActive (true); Hotspot_Name = GameObject.Find("Btn_ID").transform.GetComponent <Text> (); Target_Object = GameObject.Find("Target_Object").transform.GetChild(0).transform.GetComponent <Dropdown>(); UserAction_InputField = AddActiveHotspotScript.UserAction_InputField; Action_MediaFiles = AddActiveHotspotScript.Action_MediaFiles; Action_UnityObjects = AddActiveHotspotScript.Action_UnityObjects; ActionLable = AddActiveHotspotScript.Action_Lable; ScrolFactorInput = AddActiveHotspotScript.ScrolFactorInput; Action_SceneList = AddActiveHotspotScript.Action_SceneList; LableBox = AddActiveHotspotScript.LabelBoxPrfb; Hotspot = AddActiveHotspotScript.Hotspot; MediaFilePrfb = AddActiveHotspotScript.MediaFilePrfb; UnityObject = AddActiveHotspotScript.UnityObjectPrfb; ActionList_DropDown = AddActiveHotspotScript.ActionList_DropDown; UserActionList_DropDown = AddActiveHotspotScript.UserActionList_DropDown; Always = AddActiveHotspotScript.Always; VisibleWhen = AddActiveHotspotScript.VisibleWhen; Required = AddActiveHotspotScript.Required; Optional = AddActiveHotspotScript.Optional; XYZDropDown = AddActiveHotspotScript.XYZDropDown; ObjectFunctionDropDown = AddActiveHotspotScript.ObjectFunctionDropDown; ScaleSlider = AddActiveHotspotScript.ScaleSlider; RotationSilder = AddActiveHotspotScript.RotationSilder; mySprite = AddActiveHotspotScript.mySprite; posx = AddActiveHotspotScript.posx; posy = AddActiveHotspotScript.posy; textPanel = AddActiveHotspotScript.textPanel; navigationPanel = AddActiveHotspotScript.navigationPanel; actionHotspotPanel = AddActiveHotspotScript.ActionHotspotPanal; ActionLable.text = ""; Action_MediaFiles.ClearOptions(); Action_SceneList.ClearOptions(); Action_UnityObjects.ClearOptions(); UserAction_InputField.text = ""; //getPosition (); //GetSelectedHotspot (); Target_Object.value = 0; Action_SceneList.gameObject.SetActive(false); Action_MediaFiles.gameObject.SetActive(false); Action_UnityObjects.gameObject.SetActive(false); ActionLable.gameObject.SetActive(false); XYZDropDown.gameObject.SetActive(false); ObjectFunctionDropDown.gameObject.SetActive(false); RotationSilder.gameObject.SetActive(false); ScaleSlider.gameObject.SetActive(false); // Change SetupDome.UserActionName.Add(UserAction_InputField.text); SetupDome.ActionFunction.Add(Target_Object.captionText.text); SetupDome.ActionObject.Add(""); Dome.GetComponent <SetupDome> ().Always.Add(Always.isOn); Dome.GetComponent <SetupDome> ().VisibleWhen.Add(VisibleWhen.isOn); Always.isOn = false; VisibleWhen.isOn = false; }
// Use this for initialization void Start() { domeSetup = FindObjectOfType <SetupDome> (); }