This commit is contained in:
CortexCore
2025-07-11 11:45:45 +08:00
parent fc189b98cc
commit ecae0f809c
76 changed files with 237471 additions and 33136 deletions

View File

@@ -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