diff --git a/.DS_Store b/.DS_Store index c6198cd..5860754 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Assets/Darkmatter/Code/App.meta b/Assets/Darkmatter/Code/App.meta new file mode 100644 index 0000000..59984f7 --- /dev/null +++ b/Assets/Darkmatter/Code/App.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90f7514f0c81b4f4e93a85a4b4279914 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef b/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef new file mode 100644 index 0000000..bd42580 --- /dev/null +++ b/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Darkmatter.App", + "rootNamespace": "", + "references": [ + "GUID:6a0a834eb41764f12ba55c3fb04a40cb", + "GUID:b0214a6008ed146ff8f122a6a9c2f6cc", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1", + "GUID:80ecb87cae9c44d19824e70ea7229748" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef.meta b/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef.meta new file mode 100644 index 0000000..3407432 --- /dev/null +++ b/Assets/Darkmatter/Code/App/Darkmatter.App.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4a17b34a5422c458ea460613a87c5a08 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/App/LifetimeScopes.meta b/Assets/Darkmatter/Code/App/LifetimeScopes.meta new file mode 100644 index 0000000..209d1ce --- /dev/null +++ b/Assets/Darkmatter/Code/App/LifetimeScopes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e8bdb018476d4d6e8c40e4241d86c61 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs b/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs new file mode 100644 index 0000000..9273edf --- /dev/null +++ b/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs @@ -0,0 +1,18 @@ +using Darkmatter.Libs.Installers; +using UnityEngine; +using VContainer; +using VContainer.Unity; + +public class RootLifetimeScope : LifetimeScope +{ + [SerializeField] private MonoBehaviour[] serviceModules; + + protected override void Configure(IContainerBuilder builder) + { + foreach (var module in serviceModules) + { + if (module is IServiceModule serviceModule) + serviceModule.Register(builder); + } + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs.meta b/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs.meta new file mode 100644 index 0000000..2613fa2 --- /dev/null +++ b/Assets/Darkmatter/Code/App/LifetimeScopes/RootLifetimeScope.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cdbf68f1689a84f7588ae13b63f7a3c9 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Camera.meta b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera.meta new file mode 100644 index 0000000..b9692f0 --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7c319c820c1ff4a589f48c8057958005 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs new file mode 100644 index 0000000..4888d7f --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs @@ -0,0 +1,10 @@ +using Darkmatter.Core.Enums.Services.Camera; + +namespace Darkmatter.Core.Contracts.Services.Camera +{ + public interface ICameraService + { + void RegisterCamera(UnityEngine.Camera camera, CameraType type); + UnityEngine.Camera GetCamera(CameraType type = CameraType.MainCamera); + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs.meta b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs.meta new file mode 100644 index 0000000..8a52c5f --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Camera/ICameraService.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6a548291923054b1eafd9f7421415924 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs.meta b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs.meta new file mode 100644 index 0000000..52b9ea7 --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8c5a5b38d3aa43adae4dd7df1b8184c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs new file mode 100644 index 0000000..3deb107 --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs @@ -0,0 +1,12 @@ +using System; +using UnityEngine; + +namespace Darkmatter.Core.Contracts.Services.Inputs +{ + public interface IInputReader + { + Vector2 TouchPosition { get; } + event Action OnTouchStart; + event Action OnTouchEnd; + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs.meta b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs.meta new file mode 100644 index 0000000..6fd0e4b --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Contracts/Services/Inputs/IInputReader.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 882d89c37a9f543c09ebe4b15395da7d \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Core/Enums/Services/Camera.meta b/Assets/Darkmatter/Code/Core/Enums/Services/Camera.meta new file mode 100644 index 0000000..68c7472 --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Enums/Services/Camera.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce4ae8007dffc4bd5834c1b1df2ca060 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs b/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs new file mode 100644 index 0000000..172ddc7 --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs @@ -0,0 +1,8 @@ +namespace Darkmatter.Core.Enums.Services.Camera +{ + public enum CameraType + { + MainCamera, + UICamera + } +} diff --git a/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs.meta b/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs.meta new file mode 100644 index 0000000..4fb847d --- /dev/null +++ b/Assets/Darkmatter/Code/Core/Enums/Services/Camera/CameraType.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 99aa5bc838df3456b9f2ab1acb2d52a3 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera.meta b/Assets/Darkmatter/Code/Services/Camera.meta new file mode 100644 index 0000000..a6f2e91 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ef8ad108b40144fd97398adf29630d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Camera/Installers.meta b/Assets/Darkmatter/Code/Services/Camera/Installers.meta new file mode 100644 index 0000000..ca84043 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Installers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8341b25664e9a41bab38767a0705869f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs b/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs new file mode 100644 index 0000000..4992412 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using Darkmatter.Core.Contracts.Services.Camera; +using Darkmatter.Libs.Installers; +using UnityEngine; +using VContainer; +using CameraType = Darkmatter.Core.Enums.Services.Camera.CameraType; + +namespace Darkmatter.Services.Camera.Installers +{ + public class CameraServiceModule : MonoBehaviour, IServiceModule + { + [SerializeField] private UnityEngine.Camera mainCamera; + [SerializeField] private UnityEngine.Camera uiCamera; + + public void Register(IContainerBuilder builder) + { + var cameras = new Dictionary + { + { CameraType.MainCamera, mainCamera }, + { CameraType.UICamera, uiCamera }, + }; + builder.Register(Lifetime.Singleton); + } + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs.meta b/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs.meta new file mode 100644 index 0000000..1374dd1 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Installers/CameraServiceModule.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d739bbb9f94e0441abcf2a1e7c1fca80 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera/Service.meta b/Assets/Darkmatter/Code/Services/Camera/Service.meta new file mode 100644 index 0000000..1562454 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Service.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2fd5ef07de078438f89d978864c339ad +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs b/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs new file mode 100644 index 0000000..a4b52e1 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using Darkmatter.Core.Contracts.Services.Camera; +using Darkmatter.Core.Enums.Services.Camera; + +namespace Darkmatter.Services.Camera +{ + public class CameraService : ICameraService + { + private readonly Dictionary _cameras = new(); + + public void RegisterCamera(UnityEngine.Camera camera, CameraType type) => _cameras.Add(type, camera); + + public CameraService(Dictionary cameras) + { + _cameras = cameras; + } + + public UnityEngine.Camera GetCamera(CameraType type = CameraType.MainCamera) + { + return _cameras.GetValueOrDefault(type); + } + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs.meta b/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs.meta new file mode 100644 index 0000000..68ab1fc --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Service/CameraService.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 19e142c4ae83144e6a3d391d744786bc \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef b/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef new file mode 100644 index 0000000..c6169c7 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef @@ -0,0 +1,18 @@ +{ + "name": "Services.Camera", + "rootNamespace": "Darkmatter.Services.Camera", + "references": [ + "GUID:6a0a834eb41764f12ba55c3fb04a40cb", + "GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1", + "GUID:b0214a6008ed146ff8f122a6a9c2f6cc" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef.meta b/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef.meta new file mode 100644 index 0000000..3d3ae90 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Camera/Services.Camera.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5250d5b552ecf4265adb8b45c180280b +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Inputs.meta b/Assets/Darkmatter/Code/Services/Inputs.meta new file mode 100644 index 0000000..297cf62 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d54fa8b2c22014496a84c508d897dcdd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Inputs/Generated.meta b/Assets/Darkmatter/Code/Services/Inputs/Generated.meta new file mode 100644 index 0000000..4dce910 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 88abeaac3da9d499288f8b5a1830cebc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs b/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs new file mode 100644 index 0000000..1b16ea0 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs @@ -0,0 +1,1301 @@ +//------------------------------------------------------------------------------ +// +// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator +// version 1.19.0 +// from Assets/Darkmatter/Data/Inputs/GameInputs.inputactions +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Utilities; + +/// +/// Provides programmatic access to , , and instances defined in asset "Assets/Darkmatter/Data/Inputs/GameInputs.inputactions". +/// +/// +/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified. +/// +/// +/// +/// using namespace UnityEngine; +/// using UnityEngine.InputSystem; +/// +/// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface. +/// public class Example : MonoBehaviour, MyActions.IPlayerActions +/// { +/// private MyActions_Actions m_Actions; // Source code representation of asset. +/// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map. +/// +/// void Awake() +/// { +/// m_Actions = new MyActions_Actions(); // Create asset object. +/// m_Player = m_Actions.Player; // Extract action map object. +/// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions. +/// } +/// +/// void OnDestroy() +/// { +/// m_Actions.Dispose(); // Destroy asset object. +/// } +/// +/// void OnEnable() +/// { +/// m_Player.Enable(); // Enable all actions within map. +/// } +/// +/// void OnDisable() +/// { +/// m_Player.Disable(); // Disable all actions within map. +/// } +/// +/// #region Interface implementation of MyActions.IPlayerActions +/// +/// // Invoked when "Move" action is either started, performed or canceled. +/// public void OnMove(InputAction.CallbackContext context) +/// { +/// Debug.Log($"OnMove: {context.ReadValue<Vector2>()}"); +/// } +/// +/// // Invoked when "Attack" action is either started, performed or canceled. +/// public void OnAttack(InputAction.CallbackContext context) +/// { +/// Debug.Log($"OnAttack: {context.ReadValue<float>()}"); +/// } +/// +/// #endregion +/// } +/// +/// +public partial class @GameInputs: IInputActionCollection2, IDisposable +{ + /// + /// Provides access to the underlying asset instance. + /// + public InputActionAsset asset { get; } + + /// + /// Constructs a new instance. + /// + public @GameInputs() + { + asset = InputActionAsset.FromJson(@"{ + ""version"": 1, + ""name"": ""GameInputs"", + ""maps"": [ + { + ""name"": ""Player"", + ""id"": ""df70fa95-8a34-4494-b137-73ab6b9c7d37"", + ""actions"": [ + { + ""name"": ""TouchPosition"", + ""type"": ""Value"", + ""id"": ""368ba85a-92c5-4b11-941d-a77dd8e16565"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": true + }, + { + ""name"": ""Touched"", + ""type"": ""Button"", + ""id"": ""b6bad986-94ef-4c56-9881-7571916086bb"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + } + ], + ""bindings"": [ + { + ""name"": """", + ""id"": ""71b4e496-0a61-4626-96ab-295326a6b981"", + ""path"": ""/delta"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""TouchPosition"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""1fd8ff6a-cb6a-42b6-a3a4-fab43dbfd1fd"", + ""path"": ""/delta"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""TouchPosition"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""f53b3c74-b498-431f-b6b0-61995f333c4a"", + ""path"": ""/leftButton"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Touched"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""9241f002-fb03-4ae6-a0e8-f2a46b7d2f34"", + ""path"": ""/Press"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Touched"", + ""isComposite"": false, + ""isPartOfComposite"": false + } + ] + }, + { + ""name"": ""UI"", + ""id"": ""272f6d14-89ba-496f-b7ff-215263d3219f"", + ""actions"": [ + { + ""name"": ""Navigate"", + ""type"": ""PassThrough"", + ""id"": ""c95b2375-e6d9-4b88-9c4c-c5e76515df4b"", + ""expectedControlType"": ""Vector2"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Submit"", + ""type"": ""Button"", + ""id"": ""7607c7b6-cd76-4816-beef-bd0341cfe950"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Cancel"", + ""type"": ""Button"", + ""id"": ""15cef263-9014-4fd5-94d9-4e4a6234a6ef"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""Point"", + ""type"": ""PassThrough"", + ""id"": ""32b35790-4ed0-4e9a-aa41-69ac6d629449"", + ""expectedControlType"": ""Vector2"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": true + }, + { + ""name"": ""Click"", + ""type"": ""PassThrough"", + ""id"": ""3c7022bf-7922-4f7c-a998-c437916075ad"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": true + }, + { + ""name"": ""RightClick"", + ""type"": ""PassThrough"", + ""id"": ""44b200b1-1557-4083-816c-b22cbdf77ddf"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""MiddleClick"", + ""type"": ""PassThrough"", + ""id"": ""dad70c86-b58c-4b17-88ad-f5e53adf419e"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""ScrollWheel"", + ""type"": ""PassThrough"", + ""id"": ""0489e84a-4833-4c40-bfae-cea84b696689"", + ""expectedControlType"": ""Vector2"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""TrackedDevicePosition"", + ""type"": ""PassThrough"", + ""id"": ""24908448-c609-4bc3-a128-ea258674378a"", + ""expectedControlType"": ""Vector3"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + }, + { + ""name"": ""TrackedDeviceOrientation"", + ""type"": ""PassThrough"", + ""id"": ""9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be"", + ""expectedControlType"": ""Quaternion"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false + } + ], + ""bindings"": [ + { + ""name"": ""Gamepad"", + ""id"": ""809f371f-c5e2-4e7a-83a1-d867598f40dd"", + ""path"": ""2DVector"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Navigate"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""up"", + ""id"": ""14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf"", + ""path"": ""/leftStick/up"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""up"", + ""id"": ""9144cbe6-05e1-4687-a6d7-24f99d23dd81"", + ""path"": ""/rightStick/up"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""2db08d65-c5fb-421b-983f-c71163608d67"", + ""path"": ""/leftStick/down"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""58748904-2ea9-4a80-8579-b500e6a76df8"", + ""path"": ""/rightStick/down"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""8ba04515-75aa-45de-966d-393d9bbd1c14"", + ""path"": ""/leftStick/left"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""712e721c-bdfb-4b23-a86c-a0d9fcfea921"", + ""path"": ""/rightStick/left"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""fcd248ae-a788-4676-a12e-f4d81205600b"", + ""path"": ""/leftStick/right"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""1f04d9bc-c50b-41a1-bfcc-afb75475ec20"", + ""path"": ""/rightStick/right"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": """", + ""id"": ""fb8277d4-c5cd-4663-9dc7-ee3f0b506d90"", + ""path"": ""/dpad"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Gamepad"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": ""Joystick"", + ""id"": ""e25d9774-381c-4a61-b47c-7b6b299ad9f9"", + ""path"": ""2DVector"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Navigate"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""up"", + ""id"": ""3db53b26-6601-41be-9887-63ac74e79d19"", + ""path"": ""/stick/up"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Joystick"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""0cb3e13e-3d90-4178-8ae6-d9c5501d653f"", + ""path"": ""/stick/down"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Joystick"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""0392d399-f6dd-4c82-8062-c1e9c0d34835"", + ""path"": ""/stick/left"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Joystick"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""942a66d9-d42f-43d6-8d70-ecb4ba5363bc"", + ""path"": ""/stick/right"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Joystick"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""Keyboard"", + ""id"": ""ff527021-f211-4c02-933e-5976594c46ed"", + ""path"": ""2DVector"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Navigate"", + ""isComposite"": true, + ""isPartOfComposite"": false + }, + { + ""name"": ""up"", + ""id"": ""563fbfdd-0f09-408d-aa75-8642c4f08ef0"", + ""path"": ""/w"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""up"", + ""id"": ""eb480147-c587-4a33-85ed-eb0ab9942c43"", + ""path"": ""/upArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""2bf42165-60bc-42ca-8072-8c13ab40239b"", + ""path"": ""/s"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""down"", + ""id"": ""85d264ad-e0a0-4565-b7ff-1a37edde51ac"", + ""path"": ""/downArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""74214943-c580-44e4-98eb-ad7eebe17902"", + ""path"": ""/a"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""left"", + ""id"": ""cea9b045-a000-445b-95b8-0c171af70a3b"", + ""path"": ""/leftArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""8607c725-d935-4808-84b1-8354e29bab63"", + ""path"": ""/d"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": ""right"", + ""id"": ""4cda81dc-9edd-4e03-9d7c-a71a14345d0b"", + ""path"": ""/rightArrow"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Navigate"", + ""isComposite"": false, + ""isPartOfComposite"": true + }, + { + ""name"": """", + ""id"": ""9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc"", + ""path"": ""*/{Submit}"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"", + ""action"": ""Submit"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""82627dcc-3b13-4ba9-841d-e4b746d6553e"", + ""path"": ""*/{Cancel}"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"", + ""action"": ""Cancel"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""c52c8e0b-8179-41d3-b8a1-d149033bbe86"", + ""path"": ""/position"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Point"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""e1394cbc-336e-44ce-9ea8-6007ed6193f7"", + ""path"": ""/position"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""Point"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""5693e57a-238a-46ed-b5ae-e64e6e574302"", + ""path"": ""/touch*/position"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Touch"", + ""action"": ""Point"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""4faf7dc9-b979-4210-aa8c-e808e1ef89f5"", + ""path"": ""/leftButton"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Click"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""8d66d5ba-88d7-48e6-b1cd-198bbfef7ace"", + ""path"": ""/tip"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""Click"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""47c2a644-3ebc-4dae-a106-589b7ca75b59"", + ""path"": ""/touch*/press"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Touch"", + ""action"": ""Click"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""bb9e6b34-44bf-4381-ac63-5aa15d19f677"", + ""path"": ""/trigger"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""XR"", + ""action"": ""Click"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""38c99815-14ea-4617-8627-164d27641299"", + ""path"": ""/scroll"", + ""interactions"": """", + ""processors"": """", + ""groups"": "";Keyboard&Mouse"", + ""action"": ""ScrollWheel"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""4c191405-5738-4d4b-a523-c6a301dbf754"", + ""path"": ""/rightButton"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""RightClick"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""24066f69-da47-44f3-a07e-0015fb02eb2e"", + ""path"": ""/middleButton"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""Keyboard&Mouse"", + ""action"": ""MiddleClick"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77"", + ""path"": ""/devicePosition"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""XR"", + ""action"": ""TrackedDevicePosition"", + ""isComposite"": false, + ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""23e01e3a-f935-4948-8d8b-9bcac77714fb"", + ""path"": ""/deviceRotation"", + ""interactions"": """", + ""processors"": """", + ""groups"": ""XR"", + ""action"": ""TrackedDeviceOrientation"", + ""isComposite"": false, + ""isPartOfComposite"": false + } + ] + } + ], + ""controlSchemes"": [ + { + ""name"": ""Keyboard&Mouse"", + ""bindingGroup"": ""Keyboard&Mouse"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + }, + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + }, + { + ""name"": ""Gamepad"", + ""bindingGroup"": ""Gamepad"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + }, + { + ""name"": ""Touch"", + ""bindingGroup"": ""Touch"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + }, + { + ""name"": ""Joystick"", + ""bindingGroup"": ""Joystick"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + }, + { + ""name"": ""XR"", + ""bindingGroup"": ""XR"", + ""devices"": [ + { + ""devicePath"": """", + ""isOptional"": false, + ""isOR"": false + } + ] + } + ] +}"); + // Player + m_Player = asset.FindActionMap("Player", throwIfNotFound: true); + m_Player_TouchPosition = m_Player.FindAction("TouchPosition", throwIfNotFound: true); + m_Player_Touched = m_Player.FindAction("Touched", throwIfNotFound: true); + // UI + m_UI = asset.FindActionMap("UI", throwIfNotFound: true); + m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true); + m_UI_Submit = m_UI.FindAction("Submit", throwIfNotFound: true); + m_UI_Cancel = m_UI.FindAction("Cancel", throwIfNotFound: true); + m_UI_Point = m_UI.FindAction("Point", throwIfNotFound: true); + m_UI_Click = m_UI.FindAction("Click", throwIfNotFound: true); + m_UI_RightClick = m_UI.FindAction("RightClick", throwIfNotFound: true); + m_UI_MiddleClick = m_UI.FindAction("MiddleClick", throwIfNotFound: true); + m_UI_ScrollWheel = m_UI.FindAction("ScrollWheel", throwIfNotFound: true); + m_UI_TrackedDevicePosition = m_UI.FindAction("TrackedDevicePosition", throwIfNotFound: true); + m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true); + } + + ~@GameInputs() + { + UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, GameInputs.Player.Disable() has not been called."); + UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, GameInputs.UI.Disable() has not been called."); + } + + /// + /// Destroys this asset and all associated instances. + /// + public void Dispose() + { + UnityEngine.Object.Destroy(asset); + } + + /// + public InputBinding? bindingMask + { + get => asset.bindingMask; + set => asset.bindingMask = value; + } + + /// + public ReadOnlyArray? devices + { + get => asset.devices; + set => asset.devices = value; + } + + /// + public ReadOnlyArray controlSchemes => asset.controlSchemes; + + /// + public bool Contains(InputAction action) + { + return asset.Contains(action); + } + + /// + public IEnumerator GetEnumerator() + { + return asset.GetEnumerator(); + } + + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + /// + public void Enable() + { + asset.Enable(); + } + + /// + public void Disable() + { + asset.Disable(); + } + + /// + public IEnumerable bindings => asset.bindings; + + /// + public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false) + { + return asset.FindAction(actionNameOrId, throwIfNotFound); + } + + /// + public int FindBinding(InputBinding bindingMask, out InputAction action) + { + return asset.FindBinding(bindingMask, out action); + } + + // Player + private readonly InputActionMap m_Player; + private List m_PlayerActionsCallbackInterfaces = new List(); + private readonly InputAction m_Player_TouchPosition; + private readonly InputAction m_Player_Touched; + /// + /// Provides access to input actions defined in input action map "Player". + /// + public struct PlayerActions + { + private @GameInputs m_Wrapper; + + /// + /// Construct a new instance of the input action map wrapper class. + /// + public PlayerActions(@GameInputs wrapper) { m_Wrapper = wrapper; } + /// + /// Provides access to the underlying input action "Player/TouchPosition". + /// + public InputAction @TouchPosition => m_Wrapper.m_Player_TouchPosition; + /// + /// Provides access to the underlying input action "Player/Touched". + /// + public InputAction @Touched => m_Wrapper.m_Player_Touched; + /// + /// Provides access to the underlying input action map instance. + /// + public InputActionMap Get() { return m_Wrapper.m_Player; } + /// + public void Enable() { Get().Enable(); } + /// + public void Disable() { Get().Disable(); } + /// + public bool enabled => Get().enabled; + /// + /// Implicitly converts an to an instance. + /// + public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); } + /// + /// Adds , and callbacks provided via on all input actions contained in this map. + /// + /// Callback instance. + /// + /// If is null or have already been added this method does nothing. + /// + /// + public void AddCallbacks(IPlayerActions instance) + { + if (instance == null || m_Wrapper.m_PlayerActionsCallbackInterfaces.Contains(instance)) return; + m_Wrapper.m_PlayerActionsCallbackInterfaces.Add(instance); + @TouchPosition.started += instance.OnTouchPosition; + @TouchPosition.performed += instance.OnTouchPosition; + @TouchPosition.canceled += instance.OnTouchPosition; + @Touched.started += instance.OnTouched; + @Touched.performed += instance.OnTouched; + @Touched.canceled += instance.OnTouched; + } + + /// + /// Removes , and callbacks provided via on all input actions contained in this map. + /// + /// + /// Calling this method when have not previously been registered has no side-effects. + /// + /// + private void UnregisterCallbacks(IPlayerActions instance) + { + @TouchPosition.started -= instance.OnTouchPosition; + @TouchPosition.performed -= instance.OnTouchPosition; + @TouchPosition.canceled -= instance.OnTouchPosition; + @Touched.started -= instance.OnTouched; + @Touched.performed -= instance.OnTouched; + @Touched.canceled -= instance.OnTouched; + } + + /// + /// Unregisters and unregisters all input action callbacks via . + /// + /// + public void RemoveCallbacks(IPlayerActions instance) + { + if (m_Wrapper.m_PlayerActionsCallbackInterfaces.Remove(instance)) + UnregisterCallbacks(instance); + } + + /// + /// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via . + /// + /// + /// If is null, calling this method will only unregister all existing callbacks but not register any new callbacks. + /// + /// + /// + /// + public void SetCallbacks(IPlayerActions instance) + { + foreach (var item in m_Wrapper.m_PlayerActionsCallbackInterfaces) + UnregisterCallbacks(item); + m_Wrapper.m_PlayerActionsCallbackInterfaces.Clear(); + AddCallbacks(instance); + } + } + /// + /// Provides a new instance referencing this action map. + /// + public PlayerActions @Player => new PlayerActions(this); + + // UI + private readonly InputActionMap m_UI; + private List m_UIActionsCallbackInterfaces = new List(); + private readonly InputAction m_UI_Navigate; + private readonly InputAction m_UI_Submit; + private readonly InputAction m_UI_Cancel; + private readonly InputAction m_UI_Point; + private readonly InputAction m_UI_Click; + private readonly InputAction m_UI_RightClick; + private readonly InputAction m_UI_MiddleClick; + private readonly InputAction m_UI_ScrollWheel; + private readonly InputAction m_UI_TrackedDevicePosition; + private readonly InputAction m_UI_TrackedDeviceOrientation; + /// + /// Provides access to input actions defined in input action map "UI". + /// + public struct UIActions + { + private @GameInputs m_Wrapper; + + /// + /// Construct a new instance of the input action map wrapper class. + /// + public UIActions(@GameInputs wrapper) { m_Wrapper = wrapper; } + /// + /// Provides access to the underlying input action "UI/Navigate". + /// + public InputAction @Navigate => m_Wrapper.m_UI_Navigate; + /// + /// Provides access to the underlying input action "UI/Submit". + /// + public InputAction @Submit => m_Wrapper.m_UI_Submit; + /// + /// Provides access to the underlying input action "UI/Cancel". + /// + public InputAction @Cancel => m_Wrapper.m_UI_Cancel; + /// + /// Provides access to the underlying input action "UI/Point". + /// + public InputAction @Point => m_Wrapper.m_UI_Point; + /// + /// Provides access to the underlying input action "UI/Click". + /// + public InputAction @Click => m_Wrapper.m_UI_Click; + /// + /// Provides access to the underlying input action "UI/RightClick". + /// + public InputAction @RightClick => m_Wrapper.m_UI_RightClick; + /// + /// Provides access to the underlying input action "UI/MiddleClick". + /// + public InputAction @MiddleClick => m_Wrapper.m_UI_MiddleClick; + /// + /// Provides access to the underlying input action "UI/ScrollWheel". + /// + public InputAction @ScrollWheel => m_Wrapper.m_UI_ScrollWheel; + /// + /// Provides access to the underlying input action "UI/TrackedDevicePosition". + /// + public InputAction @TrackedDevicePosition => m_Wrapper.m_UI_TrackedDevicePosition; + /// + /// Provides access to the underlying input action "UI/TrackedDeviceOrientation". + /// + public InputAction @TrackedDeviceOrientation => m_Wrapper.m_UI_TrackedDeviceOrientation; + /// + /// Provides access to the underlying input action map instance. + /// + public InputActionMap Get() { return m_Wrapper.m_UI; } + /// + public void Enable() { Get().Enable(); } + /// + public void Disable() { Get().Disable(); } + /// + public bool enabled => Get().enabled; + /// + /// Implicitly converts an to an instance. + /// + public static implicit operator InputActionMap(UIActions set) { return set.Get(); } + /// + /// Adds , and callbacks provided via on all input actions contained in this map. + /// + /// Callback instance. + /// + /// If is null or have already been added this method does nothing. + /// + /// + public void AddCallbacks(IUIActions instance) + { + if (instance == null || m_Wrapper.m_UIActionsCallbackInterfaces.Contains(instance)) return; + m_Wrapper.m_UIActionsCallbackInterfaces.Add(instance); + @Navigate.started += instance.OnNavigate; + @Navigate.performed += instance.OnNavigate; + @Navigate.canceled += instance.OnNavigate; + @Submit.started += instance.OnSubmit; + @Submit.performed += instance.OnSubmit; + @Submit.canceled += instance.OnSubmit; + @Cancel.started += instance.OnCancel; + @Cancel.performed += instance.OnCancel; + @Cancel.canceled += instance.OnCancel; + @Point.started += instance.OnPoint; + @Point.performed += instance.OnPoint; + @Point.canceled += instance.OnPoint; + @Click.started += instance.OnClick; + @Click.performed += instance.OnClick; + @Click.canceled += instance.OnClick; + @RightClick.started += instance.OnRightClick; + @RightClick.performed += instance.OnRightClick; + @RightClick.canceled += instance.OnRightClick; + @MiddleClick.started += instance.OnMiddleClick; + @MiddleClick.performed += instance.OnMiddleClick; + @MiddleClick.canceled += instance.OnMiddleClick; + @ScrollWheel.started += instance.OnScrollWheel; + @ScrollWheel.performed += instance.OnScrollWheel; + @ScrollWheel.canceled += instance.OnScrollWheel; + @TrackedDevicePosition.started += instance.OnTrackedDevicePosition; + @TrackedDevicePosition.performed += instance.OnTrackedDevicePosition; + @TrackedDevicePosition.canceled += instance.OnTrackedDevicePosition; + @TrackedDeviceOrientation.started += instance.OnTrackedDeviceOrientation; + @TrackedDeviceOrientation.performed += instance.OnTrackedDeviceOrientation; + @TrackedDeviceOrientation.canceled += instance.OnTrackedDeviceOrientation; + } + + /// + /// Removes , and callbacks provided via on all input actions contained in this map. + /// + /// + /// Calling this method when have not previously been registered has no side-effects. + /// + /// + private void UnregisterCallbacks(IUIActions instance) + { + @Navigate.started -= instance.OnNavigate; + @Navigate.performed -= instance.OnNavigate; + @Navigate.canceled -= instance.OnNavigate; + @Submit.started -= instance.OnSubmit; + @Submit.performed -= instance.OnSubmit; + @Submit.canceled -= instance.OnSubmit; + @Cancel.started -= instance.OnCancel; + @Cancel.performed -= instance.OnCancel; + @Cancel.canceled -= instance.OnCancel; + @Point.started -= instance.OnPoint; + @Point.performed -= instance.OnPoint; + @Point.canceled -= instance.OnPoint; + @Click.started -= instance.OnClick; + @Click.performed -= instance.OnClick; + @Click.canceled -= instance.OnClick; + @RightClick.started -= instance.OnRightClick; + @RightClick.performed -= instance.OnRightClick; + @RightClick.canceled -= instance.OnRightClick; + @MiddleClick.started -= instance.OnMiddleClick; + @MiddleClick.performed -= instance.OnMiddleClick; + @MiddleClick.canceled -= instance.OnMiddleClick; + @ScrollWheel.started -= instance.OnScrollWheel; + @ScrollWheel.performed -= instance.OnScrollWheel; + @ScrollWheel.canceled -= instance.OnScrollWheel; + @TrackedDevicePosition.started -= instance.OnTrackedDevicePosition; + @TrackedDevicePosition.performed -= instance.OnTrackedDevicePosition; + @TrackedDevicePosition.canceled -= instance.OnTrackedDevicePosition; + @TrackedDeviceOrientation.started -= instance.OnTrackedDeviceOrientation; + @TrackedDeviceOrientation.performed -= instance.OnTrackedDeviceOrientation; + @TrackedDeviceOrientation.canceled -= instance.OnTrackedDeviceOrientation; + } + + /// + /// Unregisters and unregisters all input action callbacks via . + /// + /// + public void RemoveCallbacks(IUIActions instance) + { + if (m_Wrapper.m_UIActionsCallbackInterfaces.Remove(instance)) + UnregisterCallbacks(instance); + } + + /// + /// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via . + /// + /// + /// If is null, calling this method will only unregister all existing callbacks but not register any new callbacks. + /// + /// + /// + /// + public void SetCallbacks(IUIActions instance) + { + foreach (var item in m_Wrapper.m_UIActionsCallbackInterfaces) + UnregisterCallbacks(item); + m_Wrapper.m_UIActionsCallbackInterfaces.Clear(); + AddCallbacks(instance); + } + } + /// + /// Provides a new instance referencing this action map. + /// + public UIActions @UI => new UIActions(this); + private int m_KeyboardMouseSchemeIndex = -1; + /// + /// Provides access to the input control scheme. + /// + /// + public InputControlScheme KeyboardMouseScheme + { + get + { + if (m_KeyboardMouseSchemeIndex == -1) m_KeyboardMouseSchemeIndex = asset.FindControlSchemeIndex("Keyboard&Mouse"); + return asset.controlSchemes[m_KeyboardMouseSchemeIndex]; + } + } + private int m_GamepadSchemeIndex = -1; + /// + /// Provides access to the input control scheme. + /// + /// + public InputControlScheme GamepadScheme + { + get + { + if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad"); + return asset.controlSchemes[m_GamepadSchemeIndex]; + } + } + private int m_TouchSchemeIndex = -1; + /// + /// Provides access to the input control scheme. + /// + /// + public InputControlScheme TouchScheme + { + get + { + if (m_TouchSchemeIndex == -1) m_TouchSchemeIndex = asset.FindControlSchemeIndex("Touch"); + return asset.controlSchemes[m_TouchSchemeIndex]; + } + } + private int m_JoystickSchemeIndex = -1; + /// + /// Provides access to the input control scheme. + /// + /// + public InputControlScheme JoystickScheme + { + get + { + if (m_JoystickSchemeIndex == -1) m_JoystickSchemeIndex = asset.FindControlSchemeIndex("Joystick"); + return asset.controlSchemes[m_JoystickSchemeIndex]; + } + } + private int m_XRSchemeIndex = -1; + /// + /// Provides access to the input control scheme. + /// + /// + public InputControlScheme XRScheme + { + get + { + if (m_XRSchemeIndex == -1) m_XRSchemeIndex = asset.FindControlSchemeIndex("XR"); + return asset.controlSchemes[m_XRSchemeIndex]; + } + } + /// + /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "Player" which allows adding and removing callbacks. + /// + /// + /// + public interface IPlayerActions + { + /// + /// Method invoked when associated input action "TouchPosition" is either , or . + /// + /// + /// + /// + void OnTouchPosition(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Touched" is either , or . + /// + /// + /// + /// + void OnTouched(InputAction.CallbackContext context); + } + /// + /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks. + /// + /// + /// + public interface IUIActions + { + /// + /// Method invoked when associated input action "Navigate" is either , or . + /// + /// + /// + /// + void OnNavigate(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Submit" is either , or . + /// + /// + /// + /// + void OnSubmit(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Cancel" is either , or . + /// + /// + /// + /// + void OnCancel(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Point" is either , or . + /// + /// + /// + /// + void OnPoint(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Click" is either , or . + /// + /// + /// + /// + void OnClick(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "RightClick" is either , or . + /// + /// + /// + /// + void OnRightClick(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "MiddleClick" is either , or . + /// + /// + /// + /// + void OnMiddleClick(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "ScrollWheel" is either , or . + /// + /// + /// + /// + void OnScrollWheel(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "TrackedDevicePosition" is either , or . + /// + /// + /// + /// + void OnTrackedDevicePosition(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "TrackedDeviceOrientation" is either , or . + /// + /// + /// + /// + void OnTrackedDeviceOrientation(InputAction.CallbackContext context); + } +} diff --git a/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs.meta b/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs.meta new file mode 100644 index 0000000..90691b2 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6cc101d67503b4fc09ebcac4fecbcea9 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Installers.meta b/Assets/Darkmatter/Code/Services/Inputs/Installers.meta new file mode 100644 index 0000000..3c79780 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Installers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 588d1c926497b491c96d2f405876b176 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs b/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs new file mode 100644 index 0000000..1fdd172 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs @@ -0,0 +1,19 @@ +using Darkmatter.Core.Contracts.Services.Inputs; +using Darkmatter.Libs.Installers; +using Darkmatter.Services.Inputs.Readers; +using UnityEngine; +using VContainer; +using VContainer.Unity; + +namespace Darkmatter.Services.Inputs +{ + public class InputServiceModule : MonoBehaviour, IServiceModule + { + [SerializeField] private InputReaderSO inputReaderSO; + + public void Register(IContainerBuilder builder) + { + builder.RegisterComponent(inputReaderSO); + } + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs.meta b/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs.meta new file mode 100644 index 0000000..15ac890 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Installers/InputServiceModule.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1b23ca8ea5ee647ddba0712811953811 \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Readers.meta b/Assets/Darkmatter/Code/Services/Inputs/Readers.meta new file mode 100644 index 0000000..4fde7d9 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Readers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2e8e28c4942b5410d962cbff40ac302f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs b/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs new file mode 100644 index 0000000..bfb5612 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs @@ -0,0 +1,47 @@ +using System; +using Darkmatter.Core.Contracts.Services.Inputs; +using UnityEngine; +using UnityEngine.InputSystem; + +namespace Darkmatter.Services.Inputs.Readers +{ + [CreateAssetMenu(menuName = "Darkmatter/Inputs/New Input Reader")] + public class InputReaderSO : ScriptableObject, IInputReader, GameInputs.IPlayerActions + { + public Vector2 TouchPosition { get; private set; } + public event Action OnTouchStart; + public event Action OnTouchEnd; + + private GameInputs _gameInputActions; + + private void OnEnable() + { + _gameInputActions = new GameInputs(); + _gameInputActions.Player.SetCallbacks(this); + _gameInputActions.Enable(); + } + + public void OnTouchPosition(InputAction.CallbackContext context) + { + TouchPosition = context.ReadValue(); + } + + public void OnTouched(InputAction.CallbackContext context) + { + if(context.started) + OnTouchStart?.Invoke(); + else if(context.canceled) + OnTouchEnd?.Invoke(); + } + + private void OnDisable() + { + if (_gameInputActions != null) + { + _gameInputActions.Disable(); + _gameInputActions.Dispose(); + _gameInputActions = null; + } + } + } +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs.meta b/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs.meta new file mode 100644 index 0000000..fcb8de0 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Readers/InputReaderSO.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c7a7f36a3426c43b7a1ceeaa853bdc3e \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef b/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef new file mode 100644 index 0000000..f7aceb5 --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef @@ -0,0 +1,19 @@ +{ + "name": "Services.Inputs", + "rootNamespace": "Darkmatter.Services.Inputs", + "references": [ + "GUID:6a0a834eb41764f12ba55c3fb04a40cb", + "GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1", + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:b0214a6008ed146ff8f122a6a9c2f6cc" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef.meta b/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef.meta new file mode 100644 index 0000000..033e27d --- /dev/null +++ b/Assets/Darkmatter/Code/Services/Inputs/Services.Inputs.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 68042734671ce4660bff89e042777454 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions b/Assets/Darkmatter/Data/Inputs/GameInputs.inputactions similarity index 58% rename from Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions rename to Assets/Darkmatter/Data/Inputs/GameInputs.inputactions index 1a12cb9..de6bc18 100644 --- a/Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions +++ b/Assets/Darkmatter/Data/Inputs/GameInputs.inputactions @@ -1,87 +1,25 @@ { - "name": "InputSystem_Actions", + "version": 1, + "name": "GameInputs", "maps": [ { "name": "Player", "id": "df70fa95-8a34-4494-b137-73ab6b9c7d37", "actions": [ { - "name": "Move", + "name": "TouchPosition", "type": "Value", - "id": "351f2ccd-1f9f-44bf-9bec-d62ac5c5f408", - "expectedControlType": "Vector2", + "id": "368ba85a-92c5-4b11-941d-a77dd8e16565", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": true }, { - "name": "Look", - "type": "Value", - "id": "6b444451-8a00-4d00-a97e-f47457f736a8", - "expectedControlType": "Vector2", - "processors": "", - "interactions": "", - "initialStateCheck": true - }, - { - "name": "Attack", + "name": "Touched", "type": "Button", - "id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Interact", - "type": "Button", - "id": "852140f2-7766-474d-8707-702459ba45f3", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold", - "initialStateCheck": false - }, - { - "name": "Crouch", - "type": "Button", - "id": "27c5f898-bc57-4ee1-8800-db469aca5fe3", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Jump", - "type": "Button", - "id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Previous", - "type": "Button", - "id": "2776c80d-3c14-4091-8c56-d04ced07a2b0", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Next", - "type": "Button", - "id": "b7230bb6-fc9b-4f52-8b25-f5e19cb2c2ba", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Sprint", - "type": "Button", - "id": "641cd816-40e6-41b4-8c3d-04687c349290", - "expectedControlType": "Button", + "id": "b6bad986-94ef-4c56-9881-7571916086bb", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -90,386 +28,45 @@ "bindings": [ { "name": "", - "id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403", - "path": "/leftStick", - "interactions": "", - "processors": "", - "groups": ";Gamepad", - "action": "Move", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "WASD", - "id": "00ca640b-d935-4593-8157-c05846ea39b3", - "path": "Dpad", + "id": "71b4e496-0a61-4626-96ab-295326a6b981", + "path": "/delta", "interactions": "", "processors": "", "groups": "", - "action": "Move", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9", - "path": "/w", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "up", - "id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9", - "path": "/upArrow", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "320bffee-a40b-4347-ac70-c210eb8bc73a", - "path": "/s", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1", - "path": "/downArrow", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc", - "path": "/a", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "2e46982e-44cc-431b-9f0b-c11910bf467a", - "path": "/leftArrow", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400", - "path": "/d", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "77bff152-3580-4b21-b6de-dcd0c7e41164", - "path": "/rightArrow", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Move", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "", - "id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8", - "path": "/{Primary2DAxis}", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Move", + "action": "TouchPosition", "isComposite": false, "isPartOfComposite": false }, { "name": "", - "id": "3ea4d645-4504-4529-b061-ab81934c3752", - "path": "/stick", + "id": "1fd8ff6a-cb6a-42b6-a3a4-fab43dbfd1fd", + "path": "/delta", "interactions": "", "processors": "", - "groups": "Joystick", - "action": "Move", + "groups": "", + "action": "TouchPosition", "isComposite": false, "isPartOfComposite": false }, { "name": "", - "id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235", - "path": "/rightStick", - "interactions": "", - "processors": "", - "groups": ";Gamepad", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8c8e490b-c610-4785-884f-f04217b23ca4", - "path": "/delta", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse;Touch", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3e5f5442-8668-4b27-a940-df99bad7e831", - "path": "/{Hatswitch}", - "interactions": "", - "processors": "", - "groups": "Joystick", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91", - "path": "/buttonWest", - "interactions": "", - "processors": "", - "groups": ";Gamepad", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "05f6913d-c316-48b2-a6bb-e225f14c7960", + "id": "f53b3c74-b498-431f-b6b0-61995f333c4a", "path": "/leftButton", "interactions": "", "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Attack", + "groups": "", + "action": "Touched", "isComposite": false, "isPartOfComposite": false }, { "name": "", - "id": "886e731e-7071-4ae4-95c0-e61739dad6fd", - "path": "/primaryTouch/tap", + "id": "9241f002-fb03-4ae6-a0e8-f2a46b7d2f34", + "path": "/Press", "interactions": "", "processors": "", - "groups": ";Touch", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54", - "path": "/trigger", - "interactions": "", - "processors": "", - "groups": "Joystick", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8255d333-5683-4943-a58a-ccb207ff1dce", - "path": "/{PrimaryAction}", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7", - "path": "/enter", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed", - "path": "/2", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Next", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94", - "path": "/dpad/right", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Next", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f2e9ba44-c423-42a7-ad56-f20975884794", - "path": "/leftShift", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6", - "path": "/leftStickPress", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba", - "path": "/trigger", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "eb40bb66-4559-4dfa-9a2f-820438abb426", - "path": "/space", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Jump", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "daba33a1-ad0c-4742-a909-43ad1cdfbeb6", - "path": "/buttonSouth", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Jump", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "603f3daf-40bd-4854-8724-93e8017f59e3", - "path": "/secondaryButton", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Jump", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "1534dc16-a6aa-499d-9c3a-22b47347b52a", - "path": "/1", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Previous", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "25060bbd-a3a6-476e-8fba-45ae484aad05", - "path": "/dpad/left", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Previous", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "1c04ea5f-b012-41d1-a6f7-02e963b52893", - "path": "/e", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Interact", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "b3f66d0b-7751-423f-908b-a11c5bd95930", - "path": "/buttonNorth", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Interact", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "4f4649ac-64a8-4a73-af11-b3faef356a4d", - "path": "/buttonEast", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Crouch", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a", - "path": "/c", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Crouch", + "groups": "", + "action": "Touched", "isComposite": false, "isPartOfComposite": false } diff --git a/Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions.meta b/Assets/Darkmatter/Data/Inputs/GameInputs.inputactions.meta similarity index 75% rename from Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions.meta rename to Assets/Darkmatter/Data/Inputs/GameInputs.inputactions.meta index e786d3e..eaa14d9 100644 --- a/Assets/Darkmatter/Data/Inputs/InputSystem_Actions.inputactions.meta +++ b/Assets/Darkmatter/Data/Inputs/GameInputs.inputactions.meta @@ -8,7 +8,7 @@ ScriptedImporter: assetBundleName: assetBundleVariant: script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} - generateWrapperCode: 0 - wrapperCodePath: + generateWrapperCode: 1 + wrapperCodePath: Assets/Darkmatter/Code/Services/Inputs/Generated/GameInputs.cs wrapperClassName: wrapperCodeNamespace: diff --git a/Assets/Darkmatter/Data/Inputs/InputReader.asset b/Assets/Darkmatter/Data/Inputs/InputReader.asset new file mode 100644 index 0000000..8c77093 --- /dev/null +++ b/Assets/Darkmatter/Data/Inputs/InputReader.asset @@ -0,0 +1,14 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7a7f36a3426c43b7a1ceeaa853bdc3e, type: 3} + m_Name: InputReader + m_EditorClassIdentifier: Services.Inputs::Darkmatter.Services.Inputs.Readers.InputReaderSO diff --git a/Assets/Darkmatter/Data/Inputs/InputReader.asset.meta b/Assets/Darkmatter/Data/Inputs/InputReader.asset.meta new file mode 100644 index 0000000..15589ea --- /dev/null +++ b/Assets/Darkmatter/Data/Inputs/InputReader.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9b7ed848ae3b4036923bbbb2f77fe40 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Darkmatter/Scenes/Boot.unity b/Assets/Darkmatter/Scenes/Boot.unity new file mode 100644 index 0000000..26c9275 --- /dev/null +++ b/Assets/Darkmatter/Scenes/Boot.unity @@ -0,0 +1,664 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &82022331 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 82022335} + - component: {fileID: 82022334} + - component: {fileID: 82022333} + - component: {fileID: 82022332} + m_Layer: 0 + m_Name: UI Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &82022332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 82022331} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 1 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 +--- !u!81 &82022333 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 82022331} + m_Enabled: 1 +--- !u!20 &82022334 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 82022331} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 4 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 34 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 32 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 0 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &82022335 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 82022331} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &147402014 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 147402015} + - component: {fileID: 147402016} + m_Layer: 0 + m_Name: InputServiceModules + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &147402015 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 147402014} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1050564725} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &147402016 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 147402014} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b23ca8ea5ee647ddba0712811953811, type: 3} + m_Name: + m_EditorClassIdentifier: Services.Inputs::Darkmatter.Services.Inputs.InputServiceModule + inputReaderSO: {fileID: 11400000, guid: f9b7ed848ae3b4036923bbbb2f77fe40, type: 2} +--- !u!1 &292698383 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 292698384} + - component: {fileID: 292698385} + m_Layer: 0 + m_Name: CameraServiceModule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &292698384 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292698383} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1050564725} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &292698385 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292698383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d739bbb9f94e0441abcf2a1e7c1fca80, type: 3} + m_Name: + m_EditorClassIdentifier: Services.Camera::Darkmatter.Services.Camera.Installers.CameraServiceModule + mainCamera: {fileID: 519420031} + uiCamera: {fileID: 82022334} +--- !u!1 &519420028 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 519420032} + - component: {fileID: 519420031} + - component: {fileID: 519420029} + - component: {fileID: 519420030} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &519420029 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_Enabled: 1 +--- !u!114 &519420030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: + - {fileID: 82022334} + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 +--- !u!20 &519420031 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 34 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 23 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 0 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &519420032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &619394800 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 619394802} + - component: {fileID: 619394801} + m_Layer: 0 + m_Name: Global Light 2D + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &619394801 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 619394800} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ComponentVersion: 2 + m_LightType: 4 + m_BlendStyleIndex: 0 + m_FalloffIntensity: 0.5 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_LightVolumeIntensity: 1 + m_LightVolumeEnabled: 0 + m_ApplyToSortingLayers: 00000000 + m_LightCookieSprite: {fileID: 0} + m_DeprecatedPointLightCookieSprite: {fileID: 0} + m_LightOrder: 0 + m_AlphaBlendOnOverlap: 0 + m_OverlapOperation: 0 + m_NormalMapDistance: 3 + m_NormalMapQuality: 2 + m_UseNormalMap: 0 + m_ShadowsEnabled: 0 + m_ShadowIntensity: 0.75 + m_ShadowSoftness: 0 + m_ShadowSoftnessFalloffIntensity: 0.5 + m_ShadowVolumeIntensityEnabled: 0 + m_ShadowVolumeIntensity: 0.75 + m_LocalBounds: + m_Center: {x: 0, y: -0.00000011920929, z: 0} + m_Extent: {x: 0.9985302, y: 0.99853027, z: 0} + m_PointLightInnerAngle: 360 + m_PointLightOuterAngle: 360 + m_PointLightInnerRadius: 0 + m_PointLightOuterRadius: 1 + m_ShapeLightParametricSides: 5 + m_ShapeLightParametricAngleOffset: 0 + m_ShapeLightParametricRadius: 1 + m_ShapeLightFalloffSize: 0.5 + m_ShapeLightFalloffOffset: {x: 0, y: 0} + m_ShapePath: + - {x: -0.5, y: -0.5, z: 0} + - {x: 0.5, y: -0.5, z: 0} + - {x: 0.5, y: 0.5, z: 0} + - {x: -0.5, y: 0.5, z: 0} +--- !u!4 &619394802 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 619394800} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1050564724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1050564725} + m_Layer: 0 + m_Name: ServiceModules + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1050564725 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1050564724} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 292698384} + - {fileID: 147402015} + m_Father: {fileID: 1798580248} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1798580247 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1798580248} + - component: {fileID: 1798580249} + m_Layer: 0 + m_Name: RootLifetimeScope + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1798580248 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1798580247} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 16.30939, y: 8.32207, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1050564725} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1798580249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1798580247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cdbf68f1689a84f7588ae13b63f7a3c9, type: 3} + m_Name: + m_EditorClassIdentifier: Darkmatter.App::RootLifetimeScope + parentReference: + TypeName: + autoRun: 1 + autoInjectGameObjects: [] + serviceModules: + - {fileID: 147402016} + - {fileID: 292698385} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 519420032} + - {fileID: 82022335} + - {fileID: 619394802} + - {fileID: 1798580248} diff --git a/Assets/Darkmatter/Scenes/SampleScene.unity.meta b/Assets/Darkmatter/Scenes/Boot.unity.meta similarity index 100% rename from Assets/Darkmatter/Scenes/SampleScene.unity.meta rename to Assets/Darkmatter/Scenes/Boot.unity.meta diff --git a/Assets/Darkmatter/Scenes/SampleScene.unity b/Assets/Darkmatter/Scenes/SampleScene.unity deleted file mode 100644 index 7b420f6..0000000 --- a/Assets/Darkmatter/Scenes/SampleScene.unity +++ /dev/null @@ -1,352 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &519420028 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 519420032} - - component: {fileID: 519420031} - - component: {fileID: 519420029} - - component: {fileID: 519420030} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &519420029 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519420028} - m_Enabled: 1 ---- !u!114 &519420030 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519420028} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_RenderShadows: 1 - m_RequiresDepthTextureOption: 2 - m_RequiresOpaqueTextureOption: 2 - m_CameraType: 0 - m_Cameras: [] - m_RendererIndex: -1 - m_VolumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - m_VolumeTrigger: {fileID: 0} - m_RenderPostProcessing: 0 - m_Antialiasing: 0 - m_AntialiasingQuality: 2 - m_StopNaN: 0 - m_Dithering: 0 - m_ClearDepth: 1 - m_AllowXRRendering: 1 - m_RequiresDepthTexture: 0 - m_RequiresColorTexture: 0 - m_Version: 2 ---- !u!20 &519420031 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519420028} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 34 - orthographic: 1 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 0 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 0 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &519420032 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519420028} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &619394800 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 619394802} - - component: {fileID: 619394801} - m_Layer: 0 - m_Name: Global Light 2D - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &619394801 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 619394800} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ComponentVersion: 1 - m_LightType: 4 - m_BlendStyleIndex: 0 - m_FalloffIntensity: 0.5 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_LightVolumeIntensity: 1 - m_LightVolumeIntensityEnabled: 0 - m_ApplyToSortingLayers: 00000000 - m_LightCookieSprite: {fileID: 0} - m_DeprecatedPointLightCookieSprite: {fileID: 0} - m_LightOrder: 0 - m_OverlapOperation: 0 - m_NormalMapDistance: 3 - m_NormalMapQuality: 2 - m_UseNormalMap: 0 - m_ShadowIntensityEnabled: 0 - m_ShadowIntensity: 0.75 - m_ShadowVolumeIntensityEnabled: 0 - m_ShadowVolumeIntensity: 0.75 - m_Vertices: - - position: {x: 0.9985302, y: 0.9985302, z: 0} - color: {r: 0.70710677, g: 0.70710677, b: 0, a: 0} - uv: {x: 0, y: 0} - - position: {x: 0.9985302, y: 0.9985302, z: 0} - color: {r: 0, g: 0, b: 0, a: 1} - uv: {x: 0, y: 0} - - position: {x: -0.9985302, y: 0.9985302, z: 0} - color: {r: -0.70710677, g: 0.70710677, b: 0, a: 0} - uv: {x: 0, y: 0} - - position: {x: -0.9985302, y: 0.9985302, z: 0} - color: {r: 0, g: 0, b: 0, a: 1} - uv: {x: 0, y: 0} - - position: {x: -0.99853003, y: -0.9985304, z: 0} - color: {r: -0.70710665, g: -0.7071069, b: 0, a: 0} - uv: {x: 0, y: 0} - - position: {x: -0.99853003, y: -0.9985304, z: 0} - color: {r: 0, g: 0, b: 0, a: 1} - uv: {x: 0, y: 0} - - position: {x: 0.99853003, y: -0.9985304, z: 0} - color: {r: 0.70710665, g: -0.7071069, b: 0, a: 0} - uv: {x: 0, y: 0} - - position: {x: 0.99853003, y: -0.9985304, z: 0} - color: {r: 0, g: 0, b: 0, a: 1} - uv: {x: 0, y: 0} - - position: {x: 0, y: 0, z: 0} - color: {r: 0, g: 0, b: 0, a: 1} - uv: {x: 0, y: 0} - m_Triangles: 030001000800020000000100030002000100050003000800040002000300050004000300070005000800060004000500070006000500010007000800000006000700010000000700 - m_LocalBounds: - m_Center: {x: 0, y: -0.00000011920929, z: 0} - m_Extent: {x: 0.9985302, y: 0.99853027, z: 0} - m_PointLightInnerAngle: 360 - m_PointLightOuterAngle: 360 - m_PointLightInnerRadius: 0 - m_PointLightOuterRadius: 1 - m_ShapeLightParametricSides: 5 - m_ShapeLightParametricAngleOffset: 0 - m_ShapeLightParametricRadius: 1 - m_ShapeLightFalloffSize: 0.5 - m_ShapeLightFalloffOffset: {x: 0, y: 0} - m_ShapePath: - - {x: -0.5, y: -0.5, z: 0} - - {x: 0.5, y: -0.5, z: 0} - - {x: 0.5, y: 0.5, z: 0} - - {x: -0.5, y: 0.5, z: 0} ---- !u!4 &619394802 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 619394800} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Packages/manifest.json b/Packages/manifest.json index a86d422..5b3f093 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,6 +2,7 @@ "dependencies": { "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", "com.gilzoide.update-manager": "1.5.3", + "com.kyrylokuzyk.primetween": "1.4.0", "com.unity.2d.animation": "14.0.3", "com.unity.2d.aseprite": "4.0.1", "com.unity.2d.psdimporter": "13.0.2", @@ -66,6 +67,13 @@ "com.gilzoide.update-manager", "jp.hadashikick.vcontainer" ] + }, + { + "name": "npm", + "url": "https://registry.npmjs.org", + "scopes": [ + "com.kyrylokuzyk" + ] } ] } diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 2fadfde..55f9080 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -14,6 +14,13 @@ "dependencies": {}, "url": "https://package.openupm.com" }, + "com.kyrylokuzyk.primetween": { + "version": "1.4.0", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://registry.npmjs.org" + }, "com.unity.2d.animation": { "version": "14.0.3", "depth": 0, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index eb916c5..dc0164a 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -6,7 +6,7 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/Darkmatter/Scenes/SampleScene.unity + path: Assets/Darkmatter/Scenes/Boot.unity guid: 8c9cfa26abfee488c85f1582747f6a02 m_configObjects: com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset index cea0b3f..f0e285b 100644 --- a/ProjectSettings/PackageManagerSettings.asset +++ b/ProjectSettings/PackageManagerSettings.asset @@ -42,7 +42,18 @@ MonoBehaviour: m_Compliance: m_Status: 0 m_Violations: [] - m_UserSelectedRegistryName: package.openupm.com + - m_Id: scoped:project:npm + m_Name: npm + m_Url: https://registry.npmjs.org + m_Scopes: + - com.kyrylokuzyk + m_IsDefault: 0 + m_Capabilities: 0 + m_ConfigSource: 4 + m_Compliance: + m_Status: 0 + m_Violations: [] + m_UserSelectedRegistryName: npm m_UserAddingNewScopedRegistry: 0 m_RegistryInfoDraft: m_Modified: 0