game(scripts): standardise DrawerDynamicJointConfiguration

This commit is contained in:
Mark Joshwel 2025-02-14 22:18:17 +08:00
parent d326e662dd
commit 71b7a3b919

View file

@ -1,3 +1,9 @@
/*
* Author: Mark
* Date: 31/1/2025
* Description: Dynamic configuration script for a drawer interactable
*/
using System; using System;
using UnityEngine; using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit.Interactables; using UnityEngine.XR.Interaction.Toolkit.Interactables;
@ -8,6 +14,7 @@ public class DrawerDynamicJointConfiguration : MonoBehaviour
{ {
[Header("mark's all-in-one dynamic drawer component")] [Header("mark's all-in-one dynamic drawer component")]
[Space(10)] [Space(10)]
#if UNITY_EDITOR
[HelpBox("make sure every child inside both prefabs are under the" + [HelpBox("make sure every child inside both prefabs are under the" +
"'Interactable Environment' layer.\n\n" + "'Interactable Environment' layer.\n\n" +
"whatever non-standard (a la ProBuilder) object geometry under the " + "whatever non-standard (a la ProBuilder) object geometry under the " +
@ -16,6 +23,7 @@ public class DrawerDynamicJointConfiguration : MonoBehaviour
"> 'Near-Far Interactor' > 'Curve Interaction Caster') should be have the " + "> 'Near-Far Interactor' > 'Curve Interaction Caster') should be have the " +
"'Interactable Environment' layer included in its' Raycast Mask.", "'Interactable Environment' layer included in its' Raycast Mask.",
HelpBoxMessageType.Error)] HelpBoxMessageType.Error)]
#endif
[Space(10)] [Space(10)]
[SerializeField] [SerializeField]
private MovementAxis movementAxis = MovementAxis.Z; private MovementAxis movementAxis = MovementAxis.Z;