From 7b9470598bcc22de78acd15cfe68a1b7d1060f38 Mon Sep 17 00:00:00 2001 From: Brajanowski Date: Wed, 18 Jun 2025 17:23:50 +0200 Subject: [PATCH] fixed input controls asset duplication --- .../AssetGroups/Jelycho Core.asset | 5 + .../Windows/addressables_content_state.bin | Bin 2957 -> 2958 bytes Assets/AddressableAssetsData/link.xml | 164 ++++++++++++++++++ Assets/AddressableAssetsData/link.xml.meta | 7 + ...niversalRenderPipelineGlobalSettings.asset | 48 ++--- Assets/jelycho/Code/Main/JelychoGame.cs | 17 +- .../jelycho/Code/Player/PlayerController.cs | 16 +- .../Input/controls_jelycho.inputactions | 2 +- Assets/jelycho/Jelycho.asset | 6 +- .../actors/player/Player Controller.asset | 4 +- .../player/materials/m_accessory_eyes.mat | 2 +- .../com.unity.probuilder/Settings.json | 5 + ProjectSettings/ProjectSettings.asset | 4 +- 13 files changed, 233 insertions(+), 47 deletions(-) create mode 100644 Assets/AddressableAssetsData/link.xml create mode 100644 Assets/AddressableAssetsData/link.xml.meta diff --git a/Assets/AddressableAssetsData/AssetGroups/Jelycho Core.asset b/Assets/AddressableAssetsData/AssetGroups/Jelycho Core.asset index 164cd9b..0b668e2 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Jelycho Core.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Jelycho Core.asset @@ -43,6 +43,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: f991e9abd9a53ee4b94b329a5ce96cb2 + m_Address: Assets/jelycho/Input/controls_jelycho.inputactions + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 m_ReadOnly: 0 m_Settings: {fileID: 11400000, guid: 93969247b34433f44bfa755967945828, type: 2} m_SchemaSet: diff --git a/Assets/AddressableAssetsData/Windows/addressables_content_state.bin b/Assets/AddressableAssetsData/Windows/addressables_content_state.bin index c717c5272652bd6b2778df704d5251ba3497a6a5..1ea3eeecc0a615002a820f3de283530f71361fc8 100644 GIT binary patch delta 348 zcmah@txg0n7~I~$!rt*K;1ppA=uN+FzxG=J0god=VZLtL;CKTR0TObU26Y;PB00em z@CpcC07t-}*#!JeGLsRLnHi7nN6(jHA(s_YfYU4SAxasMwPz-l9KAtkqpp247<{lM zaJuV%m1s$tV4X1%z<~^&Eotr1*#@I;(q!(uB;STQx>gxOQnh4dBQa7?H8{s!r``GQ zZ2$&VMg?MW>Xqdv{}6ME>_ZKan@5i>3HyR@NiOP{}5Z9S?`$3PG-)(#-ELJG(22dEB*>Z HmJNRa!pU4) delta 347 zcmah@y-EW?7`#o)VT=~qoQ-&Bu#)iYx4XByjflN(VDs%Cf|V~|ClNF@+xiefggk+T zwP2%#orQ&3+Igsb24)zhn3?NpQr(`hvIiqR($jPH#%g0V`6L`~M2vt9dhWd?OXM^H zx_s6BtPSX(l5RZ2CWb_0yiJHIp^!~Lo^KY8>xi68a_ExPlC0oTdT@~|7lL<@^04={ zX*dKx2tq=l#6c0)AWSkbDs0zeIj)u9O%P5Jk3dpdsf-pBL3#X*r_bdD8_qj^xqiQu z$BUEh_anmJjZCOGqbLa0)wqNtXV1M~#=dXYj G#oz}QVP9MT diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml new file mode 100644 index 0000000..794629b --- /dev/null +++ b/Assets/AddressableAssetsData/link.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/AddressableAssetsData/link.xml.meta new file mode 100644 index 0000000..8d2ceb8 --- /dev/null +++ b/Assets/AddressableAssetsData/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f92b0d5c81fe77c44a47cf0a886cd5c5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset index 4b3eac9..e706033 100644 --- a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset @@ -33,28 +33,28 @@ MonoBehaviour: m_Settings: m_SettingsList: m_List: - - rid: 7613102465765343630 - - rid: 7613102465765343631 + - rid: 7613102493688660161 + - rid: 7613102493688660162 - rid: 6852985685364965378 - rid: 6852985685364965379 - rid: 6852985685364965380 - rid: 6852985685364965381 - - rid: 7613102465765343632 - - rid: 7613102465765343633 + - rid: 7613102493688660163 + - rid: 7613102493688660164 - rid: 6852985685364965384 - rid: 6852985685364965385 - - rid: 7613102465765343634 - - rid: 7613102465765343635 - - rid: 7613102465765343636 - - rid: 7613102465765343637 - - rid: 7613102465765343638 - - rid: 7613102465765343639 + - rid: 7613102493688660165 + - rid: 7613102493688660166 + - rid: 7613102493688660167 + - rid: 7613102493688660168 + - rid: 7613102493688660169 + - rid: 7613102493688660170 - rid: 6852985685364965392 - - rid: 7613102465765343640 + - rid: 7613102493688660171 - rid: 6852985685364965394 - rid: 8712630790384254976 - rid: 260979669776728064 - - rid: 7613102465765343641 + - rid: 7613102493688660172 m_RuntimeSettings: m_List: - rid: 6852985685364965378 @@ -159,14 +159,14 @@ MonoBehaviour: m_version: 0 m_EnableCompilationCaching: 1 m_EnableValidityChecks: 1 - - rid: 7613102465765343630 + - rid: 7613102493688660161 type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_Version: 0 m_StripUnusedPostProcessingVariants: 1 m_StripUnusedVariants: 1 m_StripScreenCoordOverrideVariants: 1 - - rid: 7613102465765343631 + - rid: 7613102493688660162 type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3} @@ -178,7 +178,7 @@ MonoBehaviour: m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3} m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3} m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3} - - rid: 7613102465765343632 + - rid: 7613102493688660163 type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_Version: 0 @@ -193,7 +193,7 @@ MonoBehaviour: m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} - - rid: 7613102465765343633 + - rid: 7613102493688660164 type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} @@ -202,7 +202,7 @@ MonoBehaviour: m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2} m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2} m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - - rid: 7613102465765343634 + - rid: 7613102493688660165 type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime} data: m_Version: 0 @@ -215,13 +215,13 @@ MonoBehaviour: m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3} m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3} m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3} - - rid: 7613102465765343635 + - rid: 7613102493688660166 type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3} m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3} m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3} - - rid: 7613102465765343636 + - rid: 7613102493688660167 type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 @@ -234,12 +234,12 @@ MonoBehaviour: skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} - - rid: 7613102465765343637 + - rid: 7613102493688660168 type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 m_ProbeVolumeDisableStreamingAssets: 0 - - rid: 7613102465765343638 + - rid: 7613102493688660169 type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 @@ -249,21 +249,21 @@ MonoBehaviour: probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3} probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3} numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3} - - rid: 7613102465765343639 + - rid: 7613102493688660170 type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_version: 0 m_IncludeReferencedInScenes: 0 m_IncludeAssetsByLabel: 0 m_LabelToInclude: - - rid: 7613102465765343640 + - rid: 7613102493688660171 type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3} probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3} probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3} - - rid: 7613102465765343641 + - rid: 7613102493688660172 type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2} diff --git a/Assets/jelycho/Code/Main/JelychoGame.cs b/Assets/jelycho/Code/Main/JelychoGame.cs index 43dfe12..3dacc2e 100755 --- a/Assets/jelycho/Code/Main/JelychoGame.cs +++ b/Assets/jelycho/Code/Main/JelychoGame.cs @@ -66,10 +66,10 @@ namespace RebootReality.jelycho.Main { public class JelychoGame : IGame { [Serializable] public class Config { - public WorldConfigAsset mainMenuWorldConfig; - public GameModeAsset standardGameMode; - - public WorldConfigAsset worldAstek; + public string mainMenuWorld = "main_menu"; + public string mainGameplayWorld = "dev"; + + public string standardGameMode = "gm_standard"; } readonly Config m_Config; @@ -90,7 +90,9 @@ namespace RebootReality.jelycho.Main { RR.GameModes.ActiveGameMode.Subscribe(gameMode => { if (gameMode == null) { RR.Console.WriteToOutput("Game mode stopped, loading main menu world"); - RR.World.LoadAsync(m_Config.mainMenuWorldConfig.Config, CancellationToken.None).Forget(); + + WorldConfigAsset mainMenuWorldConfigAsset = RR.GetWorldConfigAsset(m_Config.mainMenuWorld); + RR.World.LoadAsync(mainMenuWorldConfigAsset.Config, CancellationToken.None).Forget(); } }) .AddTo(ref m_DisposableBag); @@ -101,7 +103,10 @@ namespace RebootReality.jelycho.Main { } public void NewGame() { - RR.StartGameMode(m_Config.standardGameMode, m_Config.worldAstek.Config); + GameModeAsset gameModeAsset = RR.GetGameMode(m_Config.standardGameMode); + WorldConfigAsset worldConfigAsset = RR.GetWorldConfigAsset(m_Config.mainGameplayWorld); + + RR.StartGameMode(gameModeAsset, worldConfigAsset.Config); } } } \ No newline at end of file diff --git a/Assets/jelycho/Code/Player/PlayerController.cs b/Assets/jelycho/Code/Player/PlayerController.cs index 5581d2a..d126808 100755 --- a/Assets/jelycho/Code/Player/PlayerController.cs +++ b/Assets/jelycho/Code/Player/PlayerController.cs @@ -7,11 +7,14 @@ using Unity.Mathematics; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.InputSystem; +using Logger = RebootKit.Engine.Foundation.Logger; using Object = UnityEngine.Object; namespace RebootReality.jelycho.Player { public class PlayerController : IController { + readonly Logger s_logger = new Logger(nameof(PlayerController)); readonly Config m_Config; + PlayerActor m_FPPActor; public PlayerController(Config config) { @@ -32,7 +35,7 @@ namespace RebootReality.jelycho.Player { m_FPPActor.WarpTo(worldContext.PlayerSpawnPoint.position); } - await Awaitable.NextFrameAsync(cancellationToken); + await UniTask.Yield(cancellationToken); } public void OnStop() { @@ -44,11 +47,8 @@ namespace RebootReality.jelycho.Player { } public void OnTick() { - if (m_FPPActor == null) { - return; - } - - if (!Application.isFocused) { + if (m_FPPActor is null) { + s_logger.Error("Player actor is not initialized. Make sure to call OnStart() before OnTick()."); return; } @@ -76,7 +76,7 @@ namespace RebootReality.jelycho.Player { [Serializable] public class Config { public AssetReferenceT playerActorPrefab; - + public InputActionReference moveActionReference; public InputActionReference lookActionReference; public InputActionReference jumpActionReference; @@ -86,7 +86,7 @@ namespace RebootReality.jelycho.Player { public InputActionReference secondaryActionReference; } } - + public static class FPPConfig { [ConfigVar("fpp.mouse.sens", 0.25f, "Mouse look sensitivity")] public static ConfigVar MouseSensitivity; [ConfigVar("fpp.mouse.invert.y", 0, "Invert mouse look")] public static ConfigVar MouseInvertY; diff --git a/Assets/jelycho/Input/controls_jelycho.inputactions b/Assets/jelycho/Input/controls_jelycho.inputactions index 71438a7..3259705 100644 --- a/Assets/jelycho/Input/controls_jelycho.inputactions +++ b/Assets/jelycho/Input/controls_jelycho.inputactions @@ -95,7 +95,7 @@ "id": "d67d0677-bbce-4d3c-b135-27accc98bfb1", "path": "/rightStick", "interactions": "", - "processors": "ScaleVector2(x=4)", + "processors": "", "groups": "", "action": "Look", "isComposite": false, diff --git a/Assets/jelycho/Jelycho.asset b/Assets/jelycho/Jelycho.asset index 76defdb..e207132 100755 --- a/Assets/jelycho/Jelycho.asset +++ b/Assets/jelycho/Jelycho.asset @@ -13,6 +13,6 @@ MonoBehaviour: m_Name: Jelycho m_EditorClassIdentifier: m_Config: - mainMenuWorldConfig: {fileID: 11400000, guid: a732f125f8c344a46917f07872c35378, type: 2} - standardGameMode: {fileID: 11400000, guid: 09a952812a536084d8f3cd13dc9fec09, type: 2} - worldAstek: {fileID: 11400000, guid: 25696e225f604c542bd24bec74319866, type: 2} + mainMenuWorld: main_menu + mainGameplayWorld: dev + standardGameMode: gm_standard diff --git a/Assets/jelycho/actors/player/Player Controller.asset b/Assets/jelycho/actors/player/Player Controller.asset index 2274b10..577e089 100755 --- a/Assets/jelycho/actors/player/Player Controller.asset +++ b/Assets/jelycho/actors/player/Player Controller.asset @@ -20,8 +20,8 @@ MonoBehaviour: m_SubObjectType: m_EditorAssetChanged: 0 moveActionReference: {fileID: -2772844096359753972, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} - lookActionReference: {fileID: -5630151704836100654, guid: 052faaac586de48259a63d0c4782560b, type: 3} - jumpActionReference: {fileID: -2099379676528639254, guid: 052faaac586de48259a63d0c4782560b, type: 3} + lookActionReference: {fileID: -5746443703610909298, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} + jumpActionReference: {fileID: 2789365106649255415, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} sprintActionReference: {fileID: 7801716088028601855, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} dragObjectActionReference: {fileID: 2331847964233633448, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} primaryActionReference: {fileID: 7005240712943983493, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3} diff --git a/Assets/jelycho/actors/player/materials/m_accessory_eyes.mat b/Assets/jelycho/actors/player/materials/m_accessory_eyes.mat index 142b5d9..72176c6 100644 --- a/Assets/jelycho/actors/player/materials/m_accessory_eyes.mat +++ b/Assets/jelycho/actors/player/materials/m_accessory_eyes.mat @@ -118,7 +118,7 @@ Material: m_Colors: - _BaseColor: {r: 0.062299743, g: 0.3773585, b: 0.14641719, a: 1} - _Color: {r: 0.06229972, g: 0.37735847, b: 0.14641714, a: 1} - - _EmissionColor: {r: 0, g: 0.71706384, b: 0.07792316, a: 1} + - _EmissionColor: {r: 0, g: 367.1367, b: 39.896656, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/ProjectSettings/Packages/com.unity.probuilder/Settings.json b/ProjectSettings/Packages/com.unity.probuilder/Settings.json index 948dbd2..3043954 100644 --- a/ProjectSettings/Packages/com.unity.probuilder/Settings.json +++ b/ProjectSettings/Packages/com.unity.probuilder/Settings.json @@ -81,6 +81,11 @@ "key": "editor.autoUpdatePreview", "value": "{\"m_Value\":false}" }, + { + "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", + "key": "editor.stripProBuilderScriptsOnBuild", + "value": "{\"m_Value\":true}" + }, { "type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "key": "ShapeBuilder.ActiveShapeIndex", diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 29d2294..aabbe3c 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -12,7 +12,7 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: Reality Reboot + companyName: Reboot Reality productName: Jelycho defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} @@ -142,7 +142,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 0.1.8 + bundleVersion: 0.1.15 preloadedAssets: - {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} - {fileID: 11400000, guid: 5e0d3796a45800e429656e78e50c710e, type: 2}