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>(); } }
private void Awake() { // Register to be notified when hand models have been set up var renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(HideControllers); renderModelLoadedAction.enabled = true; }
protected void Awake() { renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded); InitializeHand(); InitializeController(); }
//------------------------------------------------- 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); }
//------------------------------------------------- private void Awake() { renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded); colorID = Shader.PropertyToID("_Color"); }
private void Awake() { this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction <SteamVR_RenderModel, bool>(this.OnRenderModelLoaded)); this.colorID = Shader.PropertyToID("_Color"); }
private void Awake() { this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction<SteamVR_RenderModel, bool>(this.OnRenderModelLoaded)); }
//------------------------------------------------- void Awake() { renderModels = new SteamVR_RenderModel[materials.Length]; renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(OnRenderModelLoaded); }
private void Awake() { this.renderModels = new SteamVR_RenderModel[this.materials.Length]; this.renderModelLoadedAction = SteamVR_Events.RenderModelLoadedAction(new UnityAction <SteamVR_RenderModel, bool>(this.OnRenderModelLoaded)); }
void Awake() { deviceConnectedAction = SteamVR_Events.RenderModelLoadedAction(Action); }