Beispiel #1
0
 void Start()
 {
     buttonText      = GetComponentInChildren <UnityEngine.UI.Text>();
     mainCamera      = GameObject.FindGameObjectWithTag("MainCamera");
     gizmoController = GameObject.FindGameObjectWithTag("Gizmo").GetComponent <GizmoControllerCS>();
     initialPosition = firstPersonController.transform.position;
     initialRotation = firstPersonController.transform.rotation;
     firstPersonController.SetActive(false);
     buttonText.text = isPlayMode ? "Exit Play Mode" : "Play";
 }
Beispiel #2
0
    void Start()
    {
#if UNITY_STANDALONE_OSX
        onGfx  = onGfxMac;
        offGfx = offGfxMac;
#else
        onGfx  = onGfxWindows;
        offGfx = offGfxWindows;
#endif

        toggle          = GetComponent <Toggle>();
        image           = GetComponent <Image>();
        image.sprite    = toggle.isOn ? onGfx : offGfx;
        gizmoController = FindObjectOfType <GizmoControllerCS>();
    }
Beispiel #3
0
    void Start()
    {
        if (!GetComponent <Renderer>())
        {
            return;
        }

        NormalColor  = GetComponent <Renderer>().material.color;
        HilightColor = new Color(NormalColor.r * 1.2f, NormalColor.g * 1.2f, NormalColor.b * 1.2f, 1.0f);
        GC           = GameObject.Find("GizmoAdvancedCS").GetComponent <GizmoControllerCS>();

        if (GC == null)
        {
            Debug.LogError(this + " Unable To Find Gizmo Advanced Controller. Please be sure one is in the scene.");
        }
        else
        {
            GC.Hide();
        }
    }    //Start
    void Start()
    {
        GizmoController = GameObject.FindGameObjectWithTag("Gizmo").GetComponent <GizmoControllerCS>();
        gameController  = FindObjectOfType <GameController>();

        if (GizmoController == null)
        {
            Debug.LogError(this + " Unable To Find Gizmo Advanced Controller. Please be sure one is in the scene.");
        }

        this.photonView = GetComponent <PhotonView>();
        boundingBox     = GetComponent <BoundBoxes_BoundBox>();
        if (this.IsDuplicate)
        {
            OnMouseDown();
        }
        else
        {
            ClearSelection();
        }
    }