diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs index 29182017f..a1bfd10cc 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs @@ -51,6 +51,11 @@ namespace UniVRM10 public Vrm10Runtime(Vrm10Instance target, bool useControlRig) { + if (!Application.isPlaying) + { + Debug.LogWarning($"{nameof(Vrm10Runtime)} expects runtime behaviour."); + } + m_target = target; if (!target.TryGetBoneTransform(HumanBodyBones.Head, out m_head)) diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs index f2fec3410..d72ecf54b 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs @@ -96,8 +96,6 @@ namespace UniVRM10 private static Transform InitializeLookAtOriginTransform(Transform rawHead, Transform actualHead, Vector3 eyeOffsetValue) { - if (!Application.isPlaying) return null; - // NOTE: このメソッドを実行するとき、モデル全体は初期姿勢(T-Pose)でなければならない。 var lookAtOrigin = new GameObject("_look_at_origin_").transform; lookAtOrigin.SetParent(actualHead); @@ -108,19 +106,19 @@ namespace UniVRM10 } #region Obsolete - [Obsolete] + [Obsolete("Use " + nameof(LookAtOriginTransform))] public Transform GetLookAtOrigin(Transform head) { return LookAtOriginTransform; } - [Obsolete] + [Obsolete("Use " + nameof(SetYawPitchManually))] public void SetLookAtYawPitch(float yaw, float pitch) { SetYawPitchManually(yaw, pitch); } - [Obsolete] + [Obsolete("Use " + nameof(Yaw) + " & " + nameof(Pitch))] public (float, float) GetLookAtYawPitch( Transform head, VRM10ObjectLookAt.LookAtTargetTypes lookAtTargetType,