mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-19 02:24:35 +08:00
fixes
This commit is contained in:
parent
23478b5734
commit
32f999b898
@ -123,7 +123,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
|
|
||||||
Color mainColor = new Color(0.3f, 1f, 0f, 1f);
|
Color mainColor = new Color(0.3f, 1f, 0f, 1f);
|
||||||
var debugColor = pool.DataType.GetCustomAttribute<DebugColorAttribute>();
|
var debugColor = pool.ComponentType.GetCustomAttribute<DebugColorAttribute>();
|
||||||
if (debugColor != null)
|
if (debugColor != null)
|
||||||
{
|
{
|
||||||
mainColor = debugColor.GetUnityColor();
|
mainColor = debugColor.GetUnityColor();
|
||||||
@ -132,14 +132,14 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
EditorGUI.DrawRect(progressBar, backgroundColor);
|
EditorGUI.DrawRect(progressBar, backgroundColor);
|
||||||
|
|
||||||
progressBar.yMin = progressBar.yMax - ((float)pool.EntitiesCount / pool.Capacity) * progressBar.height;
|
progressBar.yMin = progressBar.yMax - ((float)pool.Count / pool.Capacity) * progressBar.height;
|
||||||
|
|
||||||
GUIStyle textStyle0 = EditorStyles.miniBoldLabel;
|
GUIStyle textStyle0 = EditorStyles.miniBoldLabel;
|
||||||
textStyle0.alignment = TextAnchor.MiddleCenter;
|
textStyle0.alignment = TextAnchor.MiddleCenter;
|
||||||
|
|
||||||
Color foregroundColor = mainColor;
|
Color foregroundColor = mainColor;
|
||||||
EditorGUI.DrawRect(progressBar, foregroundColor);
|
EditorGUI.DrawRect(progressBar, foregroundColor);
|
||||||
GUI.Label(progressBar, pool.EntitiesCount.ToString(), textStyle0);
|
GUI.Label(progressBar, pool.Count.ToString(), textStyle0);
|
||||||
|
|
||||||
GUIStyle textStyle1 = EditorStyles.miniBoldLabel;
|
GUIStyle textStyle1 = EditorStyles.miniBoldLabel;
|
||||||
textStyle1.alignment = TextAnchor.UpperCenter;
|
textStyle1.alignment = TextAnchor.UpperCenter;
|
||||||
@ -148,7 +148,7 @@ namespace DCFApixels.DragonECS
|
|||||||
GUI.contentColor = defaultContentColor;
|
GUI.contentColor = defaultContentColor;
|
||||||
GUIStyle textStyle2 = EditorStyles.miniBoldLabel;
|
GUIStyle textStyle2 = EditorStyles.miniBoldLabel;
|
||||||
textStyle2.alignment = TextAnchor.LowerCenter;
|
textStyle2.alignment = TextAnchor.LowerCenter;
|
||||||
GUI.Label(AddMargin(position, -10f, 3f), pool.DataType.Name, textStyle2);
|
GUI.Label(AddMargin(position, -10f, 3f), pool.ComponentType.Name, textStyle2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
public class EcsLateRunSystemRunner : EcsRunner<IEcsLateRunSystem>, IEcsLateRunSystem
|
public class EcsLateRunSystemRunner : EcsRunner<IEcsLateRunSystem>, IEcsLateRunSystem
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
private EcsProfilerMarker[] _markers;
|
private EcsProfilerMarker[] _markers;
|
||||||
#endif
|
#endif
|
||||||
public void LateRun(EcsPipeline pipeline)
|
public void LateRun(EcsPipeline pipeline)
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
for (int i = 0; i < targets.Length; i++)
|
for (int i = 0; i < targets.Length; i++)
|
||||||
{
|
{
|
||||||
using (_markers[i].Auto())
|
using (_markers[i].Auto())
|
||||||
@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
protected override void OnSetup()
|
protected override void OnSetup()
|
||||||
{
|
{
|
||||||
_markers = new EcsProfilerMarker[targets.Length];
|
_markers = new EcsProfilerMarker[targets.Length];
|
||||||
@ -52,12 +52,12 @@
|
|||||||
}
|
}
|
||||||
public class EcsFixedRunSystemRunner : EcsRunner<IEcsFixedRunSystem>, IEcsFixedRunSystem
|
public class EcsFixedRunSystemRunner : EcsRunner<IEcsFixedRunSystem>, IEcsFixedRunSystem
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
private EcsProfilerMarker[] _markers;
|
private EcsProfilerMarker[] _markers;
|
||||||
#endif
|
#endif
|
||||||
public void FixedRun(EcsPipeline pipeline)
|
public void FixedRun(EcsPipeline pipeline)
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
for (int i = 0; i < targets.Length; i++)
|
for (int i = 0; i < targets.Length; i++)
|
||||||
{
|
{
|
||||||
using (_markers[i].Auto())
|
using (_markers[i].Auto())
|
||||||
@ -68,7 +68,7 @@
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG && !DISABLE_DRAGONECS_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
protected override void OnSetup()
|
protected override void OnSetup()
|
||||||
{
|
{
|
||||||
_markers = new EcsProfilerMarker[targets.Length];
|
_markers = new EcsProfilerMarker[targets.Length];
|
||||||
|
Loading…
Reference in New Issue
Block a user