diff --git a/.json b/.json index cddd0108..0637a088 100644 --- a/.json +++ b/.json @@ -1,52 +1 @@ -[ - { - "prefabName": "RoboArm", - "modelName": "RoboArm_1", - "modelType": "Resource", - "modelID": "", - "nodeID": "", - "position": "(-2.93, 0.00, -16.20)", - "rotation": "(0.00000, 0.00000, 0.00000, 1.00000)", - "scale": "(1.00, 1.00, 1.00)" - }, - { - "prefabName": "RoboArm", - "modelName": "RoboArm_0", - "modelType": "Resource", - "modelID": "", - "nodeID": "", - "position": "(-0.12, 0.00, -9.08)", - "rotation": "(0.00000, 0.00000, 0.00000, 1.00000)", - "scale": "(1.00, 1.00, 1.00)" - }, - { - "prefabName": "AssemblyLine", - "modelName": "AssemblyLine_0", - "modelType": "Move", - "modelID": "", - "nodeID": "", - "position": "(1.99, 0.00, -18.60)", - "rotation": "(0.00000, 0.00000, 0.00000, 1.00000)", - "scale": "(1.00, 1.00, 1.00)" - }, - { - "prefabName": "ForkLift", - "modelName": "ForkLift_0", - "modelType": "Move", - "modelID": "", - "nodeID": "product_generator_0_47f91e67-41ad-434c-bb7f-e983c143a840", - "position": "(-3.44, 0.00, -11.70)", - "rotation": "(0.15745, -0.41944, -0.83088, -0.33002)", - "scale": "(1.00, 1.00, 1.00)" - }, - { - "prefabName": "Pallet", - "modelName": "Pallet_0", - "modelType": "Source", - "modelID": "", - "nodeID": "", - "position": "(-1.52, 0.00, -17.98)", - "rotation": "(0.00000, 0.00000, 0.00000, 1.00000)", - "scale": "(1.00, 1.00, 1.00)" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/Assets/Prefabs/LogicPrefab.prefab b/Assets/Prefabs/LogicPrefab.prefab index 3069bd25..3817b317 100644 --- a/Assets/Prefabs/LogicPrefab.prefab +++ b/Assets/Prefabs/LogicPrefab.prefab @@ -92,8 +92,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 18 + m_fontSizeBase: 18 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 diff --git a/Assets/WorkSpace/LH/MQTTManager.cs b/Assets/WorkSpace/LH/MQTTManager.cs index 62dd97b3..5baea5fc 100644 --- a/Assets/WorkSpace/LH/MQTTManager.cs +++ b/Assets/WorkSpace/LH/MQTTManager.cs @@ -45,10 +45,11 @@ namespace Octopus.Simulator.Networks void Awake() { mqttManager = this; - FindAnyObjectByType().onMqttConfigReceived += SetMqttConfig; + //FindAnyObjectByType().onMqttConfigReceived += SetMqttConfig; + SetMqttConfig(); } - public void SetMqttConfig(string json) + public void SetMqttConfig() { /* string path = Application.streamingAssetsPath + MQTTpath; @@ -56,11 +57,10 @@ namespace Octopus.Simulator.Networks using (StreamReader reader = new StreamReader(path)) { json = reader.ReadToEnd(); - } + } */ TextAsset json = Resources.Load(MQTTpath); Debug.Log(json.text); - */ - MQTTConfigList ConfigList = JsonConvert.DeserializeObject(json); + MQTTConfigList ConfigList = JsonConvert.DeserializeObject(json.text); var config = ConfigList.configs[0]; string clientName = config.name; string host = config.host; diff --git a/Assets/WorkSpace/LH/WebManager.cs b/Assets/WorkSpace/LH/WebManager.cs index 73d21fba..d498d0c0 100644 --- a/Assets/WorkSpace/LH/WebManager.cs +++ b/Assets/WorkSpace/LH/WebManager.cs @@ -32,12 +32,12 @@ namespace Octopus.Simulator.Networks void Awake() { webManager = this; - FindAnyObjectByType().onWebConfigReceived += SetWebConfig; - //SetWebConfig(); + //FindAnyObjectByType().onWebConfigReceived += SetWebConfig; + SetWebConfig(); SetApiConfig(); } - private void SetWebConfig(string json) + private void SetWebConfig() { /* string path = Application.streamingAssetsPath + WebPath; @@ -46,9 +46,10 @@ namespace Octopus.Simulator.Networks { json = reader.ReadToEnd(); } - var json = Resources.Load(WebPath) */ - WebConfigList ConfigList = JsonConvert.DeserializeObject(json); + var json = Resources.Load(WebPath); + + WebConfigList ConfigList = JsonConvert.DeserializeObject(json.text); var config = ConfigList.configs[0]; host = config.host; Debug.Log($"host:{host}"); diff --git a/Assets/WorkSpace/LH/WebReceiver.cs b/Assets/WorkSpace/LH/WebReceiver.cs index a56dec38..045a4a4a 100644 --- a/Assets/WorkSpace/LH/WebReceiver.cs +++ b/Assets/WorkSpace/LH/WebReceiver.cs @@ -15,16 +15,17 @@ public class WebReceiver : MonoBehaviour public void Start() { - Application.ExternalCall("loadingComplete"); /* + Application.ExternalCall("loadingComplete"); + */ config.projectId = "17"; //config.simulationId = "15"; config.logicId = "25"; WebParameters.config = config; - //onParameterRecived += FindAnyObjectByType().RequestInfo; - //onParameterRecived += FindAnyObjectByType().RequestInfo; + onParameterRecived += FindAnyObjectByType().RequestInfo; + onParameterRecived += FindAnyObjectByType().RequestInfo; onParameterRecived?.Invoke(); - */ + } public void ReceiveWebParameterJson(string json)