cool
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
|
||||
using BITKit;
|
||||
#if UNITY_EDITOR
|
||||
using BITKit.Entities;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UIElements;
|
||||
#endif
|
||||
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
@@ -112,4 +121,35 @@ namespace BITKit.Entities
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
#if UNITY_EDITOR && Disabled
|
||||
|
||||
public class UnityEntitiesWindow:EditorWindow
|
||||
{
|
||||
[MenuItem("Tools/Entities/Editor Window")]
|
||||
private static void Open()
|
||||
{
|
||||
GetWindow<UnityEntitiesWindow>().Show();
|
||||
}
|
||||
|
||||
private Label _hint;
|
||||
private VisualElement _container;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
var scrollView = rootVisualElement.Create<ScrollView>();
|
||||
_hint = scrollView.Create<Label>();
|
||||
_container = scrollView.Create<VisualElement>();
|
||||
}
|
||||
|
||||
private void OnInspectorUpdate()
|
||||
{
|
||||
if(BITApp.ServiceProvider is null || BITApp.ServiceProvider.QueryComponents(out IEntitiesService entitiesService) is false)return;
|
||||
|
||||
_hint.text = $"Entities Count: {entitiesService.Entities.Count}";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user