示例#1
0
 void OnValidate()
 {
     if (!moveablePhysicsObject)
     {
         moveablePhysicsObject = GetComponent <MoveablePhysicsObject>();
     }
     if (!rigidbodyCmp)
     {
         rigidbodyCmp = moveablePhysicsObject.GetComponent <Rigidbody>();
     }
 }
示例#2
0
    void Start()
    {
        _renderer = GetComponent <Renderer>();
        SetGazedAt(false);
        moveablePhysicsScript = gameObject.GetComponent <DaydreamElements.ObjectManipulation.MoveablePhysicsObject> ();
        SwitchMoveablePhysicsScript(false, false);
        transform.GetSiblingIndex();

        GameObject menuRoot = GameObject.FindGameObjectWithTag("MenuRoot");

        loadPanel = menuRoot.GetComponent <MakeRoomMenu> ().loadPanel;
    }