お世話になります。
UnityのHand.csにございます、RenderModelPrefabについて質問がございます。
結論から申し上げますと、Hand.csで使用する手のモデルを下記のモデルと差し替えたいのですが、
https://assetstore.unity.com/packages/3d/characters/hands-for-vr-basic-54532
Skeleton等の設定が複雑で当方ではわからず・・・
やむを得ずRenderModelPrefabをNullにして、単にHand.csがAddComponentされているGameObjectの子供に、手のモデルを追従させております。
動作には問題ないのですが、Consoleに下記のようなエラーが毎フレームでて精神衛生上よろしくないです。
C#
1NullReferenceException: Object reference not set to an instance of an object 2Valve.VR.InteractionSystem.Hand.HandFollowUpdate () (at Assets/SteamVR/InteractionSystem/Core/Scripts/Hand.cs:1149) 3Valve.VR.InteractionSystem.Hand.OnTransformUpdated (Valve.VR.SteamVR_Behaviour_Pose updatedPose, Valve.VR.SteamVR_Input_Sources updatedSource) (at Assets/SteamVR/InteractionSystem/Core/Scripts/Hand.cs:808) 4Valve.VR.SteamVR_Behaviour_Pose.SteamVR_Behaviour_Pose_OnUpdate (Valve.VR.SteamVR_Action_Pose fromAction, Valve.VR.SteamVR_Input_Sources fromSource) (at Assets/SteamVR/Input/SteamVR_Behaviour_Pose.cs:121) 5Valve.VR.SteamVR_Action_Pose_Source.CheckAndSendEvents () (at Assets/SteamVR/Input/SteamVR_Action_Pose.cs:699) 6Valve.VR.SteamVR_Action_Pose_Source.UpdateValue (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Pose.cs:592) 7Valve.VR.SteamVR_Action_Pose_Source_Map`1[Source].UpdateValues (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Pose.cs:403) 8Valve.VR.SteamVR_Action_Pose_Base`2[SourceMap,SourceElement].UpdateValues (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Action_Pose.cs:245) 9Valve.VR.SteamVR_Input.UpdatePoseActions (System.Boolean skipSendingEvents) (at Assets/SteamVR/Input/SteamVR_Input.cs:334) 10Valve.VR.SteamVR_Input.UpdateVisualActions (System.Boolean skipStateAndEventUpdates) (at Assets/SteamVR/Input/SteamVR_Input.cs:317) 11Valve.VR.SteamVR_Input.OnPreCull () (at Assets/SteamVR/Input/SteamVR_Input.cs:302) 12Valve.VR.SteamVR_Behaviour.PreCull () (at Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:219) 13Valve.VR.SteamVR_Behaviour.OnBeforeRender () (at Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:189) 14UnityEngine.BeforeRenderHelper.Invoke () (at C:/buildslave/unity/build/Runtime/Export/Graphics/BeforeRenderHelper.cs:92) 15UnityEngine.Application.InvokeOnBeforeRender () (at C:/buildslave/unity/build/Runtime/Export/Application/Application.cs:318)
そこでご質問なのですが、
1.エラーを無くす方法はないのでしょうか?エラーを無くすには、RenderModelPrefabを設定するしか無いのでしょうか。
2.下記URLのモデルを使用して、RenderModelPrefabを作成することは簡単にはできないのでしょうか?
https://assetstore.unity.com/packages/3d/characters/hands-for-vr-basic-54532
ご教授いただければ幸いです。
よろしくお願いいたします。
あなたの回答
tips
プレビュー