bug fix
This commit is contained in:
@@ -4,6 +4,7 @@ using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Octopus.Simulator;
|
||||
using System;
|
||||
|
||||
public enum SimulationModelType
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class SimulationModel : MonoBehaviour, IClickable
|
||||
public string modelID;
|
||||
public string nodeID;
|
||||
private bool isQuitting = false;
|
||||
public Action<SimulationModel> onModelClicked;
|
||||
void Awake()
|
||||
{
|
||||
FitCollider();
|
||||
@@ -31,6 +33,9 @@ public class SimulationModel : MonoBehaviour, IClickable
|
||||
|
||||
private void Start()
|
||||
{
|
||||
onModelClicked += FindAnyObjectByType<Panel_ConnectedObject>(FindObjectsInactive.Include).SetConnectedDataItem;
|
||||
onModelClicked += FindAnyObjectByType<LogicUIManager>(FindObjectsInactive.Include).ModelSelected;
|
||||
onModelClicked += (value)=>FindAnyObjectByType<Panel_PlacedObject>(FindObjectsInactive.Include).UnsetPlacedObjectDataItem();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@@ -49,7 +54,8 @@ public class SimulationModel : MonoBehaviour, IClickable
|
||||
}
|
||||
public void OnClick()
|
||||
{
|
||||
Debug.Log("Clicked : " + gameObject.name);
|
||||
//Debug.Log("Clicked : " + gameObject.name);
|
||||
onModelClicked?.Invoke(this);
|
||||
}
|
||||
void FitCollider()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user