From 688587c45dd2b2792864231862e3cbec267a41fc Mon Sep 17 00:00:00 2001 From: stilnat Date: Mon, 9 Sep 2024 15:26:27 +0200 Subject: [PATCH] update to make build work --- Assets/Scripts/SS3D/Data/Paths.cs | 10 ++++++++-- .../SS3D/Networking/Settings/NetworkSettings.cs | 14 ++++++++++---- Assets/Settings/NetworkSettings.asset | 2 +- ProjectSettings/EditorBuildSettings.asset | 3 ++- ProjectSettings/ProjectSettings.asset | 2 ++ 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/SS3D/Data/Paths.cs b/Assets/Scripts/SS3D/Data/Paths.cs index a9ddd73833..77d99a6c25 100644 --- a/Assets/Scripts/SS3D/Data/Paths.cs +++ b/Assets/Scripts/SS3D/Data/Paths.cs @@ -1,7 +1,9 @@ using JetBrains.Annotations; -using ParrelSync; using System.IO; -using UnityEngine; + +#if UNITY_EDITOR +using ParrelSync; +#endif namespace SS3D.Data { @@ -21,7 +23,11 @@ public static class Paths /// [NotNull] private static string FullGamePath => +#if UNITY_EDITOR ClonesManager.IsClone() ? ClonesManager.GetOriginalProjectPath() : Path.GetFullPath("."); +#else + Path.GetFullPath("."); +#endif /// /// The path to the Config folder on the Editor project. diff --git a/Assets/Scripts/SS3D/Networking/Settings/NetworkSettings.cs b/Assets/Scripts/SS3D/Networking/Settings/NetworkSettings.cs index 9a03d0d27a..f9fb55948b 100644 --- a/Assets/Scripts/SS3D/Networking/Settings/NetworkSettings.cs +++ b/Assets/Scripts/SS3D/Networking/Settings/NetworkSettings.cs @@ -1,11 +1,12 @@ using Coimbra; -using ParrelSync; -using SS3D.Core.Settings; using SS3D.Data; using SS3D.Logging; -using System; using UnityEngine; +#if UNITY_EDITOR +using ParrelSync; +#endif + namespace SS3D.Networking.Settings { [ProjectSettings("SS3D/Core", "Network Settings")] @@ -51,7 +52,12 @@ public sealed class NetworkSettings : ScriptableSettings public string Ckey { - get => ClonesManager.IsClone() ? _ckey + ClonesManager.CloneNameSuffix : _ckey; + get => + #if UNITY_EDITOR + ClonesManager.IsClone() ? _ckey + ClonesManager.CloneNameSuffix : _ckey; + #else + _ckey; + #endif set => _ckey = value; } diff --git a/Assets/Settings/NetworkSettings.asset b/Assets/Settings/NetworkSettings.asset index e1b150a0ad..c391744486 100644 --- a/Assets/Settings/NetworkSettings.asset +++ b/Assets/Settings/NetworkSettings.asset @@ -15,7 +15,7 @@ MonoBehaviour: _preload: 1 _type: 2 NetworkType: 2 - Ckey: editorUser + _ckey: unknown ServerAddress: 127.0.0.1 ServerPort: 1151 EnableNetworkBandwidthUsageStats: 1 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 69b746b720..c08845ab4f 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -11,7 +11,7 @@ EditorBuildSettings: - enabled: 1 path: Assets/Content/Scenes/Intro.unity guid: 61687ab4465bb6e4d8164057bedc63db - - enabled: 1 + - enabled: 0 path: Assets/Content/Scenes/Launcher.unity guid: d03a300180bde5646b09bfa4c392679f - enabled: 1 @@ -22,4 +22,5 @@ EditorBuildSettings: guid: a7a0fb29f301d364a822be64003a90cb m_configObjects: com.unity.addressableassets: {fileID: 11400000, guid: 05f6fe7a31766d24eb823119e9f0f5a5, type: 2} + com.unity.input.settings: {fileID: 11400000, guid: 7e95d9e343a711348b669c67be95eade, type: 2} com.unity.localization.settings: {fileID: 11400000, guid: b60ebf47fee797845ac53b5122978922, type: 2} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index eaa54de21c..0aa22c4b29 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -149,6 +149,8 @@ PlayerSettings: - {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} - {fileID: 11400000, guid: 97967903e9bd51b499aaa39639cc9bb2, type: 2} - {fileID: 11400000, guid: 71d1eb78bf0499946bccc4daad2531fa, type: 2} + - {fileID: 11400000, guid: b60ebf47fee797845ac53b5122978922, type: 2} + - {fileID: 11400000, guid: 7e95d9e343a711348b669c67be95eade, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1