refresh
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Octopus.Simulator
|
||||
panelConnectedObject.gameObject.SetActive(false);
|
||||
panelPlacedObject.gameObject.SetActive(false);
|
||||
LogicWindow.gameObject.SetActive(false);
|
||||
FindAnyObjectByType<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
//FindAnyObjectByType<WebReceiver>().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) =>
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Octopus.Simulator
|
||||
void Awake()
|
||||
{
|
||||
rect = GetComponent<RectTransform>();
|
||||
DataManager.I.onModelsUpdated += SetDropdown;
|
||||
DataManager.I.onModelsUpdated += (value)=>SetDropdown();
|
||||
}
|
||||
|
||||
public void SetDropdown(string mappingKey)
|
||||
|
||||
@@ -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<WebReceiver>().onParameterRecived += RequestInfo;
|
||||
//FindAnyObjectByType<WebReceiver>().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) =>
|
||||
{
|
||||
|
||||
@@ -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<SimulatorConfig> onParameterRecived;
|
||||
public void Start()
|
||||
{
|
||||
config.projectId = "12";
|
||||
config.projectId = "17";
|
||||
//config.simulationId = "15";
|
||||
config.logicId = "25";
|
||||
config.logicId = "46";
|
||||
WebParameters.config = config;
|
||||
onParameterRecived += FindAnyObjectByType<ProjectDataManager>().RequestInfo;
|
||||
onParameterRecived += FindAnyObjectByType<LogicDataManager>().RequestInfo;
|
||||
onParameterRecived?.Invoke(config);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user