textdelete

This commit is contained in:
2025-05-27 10:18:29 +09:00
parent e51acee1ae
commit a5d9c158ec
3 changed files with 0 additions and 14 deletions

View File

@@ -19,7 +19,6 @@ namespace Octopus.Simulator.Networks
public static MQTTManager mqttManager; public static MQTTManager mqttManager;
public Dictionary<string, MQTTClient> clientTable = new Dictionary<string, MQTTClient>(); public Dictionary<string, MQTTClient> clientTable = new Dictionary<string, MQTTClient>();
public BaseSimulationMessage basemessage; public BaseSimulationMessage basemessage;
public TMP_Text text;
[SerializeField] [SerializeField]
string MQTTpath = ""; string MQTTpath = "";
@@ -125,7 +124,6 @@ namespace Octopus.Simulator.Networks
{ {
basemessage = JsonConvert.DeserializeObject<BaseSimulationMessage>(payload); basemessage = JsonConvert.DeserializeObject<BaseSimulationMessage>(payload);
MQTTDataBase.Instance.AddDict(basemessage.component_id, payload); MQTTDataBase.Instance.AddDict(basemessage.component_id, payload);
//text.text = payload;
} }
//onMessageReceived?.Invoke(topicName, payload); //onMessageReceived?.Invoke(topicName, payload);
} }

View File

@@ -28,7 +28,6 @@ namespace Octopus.Simulator.Networks
string token = ""; string token = "";
int port; int port;
string http; string http;
public TMP_Text text;
void Awake() void Awake()
{ {
@@ -48,7 +47,6 @@ namespace Octopus.Simulator.Networks
} }
*/ */
var json = Resources.Load<TextAsset>(WebPath); var json = Resources.Load<TextAsset>(WebPath);
Debug.Log(json.text);
WebConfigList ConfigList = JsonConvert.DeserializeObject<WebConfigList>(json.text); WebConfigList ConfigList = JsonConvert.DeserializeObject<WebConfigList>(json.text);
var config = ConfigList.configs[0]; var config = ConfigList.configs[0];
host = config.host; host = config.host;
@@ -69,7 +67,6 @@ namespace Octopus.Simulator.Networks
} }
*/ */
TextAsset json = Resources.Load<TextAsset>(ApiPath); TextAsset json = Resources.Load<TextAsset>(ApiPath);
Debug.Log(json.text);
apiConfig = JsonConvert.DeserializeObject<APIEndPointsConfig>(json.text); apiConfig = JsonConvert.DeserializeObject<APIEndPointsConfig>(json.text);
} }
@@ -122,14 +119,12 @@ namespace Octopus.Simulator.Networks
Debug.Log(request.error); Debug.Log(request.error);
//callback을 false로 하고 텍스트를 리턴합니다. //callback을 false로 하고 텍스트를 리턴합니다.
callback(false, request.downloadHandler.text); callback(false, request.downloadHandler.text);
text.text = request.downloadHandler.text;
} }
else else
{ {
//result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다. //result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다.
Debug.Log(request.downloadHandler.text); Debug.Log(request.downloadHandler.text);
callback(true, request.downloadHandler.text); callback(true, request.downloadHandler.text);
text.text = request.downloadHandler.text;
} }
} }
} }
@@ -150,14 +145,12 @@ namespace Octopus.Simulator.Networks
Debug.Log(request.error); Debug.Log(request.error);
//callback을 false로 하고 텍스트를 리턴합니다. //callback을 false로 하고 텍스트를 리턴합니다.
callback(false, request.downloadHandler.text); callback(false, request.downloadHandler.text);
text.text = request.downloadHandler.text;
} }
else else
{ {
//result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다. //result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다.
Debug.Log(request.downloadHandler.text); Debug.Log(request.downloadHandler.text);
callback(true, request.downloadHandler.text); callback(true, request.downloadHandler.text);
text.text = request.downloadHandler.text;
} }
} }
} }
@@ -179,14 +172,12 @@ namespace Octopus.Simulator.Networks
Debug.Log(request.error); Debug.Log(request.error);
//callback을 false로 하고 텍스트를 리턴합니다. //callback을 false로 하고 텍스트를 리턴합니다.
callback(false, request.downloadHandler.text); callback(false, request.downloadHandler.text);
text.text += request.downloadHandler.text;
} }
else else
{ {
//result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다. //result가 에러가 아니라면, callback을 true로 하고 텍스트를 리턴합니다.
Debug.Log(request.downloadHandler.text); Debug.Log(request.downloadHandler.text);
callback(true, request.downloadHandler.text); callback(true, request.downloadHandler.text);
text.text = request.downloadHandler.text;
} }
} }
} }

View File

@@ -8,7 +8,6 @@ public class WebReceiver : MonoBehaviour
{ {
public SimulatorConfig config; public SimulatorConfig config;
public event Action<SimulatorConfig> onParameterRecived; public event Action<SimulatorConfig> onParameterRecived;
public TMP_Text text;
public void Start() public void Start()
{ {
config.projectId = "12"; config.projectId = "12";
@@ -22,8 +21,6 @@ public class WebReceiver : MonoBehaviour
{ {
config = JsonConvert.DeserializeObject<SimulatorConfig>(json); config = JsonConvert.DeserializeObject<SimulatorConfig>(json);
WebParameters.config = config; WebParameters.config = config;
text.text = $"{config.simulatorNumber}/{config.projectId+config.logicId}/{config.simulationId}";
Debug.Log(text.text);
onParameterRecived?.Invoke(config); onParameterRecived?.Invoke(config);
} }
} }