1
0
forked from cgvr/DeltaVR

enable continuous movement by default, move config.json to game folder

This commit is contained in:
2026-01-27 17:25:33 +02:00
parent 24000ec80c
commit 15b92e92b4
7 changed files with 27 additions and 12 deletions

View File

@@ -399,7 +399,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &4260766096620860208 --- !u!224 &4260766096620860208
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1298,7 +1298,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!224 &5995638939731525439 --- !u!224 &5995638939731525439
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -8112,7 +8112,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8807789255226040880} m_GameObject: {fileID: 8807789255226040880}
m_Enabled: 0 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bf296fc962d7184ab14ad1841598d5f, type: 3} m_Script: {fileID: 11500000, guid: 0bf296fc962d7184ab14ad1841598d5f, type: 3}
m_Name: m_Name:

View File

@@ -19,7 +19,7 @@ public class ContinuoslocomotionConfigurator : MonoBehaviour
{ {
turnOnButton.onClick.AddListener(enableLocomotion); turnOnButton.onClick.AddListener(enableLocomotion);
turnOffButton.onClick.AddListener(disableLocomotion); turnOffButton.onClick.AddListener(disableLocomotion);
turnOffButton.gameObject.SetActive(false); turnOnButton.gameObject.SetActive(false);
} }
public void UpdateSpeed(float speed) public void UpdateSpeed(float speed)

View File

@@ -14,6 +14,7 @@ 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
@@ -60,9 +61,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4591f6805db240a4ca28e515091ca909, type: 3} m_Script: {fileID: 11500000, guid: 4591f6805db240a4ca28e515091ca909, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
INVOKEAI_BASE_URL: http://ltat-cgvr9.domenis.ut.ee:9090
DEFAULT_QUEUE_ID: default DEFAULT_QUEUE_ID: default
MODEL_KEY: 81d45960-08a0-4b8c-a48b-e7d73b21bfe2
promptSuffix: ', single object, front and side fully visible, realistic style, promptSuffix: ', single object, front and side fully visible, realistic style,
plain neutral background, clear details, soft studio lighting, true-to-scale' plain neutral background, clear details, soft studio lighting, true-to-scale'
--- !u!114 &2166102850012183631 --- !u!114 &2166102850012183631
@@ -77,7 +76,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 905247c726697644cbf0f39558db46bb, type: 3} m_Script: {fileID: 11500000, guid: 905247c726697644cbf0f39558db46bb, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
TRELLIS_BASE_URL: http://ltat-cgvr9.domenis.ut.ee:7960
--- !u!114 &8356602476881383464 --- !u!114 &8356602476881383464
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -131,3 +129,15 @@ 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:

View File

@@ -6,7 +6,7 @@ public class ConfigManager : MonoBehaviour
{ {
public GameConfig Config { get; private set; } public GameConfig Config { get; private set; }
public static ConfigManager Instance { get; private set; } public static ConfigManager Instance { get; private set; }
private static string configPath => Path.Combine(Application.persistentDataPath, "config.json"); public static string configPath = "config.json";
private void Awake() private void Awake()
{ {

View File

@@ -2,7 +2,7 @@
[System.Serializable] [System.Serializable]
public class GameConfig public class GameConfig
{ {
public string invokeAIUrl = "http://192.168.0.53:9090"; public string InvokeAIUrl = "http://192.168.0.53:9090";
public string invokeAIModelKey = "81d45960-08a0-4b8c-a48b-e7d73b21bfe2"; public string InvokeAIModelKey = "81d45960-08a0-4b8c-a48b-e7d73b21bfe2";
public string TrellisUrl = "http://192.168.0.53:7960"; public string TrellisUrl = "http://192.168.0.53:7960";
} }

View File

@@ -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.Config.InvokeAIUrl);
} }
// 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.Config.InvokeAIModelKey;
string refinedPrompt = prompt + promptSuffix; string refinedPrompt = prompt + promptSuffix;
JObject args = new JObject() JObject args = new JObject()
{ {

5
config.json Normal file
View File

@@ -0,0 +1,5 @@
{
"InvokeAIUrl": "http://192.168.0.53:9090",
"InvokeAIModelKey": "81d45960-08a0-4b8c-a48b-e7d73b21bfe2",
"TrellisUrl": "http://192.168.0.53:7960"
}