using Simulator.Data; using System.Collections.Generic; using UnityEngine; using UVC.UI.Window.PropertyWindow; public class SimulatorProperty : MonoBehaviour { public Dictionary> propertyDict = new Dictionary>(); // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } public void SetProertyWindow(ComponentType type,ComponentDataBase data) { Debug.Log(data); switch (type) { case ComponentType.Source: InitSourceProperty(data as SourceDataClass); break; } } public void InitSourceProperty(SourceDataClass source) { PropertyWindow.Instance.LoadProperties( new List() { new StringProperty("name", "이름", source.name) { IsReadOnly=true }, new StringProperty("label", "라벨", source.label) { IsReadOnly=false }, new Vector2Property("Position","X,Y 좌표(m)", new Vector2(source.physical.position.x,source.physical.position.z)) { IsReadOnly=false }, new ListProperty("prefabType","생성될 개체 유형",new List(PrefabManager.Instance.prefabDict.Keys),source.prefab) { IsReadOnly=false } } ); } }