//private string editableText = "Начальный текст"; // Use this for initialization void Start () { stop.transform.gameObject.SetActive (false); SetInitialGUIState (); //get target browsing object target = GameObject.FindGameObjectWithTag ("Browser"); if (target == null) return; //get components list = target.GetComponent<SubsystemList> (); browser = target.GetComponent<SystemBrowser> (); if (list == null || browser == null) return; //get visualizations Visualizations = target.GetComponentsInChildren<VisClass>(); textSystemName.text = list.systemName; if (list.list.Count > 0) menu.interactable = true; AddDropDownButtonsAssociatedWithSubsystems (); }
void OnEnable(){ t = (SubsystemList)target; GetTarget = new SerializedObject(t); ThisList = GetTarget.FindProperty("list"); // Find the List in our script and create a refrence of it GO = t.gameObject; }
/// <summary> /// Create a list of all the subsystem types. /// Then select the first first subsystem. /// </summary> private void PopulateSubsystemList() { // Create the list ListOfSubsystems = new SubsystemList(); // Set something new to the selected subsystem if (ListOfSubsystems.Count > 0) { SelectedSubsystem = ListOfSubsystems.First(); } }
// Use this for initialization void Start () { GO = gameObject; cameraHelper = new GameObject("CameraHelper"); Subs = GetComponent<SubsystemList> (); CreateClones (); mainCam = Camera.main; orbitNav = mainCam.GetComponent<MouseOrbit>(); mainPos = GO.transform.position; meshes = GetComponentsInChildren<MeshRenderer>(); PrepareForAlphaBlending (); m_alpha = alphaMax; }
// Use this for initialization void Start () { SetInitialGUIState (); //get target browsing object target = GameObject.FindGameObjectWithTag ("Browser"); if (target == null) return; //get components list = target.GetComponent<SubsystemList> (); browser = target.GetComponent<SystemBrowser> (); if (list == null || browser == null) return; textSystemName.text = list.systemName; if (list.list.Count > 0) menu.interactable = true; AddDropDownButtonsAssociatedWithSubsystems (); }
//Dictionary<Material,Material> materialPairs = new Dictionary<Material, Material>(); // Use this for initialization void Start () { GameObject canvas = GameObject.FindWithTag ("Player"); bGUI = canvas.GetComponent<BrowserGUI> (); subs = GetComponent<SubsystemList> (); //list of subsystems MarkSubsystemsWithTag(); GO = gameObject; GO.transform.position = new Vector3 (0,0,0); CreateCameraHelper(); //create object for camera targeting GameObject mainCamObj = GameObject.FindWithTag ("MainCamera"); mainCam = mainCamObj.GetComponent<Camera>(); orbitNav = mainCam.GetComponent<MouseOrbit>(); orbitNav.SetTarget (cameraHelper.transform); //напрявляем на помощника BuildMeshes (); //search meshes and join it into groups //PrepareForAlphaBlending (); //prepare materials m_alpha = alphaMax; //initial alpha //initial camera rotation and distance orbitNav.SetRotation(startCamRotation); orbitNav.Distance = startCamDistance; }
// Use this for initialization void Start () { Subs = GetComponent<SubsystemList> (); Browser = GetComponent<SystemBrowser> (); }