From 0fbfaed5c32c726fce779914b9706bb3a591415f Mon Sep 17 00:00:00 2001 From: henrisel Date: Sat, 7 Feb 2026 12:29:59 +0200 Subject: [PATCH] fix problems from merging with upstream --- 3d-generation-pipeline/README.md | 1 - Assets/_PROJECT/Managers/ConfigManager.cs | 19 ++++++++- .../Characters/CafeWaiterNPC.prefab | 4 +- .../ModelGenerationManager.prefab | 13 ------- .../_PROJECT/Scenes/DeltaBuilding_base.unity | 4 +- .../Scenes/DeltaBuilding_base_copy_3.unity | 4 +- .../Scripts/ModeGeneration/ConfigManager.cs | 39 ------------------- .../ModeGeneration/ConfigManager.cs.meta | 11 ------ .../Scripts/ModeGeneration/InvokeAiClient.cs | 4 +- .../Scripts/ModeGeneration/TrellisClient.cs | 2 +- ProjectSettings/ProjectSettings.asset | 4 +- config.json | 14 +++++-- 12 files changed, 40 insertions(+), 79 deletions(-) delete mode 100644 Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs delete mode 100644 Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs.meta diff --git a/3d-generation-pipeline/README.md b/3d-generation-pipeline/README.md index 60d84f30..68352287 100644 --- a/3d-generation-pipeline/README.md +++ b/3d-generation-pipeline/README.md @@ -1,5 +1,4 @@ ### TODO -* user flow: grab item? mida krabada - Raimond ise parandas, mergeda vaja * võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box? ja kontrollida spawnimisel scale'i * shape scanner: * peenikesemad kiired diff --git a/Assets/_PROJECT/Managers/ConfigManager.cs b/Assets/_PROJECT/Managers/ConfigManager.cs index f381aad5..dd081ca8 100644 --- a/Assets/_PROJECT/Managers/ConfigManager.cs +++ b/Assets/_PROJECT/Managers/ConfigManager.cs @@ -22,7 +22,9 @@ public class ConfigManager : MonoBehaviour public float volumeSFX = 0.5f; public float volumeUI = 0.5f; public float volumeVO = 0.5f; - + public string trellisUrl = "http://192.168.0.53:7960"; + public string invokeAiUrl = "http://192.168.0.53:9090"; + public string invokeAiModelKey = "81d45960-08a0-4b8c-a48b-e7d73b21bfe2"; } protected Config currentConfig = new Config(); protected string configFileName = "config.json"; @@ -194,4 +196,19 @@ public class ConfigManager : MonoBehaviour currentConfig.volumeVO = voVolume; SaveConfigToFile(); } + + public string GetTrellisUrl() + { + return currentConfig.trellisUrl; + } + + public string GetInvokeAiUrl() + { + return currentConfig.invokeAiUrl; + } + + public string GetInvokeAiModelKey() + { + return currentConfig.invokeAiModelKey; + } } diff --git a/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/CafeWaiterNPC.prefab b/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/CafeWaiterNPC.prefab index 700f485e..98aeb7eb 100644 --- a/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/CafeWaiterNPC.prefab +++ b/Assets/_PROJECT/Prefabs/ModelGeneration/Characters/CafeWaiterNPC.prefab @@ -206,8 +206,8 @@ MonoBehaviour: - Ulrich_Enjoy mouth: {fileID: 5759406807219530703} minScaleY: 1 - maxScaleY: 1.75 - gain: 30 + maxScaleY: 2 + gain: 20 attack: 0.6 release: 0.2 inverted: 0 diff --git a/Assets/_PROJECT/Prefabs/ModelGeneration/ModelGenerationManager.prefab b/Assets/_PROJECT/Prefabs/ModelGeneration/ModelGenerationManager.prefab index e2b728a8..ff6a9ea3 100644 --- a/Assets/_PROJECT/Prefabs/ModelGeneration/ModelGenerationManager.prefab +++ b/Assets/_PROJECT/Prefabs/ModelGeneration/ModelGenerationManager.prefab @@ -14,7 +14,6 @@ GameObject: - component: {fileID: 2166102850012183631} - component: {fileID: 8356602476881383464} - component: {fileID: 5682436338090300270} - - component: {fileID: 5910538061401192019} m_Layer: 0 m_Name: ModelGenerationManager m_TagString: Untagged @@ -129,15 +128,3 @@ MonoBehaviour: bufferLengthSec: 5 playLoopback: 0 loopbackVolume: 1 ---- !u!114 &5910538061401192019 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 154411548685861447} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6a9ed26713a3c4c4f8f6be3bbd4af5c7, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity index a40e9a42..be9185d6 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8799aca32fa5ae94a742b87cafd57e14ce90284df9ff284c01473a806693fe8c -size 67155511 +oid sha256:e42217f83506d8b984240966747e21bfe9fbe0cae2f6c9ed7921b32acacb9a85 +size 67952713 diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base_copy_3.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base_copy_3.unity index 56ff1803..0137c334 100644 --- a/Assets/_PROJECT/Scenes/DeltaBuilding_base_copy_3.unity +++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base_copy_3.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88452fa038920e35be6bc7c4b9a0d38537540470bbd4e740bfc05d57285e7d6b -size 67960216 +oid sha256:6809573b1b7664c8162bb60de611a01ffcfc60fdcf4667140663018819dd9c1f +size 67959429 diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs deleted file mode 100644 index 93409ed1..00000000 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs +++ /dev/null @@ -1,39 +0,0 @@ - -using System.IO; -using UnityEngine; - -public class ConfigManager : MonoBehaviour -{ - public GameConfig Config { get; private set; } - public static ConfigManager Instance { get; private set; } - public static string configPath = "config.json"; - - private void Awake() - { - Instance = this; - LoadConfig(); - } - - public void LoadConfig() - { - if (File.Exists(configPath)) - { - string json = File.ReadAllText(configPath); - Config = JsonUtility.FromJson(json); - } - else - { - // Create config with default values - Config = new GameConfig(); - SaveConfig(); - } - - Debug.Log("Loaded config from: " + configPath); - } - - public void SaveConfig() - { - string json = JsonUtility.ToJson(Config, true); - File.WriteAllText(configPath, json); - } -} diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs.meta b/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs.meta deleted file mode 100644 index 36af2031..00000000 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ConfigManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6a9ed26713a3c4c4f8f6be3bbd4af5c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/InvokeAiClient.cs b/Assets/_PROJECT/Scripts/ModeGeneration/InvokeAiClient.cs index 5d88699a..9b733d4e 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/InvokeAiClient.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/InvokeAiClient.cs @@ -31,7 +31,7 @@ public class InvokeAiClient : MonoBehaviour { Timeout = TimeSpan.FromSeconds(120) }; - httpClient.BaseAddress = new Uri(ConfigManager.Instance.Config.InvokeAIUrl); + httpClient.BaseAddress = new Uri(ConfigManager.instance.GetInvokeAiUrl()); } // Update is called once per frame @@ -516,7 +516,7 @@ public class InvokeAiClient : MonoBehaviour public async Task GenerateImage(string prompt) { - string modelKey = ConfigManager.Instance.Config.InvokeAIModelKey; + string modelKey = ConfigManager.instance.GetInvokeAiModelKey(); string refinedPrompt = prompt + promptSuffix; JObject args = new JObject() { diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/TrellisClient.cs b/Assets/_PROJECT/Scripts/ModeGeneration/TrellisClient.cs index 14e1d974..90810c17 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/TrellisClient.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/TrellisClient.cs @@ -20,7 +20,7 @@ public class TrellisClient : MonoBehaviour void Start() { httpClient = new HttpClient(); - httpClient.BaseAddress = new Uri(ConfigManager.Instance.Config.TrellisUrl); + httpClient.BaseAddress = new Uri(ConfigManager.instance.GetTrellisUrl()); TestConnection(); } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b4226025..558f4158 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc5837b7d78adf751b2a4c72e0dd92059a0ca287b175b10c8b287e9d66e77095 -size 26399 +oid sha256:7d0812577ef673b87b04aba8d878bfe8a84068278b9368bcbe0700a93d87ad50 +size 26527 diff --git a/config.json b/config.json index a7a6e9d0..539fafd4 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,13 @@ { - "InvokeAIUrl": "http://192.168.0.53:9090", - "InvokeAIModelKey": "81d45960-08a0-4b8c-a48b-e7d73b21bfe2", - "TrellisUrl": "http://192.168.0.53:7960" + "isContinuousLocomotion": true, + "continuousLocomotionSpeed": 3.0, + "volumeMaster": 0.5, + "volumeAmbient": 0.5, + "volumeMusic": 0.5, + "volumeSFX": 0.5, + "volumeUI": 0.5, + "volumeVO": 0.5, + "trellisUrl": "http://192.168.0.53:7960", + "invokeAiUrl": "http://192.168.0.53:9090", + "invokeAiModelKey": "81d45960-08a0-4b8c-a48b-e7d73b21bfe2" } \ No newline at end of file