Merge remote-tracking branch 'origin/main' into lwj/250528
This commit is contained in:
@@ -8,17 +8,18 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Floor
|
||||
m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
m_ValidKeywords:
|
||||
- _SPECULAR_SETUP
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
@@ -102,6 +103,7 @@ Material:
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
@@ -112,11 +114,12 @@ Material:
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.12156863, g: 0.12156863, b: 0.12156863, a: 1}
|
||||
- _Color: {r: 0.12156858, g: 0.12156858, b: 0.12156858, a: 1}
|
||||
- _BaseColor: {r: 0.8509804, g: 0.8509804, b: 0.8509804, a: 1}
|
||||
- _Color: {r: 0.8509804, g: 0.8509804, b: 0.8509804, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@@ -4293,7 +4293,7 @@ MonoBehaviour:
|
||||
_lookAndFeel:
|
||||
_canBeDisplayed: 1
|
||||
_isExpanded: 1
|
||||
_lineColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
_lineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
_useCellFading: 1
|
||||
--- !u!1 &1025518476
|
||||
GameObject:
|
||||
@@ -4646,7 +4646,7 @@ Camera:
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.122641504, g: 0.122641504, b: 0.122641504, a: 0}
|
||||
m_BackGroundColor: {r: 0.50980395, g: 0.50980395, b: 0.50980395, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
@@ -6980,63 +6980,6 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 3512657831314021627, guid: bc16ce627450b4a46a0bfdbe5fd69f94, type: 3}
|
||||
m_PrefabInstance: {fileID: 8413769712500345996}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &9032098431777052662
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4254295359314170937, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Scale
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.05
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8343011834244770855, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d09278052aef6aa47834b45cd048cce1, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7049,5 +6992,4 @@ SceneRoots:
|
||||
- {fileID: 1025518480}
|
||||
- {fileID: 594906197750746389}
|
||||
- {fileID: 352453666}
|
||||
- {fileID: 9032098431777052662}
|
||||
- {fileID: 1251266451}
|
||||
|
||||
@@ -33,28 +33,28 @@ MonoBehaviour:
|
||||
m_Settings:
|
||||
m_SettingsList:
|
||||
m_List:
|
||||
- rid: 1324587790643495006
|
||||
- rid: 1324587790643495007
|
||||
- rid: 1324587790643495113
|
||||
- rid: 1324587790643495114
|
||||
- rid: 6852985685364965378
|
||||
- rid: 6852985685364965379
|
||||
- rid: 6852985685364965380
|
||||
- rid: 6852985685364965381
|
||||
- rid: 1324587790643495008
|
||||
- rid: 1324587790643495009
|
||||
- rid: 1324587790643495115
|
||||
- rid: 1324587790643495116
|
||||
- rid: 6852985685364965384
|
||||
- rid: 6852985685364965385
|
||||
- rid: 1324587790643495010
|
||||
- rid: 1324587790643495011
|
||||
- rid: 1324587790643495012
|
||||
- rid: 1324587790643495013
|
||||
- rid: 1324587790643495014
|
||||
- rid: 1324587790643495015
|
||||
- rid: 1324587790643495117
|
||||
- rid: 1324587790643495118
|
||||
- rid: 1324587790643495119
|
||||
- rid: 1324587790643495120
|
||||
- rid: 1324587790643495121
|
||||
- rid: 1324587790643495122
|
||||
- rid: 6852985685364965392
|
||||
- rid: 1324587790643495016
|
||||
- rid: 1324587790643495123
|
||||
- rid: 6852985685364965394
|
||||
- rid: 8712630790384254976
|
||||
- rid: 5092397466944798720
|
||||
- rid: 1324587790643495017
|
||||
- rid: 1324587790643495124
|
||||
m_RuntimeSettings:
|
||||
m_List:
|
||||
- rid: 6852985685364965378
|
||||
@@ -97,14 +97,14 @@ MonoBehaviour:
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 1324587790643495006
|
||||
- rid: 1324587790643495113
|
||||
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
m_StripUnusedPostProcessingVariants: 1
|
||||
m_StripUnusedVariants: 1
|
||||
m_StripScreenCoordOverrideVariants: 1
|
||||
- rid: 1324587790643495007
|
||||
- rid: 1324587790643495114
|
||||
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
|
||||
@@ -116,7 +116,7 @@ MonoBehaviour:
|
||||
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
|
||||
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
|
||||
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
|
||||
- rid: 1324587790643495008
|
||||
- rid: 1324587790643495115
|
||||
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
@@ -131,7 +131,7 @@ MonoBehaviour:
|
||||
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
|
||||
- rid: 1324587790643495009
|
||||
- rid: 1324587790643495116
|
||||
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||
@@ -140,7 +140,7 @@ MonoBehaviour:
|
||||
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
|
||||
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
|
||||
m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
- rid: 1324587790643495010
|
||||
- rid: 1324587790643495117
|
||||
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
@@ -153,13 +153,13 @@ MonoBehaviour:
|
||||
m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3}
|
||||
m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3}
|
||||
m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3}
|
||||
- rid: 1324587790643495011
|
||||
- rid: 1324587790643495118
|
||||
type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
|
||||
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
|
||||
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
|
||||
- rid: 1324587790643495012
|
||||
- rid: 1324587790643495119
|
||||
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
@@ -172,12 +172,12 @@ MonoBehaviour:
|
||||
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
|
||||
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
|
||||
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
|
||||
- rid: 1324587790643495013
|
||||
- rid: 1324587790643495120
|
||||
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
m_ProbeVolumeDisableStreamingAssets: 0
|
||||
- rid: 1324587790643495014
|
||||
- rid: 1324587790643495121
|
||||
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
@@ -187,21 +187,21 @@ MonoBehaviour:
|
||||
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
|
||||
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
|
||||
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
|
||||
- rid: 1324587790643495015
|
||||
- rid: 1324587790643495122
|
||||
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_version: 0
|
||||
m_IncludeReferencedInScenes: 0
|
||||
m_IncludeAssetsByLabel: 0
|
||||
m_LabelToInclude:
|
||||
- rid: 1324587790643495016
|
||||
- rid: 1324587790643495123
|
||||
type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3}
|
||||
probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3}
|
||||
probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3}
|
||||
- rid: 1324587790643495017
|
||||
- rid: 1324587790643495124
|
||||
type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Octopus.Simulator
|
||||
panelConnectedObject.gameObject.SetActive(false);
|
||||
panelPlacedObject.gameObject.SetActive(false);
|
||||
LogicWindow.gameObject.SetActive(false);
|
||||
//FindAnyObjectByType<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
FindAnyObjectByType<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
FindAnyObjectByType<MQTTManager>().onLogicUpdated += RequestInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Octopus.Simulator
|
||||
[Serializable]
|
||||
public class LogicInfo
|
||||
{
|
||||
public int status;
|
||||
public int? status=0;
|
||||
public string code;
|
||||
public string message;
|
||||
public LogicData data = new LogicData();
|
||||
@@ -22,7 +22,7 @@ namespace Octopus.Simulator
|
||||
[Serializable]
|
||||
public class SimulatorPostClass
|
||||
{
|
||||
public int status;
|
||||
public int? status=0;
|
||||
public string code;
|
||||
public string message;
|
||||
public SimulationData data = new SimulationData();
|
||||
@@ -33,7 +33,7 @@ namespace Octopus.Simulator
|
||||
[Serializable]
|
||||
public class SimulatorGetClass
|
||||
{
|
||||
public int status;
|
||||
public int? status=0;
|
||||
public string code;
|
||||
public string message;
|
||||
public SimulatorGetData data = new SimulatorGetData();
|
||||
@@ -56,10 +56,10 @@ namespace Octopus.Simulator
|
||||
[Serializable]
|
||||
public class LogicData
|
||||
{
|
||||
public int id;
|
||||
public int projectId;
|
||||
public int? id=0;
|
||||
public int? projectId=0;
|
||||
//public int logicId;
|
||||
public int userId;
|
||||
public int? userId=0;
|
||||
public string name;
|
||||
public string simulationCode;
|
||||
public logicData data;
|
||||
@@ -86,7 +86,7 @@ namespace Octopus.Simulator
|
||||
[SerializeReference]
|
||||
[JsonConverter(typeof(ComponentsConverter))]
|
||||
public List<ILogicComponent> components;
|
||||
public int simulation_time;
|
||||
public int? simulation_time=0;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
@@ -97,16 +97,16 @@ namespace Octopus.Simulator
|
||||
[Serializable]
|
||||
public class SimulationParameters
|
||||
{
|
||||
public int speed;
|
||||
public int duration;
|
||||
public int? speed=0;
|
||||
public int? duration=0;
|
||||
public bool real_time;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class HistoryParameters
|
||||
{
|
||||
public int projectId;
|
||||
public int logicId;
|
||||
public int? projectId=0;
|
||||
public int? logicId=0;
|
||||
public string logicData;
|
||||
public string name;
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace Octopus.Simulator.Networks
|
||||
void Awake()
|
||||
{
|
||||
mqttManager = this;
|
||||
SetMqttConfig();
|
||||
FindAnyObjectByType<WebReceiver>().onMqttConfigReceived += SetMqttConfig;
|
||||
}
|
||||
|
||||
private void SetMqttConfig()
|
||||
public void SetMqttConfig(string json)
|
||||
{
|
||||
/*
|
||||
string path = Application.streamingAssetsPath + MQTTpath;
|
||||
@@ -57,13 +57,14 @@ namespace Octopus.Simulator.Networks
|
||||
{
|
||||
json = reader.ReadToEnd();
|
||||
}
|
||||
*/
|
||||
TextAsset json = Resources.Load<TextAsset>(MQTTpath);
|
||||
Debug.Log(json.text);
|
||||
MQTTConfigList ConfigList = JsonConvert.DeserializeObject<MQTTConfigList>(json.text);
|
||||
*/
|
||||
MQTTConfigList ConfigList = JsonConvert.DeserializeObject<MQTTConfigList>(json);
|
||||
var config = ConfigList.configs[0];
|
||||
string clientName = config.name;
|
||||
string host = config.host;
|
||||
Debug.Log($"client:{host}");
|
||||
int port = config.port;
|
||||
|
||||
Connect(clientName, host, port);
|
||||
@@ -123,6 +124,7 @@ namespace Octopus.Simulator.Networks
|
||||
private void OnMessage(MQTTClient client, SubscriptionTopic topic, string topicName, ApplicationMessage message)
|
||||
{
|
||||
var payload = Encoding.UTF8.GetString(message.Payload.Data, message.Payload.Offset, message.Payload.Count);
|
||||
Debug.Log(payload);
|
||||
if (payload.Contains("component_id"))
|
||||
{
|
||||
basemessage = JsonConvert.DeserializeObject<BaseSimulationMessage>(payload);
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ProjectDataManager : MonoBehaviour
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
//FindAnyObjectByType<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
FindAnyObjectByType<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
projectMenuButton.onClick.AddListener(SetActive);
|
||||
}
|
||||
public void RequestInfo()
|
||||
|
||||
@@ -32,11 +32,12 @@ namespace Octopus.Simulator.Networks
|
||||
void Awake()
|
||||
{
|
||||
webManager = this;
|
||||
SetWebConfig();
|
||||
SetApiConfig();
|
||||
FindAnyObjectByType<WebReceiver>().onWebConfigReceived += SetWebConfig;
|
||||
//SetWebConfig();
|
||||
SetApiConfig();
|
||||
}
|
||||
|
||||
private void SetWebConfig()
|
||||
private void SetWebConfig(string json)
|
||||
{
|
||||
/*
|
||||
string path = Application.streamingAssetsPath + WebPath;
|
||||
@@ -45,11 +46,12 @@ namespace Octopus.Simulator.Networks
|
||||
{
|
||||
json = reader.ReadToEnd();
|
||||
}
|
||||
var json = Resources.Load<TextAsset>(WebPath)
|
||||
*/
|
||||
var json = Resources.Load<TextAsset>(WebPath);
|
||||
WebConfigList ConfigList = JsonConvert.DeserializeObject<WebConfigList>(json.text);
|
||||
WebConfigList ConfigList = JsonConvert.DeserializeObject<WebConfigList>(json);
|
||||
var config = ConfigList.configs[0];
|
||||
host = config.host;
|
||||
Debug.Log($"host:{host}");
|
||||
port = config.port;
|
||||
token = config.accessToken;
|
||||
http = $"{host}:{port}";
|
||||
|
||||
@@ -4,20 +4,27 @@ using System;
|
||||
using TMPro;
|
||||
using Octopus.Simulator.Networks;
|
||||
using Octopus.Simulator;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class WebReceiver : MonoBehaviour
|
||||
{
|
||||
public SimulatorConfig config;
|
||||
public event Action onParameterRecived;
|
||||
public event Action<string> onMqttConfigReceived;
|
||||
public event Action<string> onWebConfigReceived;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Application.ExternalCall("loadingComplete");
|
||||
/*
|
||||
config.projectId = "17";
|
||||
//config.simulationId = "15";
|
||||
config.logicId = "25";
|
||||
WebParameters.config = config;
|
||||
onParameterRecived += FindAnyObjectByType<ProjectDataManager>().RequestInfo;
|
||||
onParameterRecived += FindAnyObjectByType<LogicDataManager>().RequestInfo;
|
||||
//onParameterRecived += FindAnyObjectByType<ProjectDataManager>().RequestInfo;
|
||||
//onParameterRecived += FindAnyObjectByType<LogicDataManager>().RequestInfo;
|
||||
onParameterRecived?.Invoke();
|
||||
*/
|
||||
}
|
||||
|
||||
public void ReceiveWebParameterJson(string json)
|
||||
@@ -25,5 +32,18 @@ public class WebReceiver : MonoBehaviour
|
||||
config = JsonConvert.DeserializeObject<SimulatorConfig>(json);
|
||||
WebParameters.config = config;
|
||||
onParameterRecived?.Invoke();
|
||||
Debug.Log($"webparam:{json}");
|
||||
}
|
||||
|
||||
public void ReceiveMQTTConfigJson(string json)
|
||||
{
|
||||
onMqttConfigReceived?.Invoke(json);
|
||||
Debug.Log($"mqttconfig:{json}");
|
||||
}
|
||||
|
||||
public void ReceiveWebConfigJson(string json)
|
||||
{
|
||||
onWebConfigReceived?.Invoke(json);
|
||||
Debug.Log($"webconfig:{json}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user