Initialer Upload neues Unity-Projekt

This commit is contained in:
Daniel Ocks
2025-07-03 11:02:29 +02:00
commit 27d6b94b7c
8167 changed files with 1116569 additions and 0 deletions

View File

@ -0,0 +1,75 @@
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
using UnityEngine;
using System.Collections;
using Valve.VR.InteractionSystem;
namespace Valve.VR.InteractionSystem.Sample
{
public class SkeletonUIOptions : MonoBehaviour
{
public void AnimateHandWithController()
{
for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
{
Hand hand = Player.instance.hands[handIndex];
if (hand != null)
{
hand.SetSkeletonRangeOfMotion(Valve.VR.EVRSkeletalMotionRange.WithController);
}
}
}
public void AnimateHandWithoutController()
{
for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
{
Hand hand = Player.instance.hands[handIndex];
if (hand != null)
{
hand.SetSkeletonRangeOfMotion(Valve.VR.EVRSkeletalMotionRange.WithoutController);
}
}
}
public void ShowController()
{
for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
{
Hand hand = Player.instance.hands[handIndex];
if (hand != null)
{
hand.ShowController(true);
}
}
}
public void SetRenderModel(RenderModelChangerUI prefabs)
{
for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
{
Hand hand = Player.instance.hands[handIndex];
if (hand != null)
{
if (hand.handType == SteamVR_Input_Sources.RightHand)
hand.SetRenderModel(prefabs.rightPrefab);
if (hand.handType == SteamVR_Input_Sources.LeftHand)
hand.SetRenderModel(prefabs.leftPrefab);
}
}
}
public void HideController()
{
for (int handIndex = 0; handIndex < Player.instance.hands.Length; handIndex++)
{
Hand hand = Player.instance.hands[handIndex];
if (hand != null)
{
hand.HideController(true);
}
}
}
}
}