1
0
forked from cgvr/DeltaVR

fix problems from merging with upstream

This commit is contained in:
2026-02-07 12:29:59 +02:00
parent b1d5b73df4
commit 0fbfaed5c3
12 changed files with 40 additions and 79 deletions

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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:

View File

@@ -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<GameConfig>(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);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6a9ed26713a3c4c4f8f6be3bbd4af5c7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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<byte[]> GenerateImage(string prompt)
{
string modelKey = ConfigManager.Instance.Config.InvokeAIModelKey;
string modelKey = ConfigManager.instance.GetInvokeAiModelKey();
string refinedPrompt = prompt + promptSuffix;
JObject args = new JObject()
{

View File

@@ -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();
}

Binary file not shown.

View File

@@ -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"
}