forked from cgvr/DeltaVR
fix problems from merging with upstream
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
### TODO
|
### 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
|
* võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box? ja kontrollida spawnimisel scale'i
|
||||||
* shape scanner:
|
* shape scanner:
|
||||||
* peenikesemad kiired
|
* peenikesemad kiired
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ public class ConfigManager : MonoBehaviour
|
|||||||
public float volumeSFX = 0.5f;
|
public float volumeSFX = 0.5f;
|
||||||
public float volumeUI = 0.5f;
|
public float volumeUI = 0.5f;
|
||||||
public float volumeVO = 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 Config currentConfig = new Config();
|
||||||
protected string configFileName = "config.json";
|
protected string configFileName = "config.json";
|
||||||
@@ -194,4 +196,19 @@ public class ConfigManager : MonoBehaviour
|
|||||||
currentConfig.volumeVO = voVolume;
|
currentConfig.volumeVO = voVolume;
|
||||||
SaveConfigToFile();
|
SaveConfigToFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetTrellisUrl()
|
||||||
|
{
|
||||||
|
return currentConfig.trellisUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetInvokeAiUrl()
|
||||||
|
{
|
||||||
|
return currentConfig.invokeAiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetInvokeAiModelKey()
|
||||||
|
{
|
||||||
|
return currentConfig.invokeAiModelKey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,8 +206,8 @@ MonoBehaviour:
|
|||||||
- Ulrich_Enjoy
|
- Ulrich_Enjoy
|
||||||
mouth: {fileID: 5759406807219530703}
|
mouth: {fileID: 5759406807219530703}
|
||||||
minScaleY: 1
|
minScaleY: 1
|
||||||
maxScaleY: 1.75
|
maxScaleY: 2
|
||||||
gain: 30
|
gain: 20
|
||||||
attack: 0.6
|
attack: 0.6
|
||||||
release: 0.2
|
release: 0.2
|
||||||
inverted: 0
|
inverted: 0
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ GameObject:
|
|||||||
- component: {fileID: 2166102850012183631}
|
- component: {fileID: 2166102850012183631}
|
||||||
- component: {fileID: 8356602476881383464}
|
- component: {fileID: 8356602476881383464}
|
||||||
- component: {fileID: 5682436338090300270}
|
- component: {fileID: 5682436338090300270}
|
||||||
- component: {fileID: 5910538061401192019}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: ModelGenerationManager
|
m_Name: ModelGenerationManager
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -129,15 +128,3 @@ MonoBehaviour:
|
|||||||
bufferLengthSec: 5
|
bufferLengthSec: 5
|
||||||
playLoopback: 0
|
playLoopback: 0
|
||||||
loopbackVolume: 1
|
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:
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6a9ed26713a3c4c4f8f6be3bbd4af5c7
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -31,7 +31,7 @@ public class InvokeAiClient : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Timeout = TimeSpan.FromSeconds(120)
|
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
|
// Update is called once per frame
|
||||||
@@ -516,7 +516,7 @@ public class InvokeAiClient : MonoBehaviour
|
|||||||
|
|
||||||
public async Task<byte[]> GenerateImage(string prompt)
|
public async Task<byte[]> GenerateImage(string prompt)
|
||||||
{
|
{
|
||||||
string modelKey = ConfigManager.Instance.Config.InvokeAIModelKey;
|
string modelKey = ConfigManager.instance.GetInvokeAiModelKey();
|
||||||
string refinedPrompt = prompt + promptSuffix;
|
string refinedPrompt = prompt + promptSuffix;
|
||||||
JObject args = new JObject()
|
JObject args = new JObject()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class TrellisClient : MonoBehaviour
|
|||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
httpClient = new HttpClient();
|
httpClient = new HttpClient();
|
||||||
httpClient.BaseAddress = new Uri(ConfigManager.Instance.Config.TrellisUrl);
|
httpClient.BaseAddress = new Uri(ConfigManager.instance.GetTrellisUrl());
|
||||||
TestConnection();
|
TestConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
14
config.json
14
config.json
@@ -1,5 +1,13 @@
|
|||||||
{
|
{
|
||||||
"InvokeAIUrl": "http://192.168.0.53:9090",
|
"isContinuousLocomotion": true,
|
||||||
"InvokeAIModelKey": "81d45960-08a0-4b8c-a48b-e7d73b21bfe2",
|
"continuousLocomotionSpeed": 3.0,
|
||||||
"TrellisUrl": "http://192.168.0.53:7960"
|
"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"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user