From c9b7f7e3df666ac5f516e13b05e913e8885e8702 Mon Sep 17 00:00:00 2001 From: UVCLimHun Date: Wed, 28 May 2025 13:54:59 +0900 Subject: [PATCH] refresh --- Assets/Resources/MQTTConfig.json | 2 + Assets/Resources/WebConfig.json | 2 + Assets/Scenes/Simulation_0.0.1.unity | 21 +++++++- Assets/Scripts/Manager/DataManager.cs | 6 +-- ...niversalRenderPipelineGlobalSettings.asset | 48 +++++++++---------- .../LH/LogicData/LogicDataManager.cs | 5 +- .../LH/LogicData/Panel_PlacedObject.cs | 2 +- Assets/WorkSpace/LH/ProjectDataManager.cs | 5 +- Assets/WorkSpace/LH/WebReceiver.cs | 7 ++- 9 files changed, 63 insertions(+), 35 deletions(-) diff --git a/Assets/Resources/MQTTConfig.json b/Assets/Resources/MQTTConfig.json index 69f89d85..5655d6f6 100644 --- a/Assets/Resources/MQTTConfig.json +++ b/Assets/Resources/MQTTConfig.json @@ -4,6 +4,8 @@ "name": "main", "host": "220.90.135.42", "port": 3016 + //"host": "localhost", + //"port": 9001 } ] } \ No newline at end of file diff --git a/Assets/Resources/WebConfig.json b/Assets/Resources/WebConfig.json index f1fc11db..a6d26928 100644 --- a/Assets/Resources/WebConfig.json +++ b/Assets/Resources/WebConfig.json @@ -2,8 +2,10 @@ "configs": [ { "host": "http://220.90.135.42", + //"port": 3000, "port": 3037, "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcmlkIjoic3lzdGVtIiwibmFtZSI6IuyLnOyKpO2FnOq0gOumrOyekCIsImF1dGgiOiJzeXN0ZW0iLCJjb21wYW55SWQiOm51bGwsImlhdCI6MTczNTYwOTgyOCwiZXhwIjoxNzcxNjA5ODI4fQ.ApXLL_RsWWaa2KwRKrg1z8iT9MNYdZFqN-6Mn1Lvq8Q" + //"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcmlkIjoic3lzdGVtIiwibmFtZSI6IuyLnOyKpO2FnOq0gOumrOyekCIsImF1dGgiOiJzeXN0ZW0iLCJjb21wYW55SWQiOm51bGwsImlhdCI6MTc0ODM5NjM4MSwiZXhwIjoxNzg0Mzk2MzgxfQ.CfkXRWx-JvQKop0RiYYoQoYRpfm7LiiKp0xdhUfRFM4" } ] } \ No newline at end of file diff --git a/Assets/Scenes/Simulation_0.0.1.unity b/Assets/Scenes/Simulation_0.0.1.unity index 6cdd73df..ca57a86e 100644 --- a/Assets/Scenes/Simulation_0.0.1.unity +++ b/Assets/Scenes/Simulation_0.0.1.unity @@ -4404,6 +4404,17 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1237304820 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4739726380097546759, guid: 6c1ed824d30fe8848957d865919227a0, type: 3} + m_PrefabInstance: {fileID: 594906197750746389} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 766d9cdfba5257c4b9beedbfbc5f5d4a, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1251266449 GameObject: m_ObjectHideFlags: 0 @@ -5026,6 +5037,10 @@ PrefabInstance: propertyPath: menuPanel value: objectReference: {fileID: 518271856} + - target: {fileID: 3408166986665272114, guid: 6c1ed824d30fe8848957d865919227a0, type: 3} + propertyPath: webReceiver + value: + objectReference: {fileID: 1237304820} - target: {fileID: 3408166986665272114, guid: 6c1ed824d30fe8848957d865919227a0, type: 3} propertyPath: projectMenuButton value: @@ -5078,6 +5093,10 @@ PrefabInstance: propertyPath: LogicWindow value: objectReference: {fileID: 80690333} + - target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3} + propertyPath: webReceiver + value: + objectReference: {fileID: 1237304820} - target: {fileID: 6191105916327120908, guid: 6c1ed824d30fe8848957d865919227a0, type: 3} propertyPath: LogicContent value: @@ -5257,7 +5276,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7723225891300246667, guid: 91b280356e2a9674aac91102f2da87f8, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 8125092819254148577, guid: 91b280356e2a9674aac91102f2da87f8, type: 3} propertyPath: m_IsActive diff --git a/Assets/Scripts/Manager/DataManager.cs b/Assets/Scripts/Manager/DataManager.cs index 2a9c7406..33fd66f4 100644 --- a/Assets/Scripts/Manager/DataManager.cs +++ b/Assets/Scripts/Manager/DataManager.cs @@ -7,7 +7,7 @@ public class DataManager : UnitySingleton public bool isPlaying = false; List models = new List(); - public event Action onModelsUpdated; + public event Action> onModelsUpdated; public void AddModel(SimulationModel model) { if (models.Any(x => x == model)) @@ -15,14 +15,14 @@ public class DataManager : UnitySingleton int objCount = models.FindAll(x => x.modelName.Contains(model.modelName)).Count; model.modelName = model.modelName + "_" + objCount.ToString(); models.Add(model); - onModelsUpdated?.Invoke(); + onModelsUpdated?.Invoke(models); } public void RemoveModel(SimulationModel model) { if (models.Any(x => x == model)) return; models.Remove(model); - onModelsUpdated?.Invoke(); + onModelsUpdated?.Invoke(models); } public List GetModels() diff --git a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset index d4f1fb80..6f89a7d8 100644 --- a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset @@ -33,28 +33,28 @@ MonoBehaviour: m_Settings: m_SettingsList: m_List: - - rid: 1324587768260329563 - - rid: 1324587768260329564 + - rid: 1324587790643495006 + - rid: 1324587790643495007 - rid: 6852985685364965378 - rid: 6852985685364965379 - rid: 6852985685364965380 - rid: 6852985685364965381 - - rid: 1324587768260329565 - - rid: 1324587768260329566 + - rid: 1324587790643495008 + - rid: 1324587790643495009 - rid: 6852985685364965384 - rid: 6852985685364965385 - - rid: 1324587768260329567 - - rid: 1324587768260329568 - - rid: 1324587768260329569 - - rid: 1324587768260329570 - - rid: 1324587768260329571 - - rid: 1324587768260329572 + - rid: 1324587790643495010 + - rid: 1324587790643495011 + - rid: 1324587790643495012 + - rid: 1324587790643495013 + - rid: 1324587790643495014 + - rid: 1324587790643495015 - rid: 6852985685364965392 - - rid: 1324587768260329573 + - rid: 1324587790643495016 - rid: 6852985685364965394 - rid: 8712630790384254976 - rid: 5092397466944798720 - - rid: 1324587768260329574 + - rid: 1324587790643495017 m_RuntimeSettings: m_List: - rid: 6852985685364965378 @@ -97,14 +97,14 @@ MonoBehaviour: references: version: 2 RefIds: - - rid: 1324587768260329563 + - rid: 1324587790643495006 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: 1324587768260329564 + - rid: 1324587790643495007 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: 1324587768260329565 + - rid: 1324587790643495008 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: 1324587768260329566 + - rid: 1324587790643495009 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: 1324587768260329567 + - rid: 1324587790643495010 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: 1324587768260329568 + - rid: 1324587790643495011 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: 1324587768260329569 + - rid: 1324587790643495012 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: 1324587768260329570 + - rid: 1324587790643495013 type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 m_ProbeVolumeDisableStreamingAssets: 0 - - rid: 1324587768260329571 + - rid: 1324587790643495014 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: 1324587768260329572 + - rid: 1324587790643495015 type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_version: 0 m_IncludeReferencedInScenes: 0 m_IncludeAssetsByLabel: 0 m_LabelToInclude: - - rid: 1324587768260329573 + - rid: 1324587790643495016 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: 1324587768260329574 + - rid: 1324587790643495017 type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2} diff --git a/Assets/WorkSpace/LH/LogicData/LogicDataManager.cs b/Assets/WorkSpace/LH/LogicData/LogicDataManager.cs index 260a7ad3..fe84165c 100644 --- a/Assets/WorkSpace/LH/LogicData/LogicDataManager.cs +++ b/Assets/WorkSpace/LH/LogicData/LogicDataManager.cs @@ -54,7 +54,7 @@ namespace Octopus.Simulator panelConnectedObject.gameObject.SetActive(false); panelPlacedObject.gameObject.SetActive(false); LogicWindow.gameObject.SetActive(false); - FindAnyObjectByType().onParameterRecived += RequestInfo; + //FindAnyObjectByType().onParameterRecived += RequestInfo; } void ClearLogicBTN() @@ -72,8 +72,9 @@ namespace Octopus.Simulator onLogicDeSelected?.Invoke(); } - void RequestInfo(SimulatorConfig config) + public void RequestInfo(SimulatorConfig config) { + Debug.Log("asdf"); ClearLogicBTN(); WebManager.webManager.Request_Get($"{WebManager.webManager.apiConfig.logic}/{WebParameters.config.logicId}", (flag, value) => { diff --git a/Assets/WorkSpace/LH/LogicData/Panel_PlacedObject.cs b/Assets/WorkSpace/LH/LogicData/Panel_PlacedObject.cs index ce8a1d17..63e19953 100644 --- a/Assets/WorkSpace/LH/LogicData/Panel_PlacedObject.cs +++ b/Assets/WorkSpace/LH/LogicData/Panel_PlacedObject.cs @@ -23,7 +23,7 @@ namespace Octopus.Simulator void Awake() { rect = GetComponent(); - DataManager.I.onModelsUpdated += SetDropdown; + DataManager.I.onModelsUpdated += (value)=>SetDropdown(); } public void SetDropdown(string mappingKey) diff --git a/Assets/WorkSpace/LH/ProjectDataManager.cs b/Assets/WorkSpace/LH/ProjectDataManager.cs index 4d2e0428..63ed4c42 100644 --- a/Assets/WorkSpace/LH/ProjectDataManager.cs +++ b/Assets/WorkSpace/LH/ProjectDataManager.cs @@ -12,13 +12,14 @@ public class ProjectDataManager : MonoBehaviour Button projectMenuButton; [SerializeField] RectTransform menuPanel; + // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { - FindAnyObjectByType().onParameterRecived += RequestInfo; + //FindAnyObjectByType().onParameterRecived += RequestInfo; projectMenuButton.onClick.AddListener(SetActive); } - void RequestInfo(SimulatorConfig config) + public void RequestInfo(SimulatorConfig config) { WebManager.webManager.Request_Get($"{WebManager.webManager.apiConfig.project}/{WebParameters.config.projectId}", (flag, value) => { diff --git a/Assets/WorkSpace/LH/WebReceiver.cs b/Assets/WorkSpace/LH/WebReceiver.cs index e52a01b9..1869fcff 100644 --- a/Assets/WorkSpace/LH/WebReceiver.cs +++ b/Assets/WorkSpace/LH/WebReceiver.cs @@ -3,6 +3,7 @@ using UnityEngine; using System; using TMPro; using Octopus.Simulator.Networks; +using Octopus.Simulator; public class WebReceiver : MonoBehaviour { @@ -10,10 +11,12 @@ public class WebReceiver : MonoBehaviour public event Action onParameterRecived; public void Start() { - config.projectId = "12"; + config.projectId = "17"; //config.simulationId = "15"; - config.logicId = "25"; + config.logicId = "46"; WebParameters.config = config; + onParameterRecived += FindAnyObjectByType().RequestInfo; + onParameterRecived += FindAnyObjectByType().RequestInfo; onParameterRecived?.Invoke(config); }