using SC.XR.Unity; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using SC.XR.Unity.Module_InputSystem; using SC.XR.Unity.Module_InputSystem.InputDeviceHand; using SC.XR.Unity.Module_InputSystem.InputDeviceGC; namespace SC.XR.Unity { [Serializable] public class ActivateDeviceSettings { [SerializeField, Tooltip("Headset Input")] public bool Head = true; [SerializeField, Tooltip("Hand Tracking Input")] public bool GGT26Dof = true; [SerializeField, Tooltip("Bluetooth Gamepad Input")] public bool BT3Dof = true; [SerializeField, Tooltip("KS Game Controller Input")] public bool KS = true; } [Serializable] public class KeyAliasSettings { [SerializeField] public InputKeyCode K11_Left_Enter = InputKeyCode.LTrigger; [SerializeField] public InputKeyCode K11_Right_Enter = InputKeyCode.RTrigger; [SerializeField] public InputKeyCode K11_Left_Calibration = InputKeyCode.DOWN; [SerializeField] public InputKeyCode K11_Right_Calibration = InputKeyCode.A; [SerializeField] public InputKeyCode K11_Left_AnotherEnter = InputKeyCode.UP; [SerializeField] public InputKeyCode K11_Right_AnotherEnter = InputKeyCode.Y; [Space(5)] [SerializeField] public InputKeyCode K101_Left_Enter = InputKeyCode.LHallForward; [SerializeField] public InputKeyCode K101_Right_Enter = InputKeyCode.RHallForward; [SerializeField] public InputKeyCode K101_Left_Calibration = InputKeyCode.LFunction; [SerializeField] public InputKeyCode K101_Right_Calibration = InputKeyCode.RFunction; [Space(5)] [SerializeField] public InputKeyCode K102_Left_Enter = InputKeyCode.LHallForward; [SerializeField] public InputKeyCode K102_Right_Enter = InputKeyCode.RHallForward; [SerializeField] public InputKeyCode K102_Left_Calibration = InputKeyCode.LFunction; [SerializeField] public InputKeyCode K102_Right_Calibration = InputKeyCode.RFunction; } [Serializable] public class HandInputSettings { [SerializeField, Tooltip("Offset of hand model")] public Vector3 GreyHandOffset = Vector3.zero; [SerializeField, Tooltip("Whether to use GGT26DofHandDataLerp")] public bool HandDataLerp = true; [SerializeField, Tooltip("Whether to enable color effect on GGT26Dof hand model")] public bool HandEffectColor; [SerializeField, Tooltip("Whether to show hand lowpower notice")] public bool ShowHandLowPower = false; [SerializeField, Tooltip("Whether to show hand cursor")] public bool ShowHandCursor = true; [SerializeField, Tooltip("Whether to show hand line")] public bool ShowHandLine; [SerializeField, Tooltip("Whether to show hand line out of camera range")] public bool OutCameraShowHandLine; [SerializeField, Tooltip("Whether to show hand render")] public bool ShowHandRender = true; [SerializeField] public float HandRenderEmissionIntensity = 0.2f; [SerializeField] public HandModelType HandModelType = HandModelType.EffectHand; [SerializeField] public Color HandMainColor = new Color(0.5f, 0.5f, 0.5f, 1); [SerializeField] public Vector3 FarPointerRotationOffset = new Vector3(-10, 0, 0); [SerializeField] public bool EnableHandFarInteraction = true; [SerializeField] public bool EnableHandTouchInteraction = true; [SerializeField] public bool EnableHandGrabInteraction = true; } [Serializable] public class InputSettings { public ActivateDeviceSettings ActivateDevice = new ActivateDeviceSettings(); public KeyAliasSettings KeyAliasSettings = new KeyAliasSettings(); public HandInputSettings HandInputSettings = new HandInputSettings(); [SerializeField, Tooltip("Set 3Dof Mode when using KS")] public bool KSModeSet3Dof; [SerializeField, Tooltip("Use K102 Model instead of K101")] public bool UseK102Model = true; [SerializeField, Tooltip("Offset of K102 pointer angle")] public Vector3 K102PointerAngleOffset = new Vector3(43, 0, 0); [SerializeField, Tooltip("Whether GC has priority over GGT26Dof")] public bool IsGCPriorityGGT26Dof = true; [SerializeField, Tooltip("Whether to use hand animation for K102 model")] public bool EnableK102HandAnimation = true; [SerializeField, Tooltip("Show KS Logs")] public bool KS_ShowLog; [SerializeField, Tooltip("Show DebugMy Logs")] public bool ShowDebugLog; } [Serializable] public class SlamSettings { [SerializeField, Tooltip("Whether to use optics calibration (only works for devices that support this function)")] public bool UseOpticsCalibration = true; [SerializeField] public float trackPositionScale = 1f; [SerializeField, Tooltip("Whether to use 3Dof mode for SLAM")] public bool SlamUse3Dof; [SerializeField, Tooltip("Offset postion of left shoudler")] public Vector3 LeftShoulder = new Vector3(-0.15f, -0.13f, 0); [SerializeField] public bool CreateDepthRT; [SerializeField] public bool UseSingleView = true; } [Serializable] public class ActivateDetectorSettings { [SerializeField, Tooltip("Battery Detector")] public bool Battery = true; [SerializeField, Tooltip("Language Detector")] public bool Language = true; [SerializeField, Tooltip("NoNetwork Detector")] public bool NoNetwork = true; [SerializeField, Tooltip("Notice Detector")] public bool Notice = true; [SerializeField, Tooltip("Recorder Detector")] public bool Recorder = true; [SerializeField, Tooltip("Volume Detector")] public bool Volume = true; } [Serializable] public class DetectorSettings { public ActivateDetectorSettings ActivateDetector = new ActivateDetectorSettings(); } [Serializable] public class QuitAppSettings { [SerializeField, Tooltip("Use a list of keycode to quit app")] public bool UseQuitKeyCodeList = true; [SerializeField, Tooltip("Long pressing the key to quit app")] public bool UseLongPress = true; } [Serializable] public class SDKSystemSettings { [SerializeField, Tooltip("Enable safety area height in app")] public bool UseSafetyAreaHeight = true; [SerializeField, Tooltip("Whether the load Scene DontDestroy SDKSystem")] public bool IsDontDestroyOnLoad = false; } [CreateAssetMenu(fileName = "SDKConfiguration", menuName = "SCConfig/SDKConfiguration")] public class SDKConfiguration : ScriptableObject { [Space(10)] [SerializeField] public InputSettings InputSettings = new InputSettings(); [Space(10)] [SerializeField] public SlamSettings SlamSettings = new SlamSettings(); [Space(10)] [SerializeField] public DetectorSettings DetectorSettings = new DetectorSettings(); [Space(10)] [SerializeField] public QuitAppSettings QuitAppSettings = new QuitAppSettings(); [Space(10)] [SerializeField] public SDKSystemSettings SDKSystemSettings = new SDKSystemSettings(); } [Serializable] public class Section { public string section; public List KEY_VALUE; } [Serializable] public class KEY_VALUE { public string Name; public string Value; } }