versionUpdate,propertyView
This commit is contained in:
50
Assets/Scripts/Simulator/PropertyWindow/SimulatorProperty.cs
Normal file
50
Assets/Scripts/Simulator/PropertyWindow/SimulatorProperty.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using Simulator.Data;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UVC.UI.Window.PropertyWindow;
|
||||
|
||||
public class SimulatorProperty : MonoBehaviour
|
||||
{
|
||||
public Dictionary<ComponentType, List<IPropertyItem>> propertyDict = new Dictionary<ComponentType, List<IPropertyItem>>();
|
||||
// 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<IPropertyItem>()
|
||||
{
|
||||
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<string>(PrefabManager.Instance.prefabDict.Keys),source.prefab)
|
||||
{
|
||||
IsReadOnly=false
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: beb4050a46f208a4dab3cdbddb94aa2f
|
||||
Reference in New Issue
Block a user