1
This commit is contained in:
@@ -18,6 +18,8 @@ namespace BITKit.Entities.Editor
|
||||
}
|
||||
private Label _timeLabel;
|
||||
private VisualElement _container;
|
||||
private VisualElement _idContainer;
|
||||
private VisualElement _nameContainer;
|
||||
private void OnEnable()
|
||||
{
|
||||
_timeLabel = rootVisualElement.Create<Label>();
|
||||
@@ -25,15 +27,25 @@ namespace BITKit.Entities.Editor
|
||||
rootVisualElement.styleSheets.Add(BITEditorUtils.InspectorStyleSheet);
|
||||
rootVisualElement.styleSheets.Add(BITEditorUtils.Style);
|
||||
rootVisualElement.AddToClassList("pa-8");
|
||||
|
||||
_idContainer = _container.Create<VisualElement>();
|
||||
_nameContainer = _container.Create<VisualElement>();
|
||||
|
||||
_container.style.flexDirection = FlexDirection.Row;
|
||||
_idContainer.style.flexDirection = FlexDirection.Column;
|
||||
_nameContainer.style.flexDirection = FlexDirection.Column;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_timeLabel.text = DateTime.Now.ToString(CultureInfo.InvariantCulture);
|
||||
_container.Clear();
|
||||
_nameContainer.Clear();
|
||||
_idContainer.Clear();
|
||||
foreach (var x in UnityEntitiesService.Entities)
|
||||
{
|
||||
_container.Create<Label>().text = $"{x.Id}\t{x}";
|
||||
//_container.Create<Label>().text = $"{x.Id}\t{x}";
|
||||
_idContainer.Create<Label>().text = $"{x.Id}";
|
||||
_nameContainer.Create<Label>().text = $"{x}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user