예제 #1
0
        protected void Awake()
        {
            renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);

            if (handPrefab != null)
            {
                handInstance = GameObject.Instantiate(handPrefab);
                handInstance.transform.parent        = this.transform;
                handInstance.transform.localPosition = Vector3.zero;
                handInstance.transform.localRotation = Quaternion.identity;
                handInstance.transform.localScale    = handPrefab.transform.localScale;
                handSkeleton            = handInstance.GetComponent <SteamVR_Behaviour_Skeleton>();
                handSkeleton.updatePose = false;

                handRenderers = handInstance.GetComponentsInChildren <Renderer>();
                if (displayHandByDefault == false)
                {
                    SetHandVisibility(false);
                }

                handAnimator = handInstance.GetComponentInChildren <Animator>();
            }

            if (controllerPrefab != null)
            {
                controllerInstance = GameObject.Instantiate(controllerPrefab);
                controllerInstance.transform.parent        = this.transform;
                controllerInstance.transform.localPosition = Vector3.zero;
                controllerInstance.transform.localRotation = Quaternion.identity;
                controllerInstance.transform.localScale    = controllerPrefab.transform.localScale;
                controllerRenderModel = controllerInstance.GetComponent <SteamVR_RenderModel>();
            }
        }
예제 #2
0
    private void Awake()
    {
        // Register to be notified when hand models have been set up
        var renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(HideControllers);

        renderModelLoadedAction.enabled = true;
    }
예제 #3
0
        protected void Awake()
        {
            renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);

            InitializeHand();

            InitializeController();
        }
예제 #4
0
        //-------------------------------------------------
        void Awake()
        {
            renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);

#if UNITY_URP
            colorID = Shader.PropertyToID("_BaseColor");
#else
            colorID = Shader.PropertyToID("_Color");
#endif
        }
 //-------------------------------------------------
 void Awake()
 {
     renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);
 }
예제 #6
0
 //-------------------------------------------------
 private void Awake()
 {
     renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);
     colorID = Shader.PropertyToID("_Color");
 }
예제 #7
0
 private void Awake()
 {
     this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction <SteamVR_RenderModel, bool>(this.OnRenderModelLoaded));
     this.colorID = Shader.PropertyToID("_Color");
 }
예제 #8
0
 private void Awake()
 {
     this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction<SteamVR_RenderModel, bool>(this.OnRenderModelLoaded));
 }
예제 #9
0
 //-------------------------------------------------
 void Awake()
 {
     renderModels            = new SteamVR_RenderModel[materials.Length];
     renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded);
 }
예제 #10
0
 private void Awake()
 {
     this.renderModels            = new SteamVR_RenderModel[this.materials.Length];
     this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction <SteamVR_RenderModel, bool>(this.OnRenderModelLoaded));
 }
예제 #11
0
 void Awake()
 {
     deviceConnectedAction = SteamVR_Events.RenderModelLoadedAction(Action);
 }