Update() статический публичный Метод

static public Update ( ) : void
Результат void
Пример #1
0
 void Update()
 {
     OVRTouchpad.Update();
     if (!UIdata.isHaveCamera)
     {
         camera = GameObject.Find("Main Camera");
         UIdata.isHaveCamera = true;
     }
 }
Пример #2
0
    /// <summary>
    /// Awake this instance.
    /// </summary>
    void Awake()
    {
        OVRTouchpad.Update();         //后添加的
        // Find camera controller
        OVRCameraRig[] cameraControllers;
        cameraControllers = gameObject.GetComponentsInChildren <OVRCameraRig>();

        if (cameraControllers.Length == 0)
        {
            Debug.LogWarning("OVRMainMenu: No OVRCameraRig attached.");
        }
        else if (cameraControllers.Length > 1)
        {
            Debug.LogWarning("OVRMainMenu: More then 1 OVRCameraRig attached.");
        }
        else
        {
            cameraController = cameraControllers[0];
        }

        // Find player controller
        OVRPlayerController[] playerControllers;
        playerControllers = gameObject.GetComponentsInChildren <OVRPlayerController>();

        if (playerControllers.Length == 0)
        {
            Debug.LogWarning("OVRMainMenu: No OVRPlayerController attached.");
        }
        else if (playerControllers.Length > 1)
        {
            Debug.LogWarning("OVRMainMenu: More then 1 OVRPlayerController attached.");
        }
        else
        {
            playerController = playerControllers[0];
        }
    }
Пример #3
0
 void Update()
 {
     OVRTouchpad.Update();
 }