using SC.XR.Unity.Module_InputSystem; using SC.XR.Unity.Module_InputSystem.InputDeviceHand; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ChangeHandModel : MonoBehaviour { //public Material meshHandMaterial; public void OnChangeSkeletonHandClick(TouchPointer touchPointer, SCPointEventData eventData) { if (eventData.inputDevicePartBase is InputDeviceHandPart) { InputDeviceHandPart inputDeviceHandPart = eventData.inputDevicePartBase as InputDeviceHandPart; ModelHand modelHand = inputDeviceHandPart.inputDeviceHandPartUI.modelHand; modelHand.HandModelChange(HandModelType.LineRendererHand); } } public void OnChangeHandModelClick(TouchPointer touchPointer, SCPointEventData eventData) { if (eventData.inputDevicePartBase is InputDeviceHandPart) { InputDeviceHandPart inputDeviceHandPart = eventData.inputDevicePartBase as InputDeviceHandPart; ModelHand modelHand = inputDeviceHandPart.inputDeviceHandPartUI.modelHand; modelHand.HandModelChange(HandModelType.MeshHand); } } public void OnChangeNoHandClick(TouchPointer touchPointer, SCPointEventData eventData) { if (eventData.inputDevicePartBase is InputDeviceHandPart) { InputDeviceHandPart inputDeviceHandPart = eventData.inputDevicePartBase as InputDeviceHandPart; ModelHand modelHand = inputDeviceHandPart.inputDeviceHandPartUI.modelHand; modelHand.HandModelChange(HandModelType.EffectHand); EffectHandModel effectHandModel = modelHand.ActiveHandModel as EffectHandModel; effectHandModel.ChangeHandColor(new Color(0.5f, 0.5f, 0.5f)); } } }