轨迹插件引入

This commit is contained in:
lishuo committed 2022-09-06 13:47:45 +08:00
1 parent 89b5275efd
commit 195893a1b0
1023 files changed
+378944 -18404

No files matched your search

@@ -0,0 +1,22 @@
// =====================================================================
// Copyright 2013-2017 Fluffy Underware
// All rights reserved
//
// http://www.fluffyunderware.com
// =====================================================================
using UnityEngine;
using UnityEditor;
using FluffyUnderware.DevTools;
namespace FluffyUnderware.DevToolsEditor
{
[CustomEditor(typeof(ComponentPool))]
public class ComponentPoolEditor : DTEditor<ComponentPool>
{
protected override void OnCustomInspectorGUIBefore()
{
PoolManagerEditor.showBar(Target);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 007dc0ff09c5d97478ad4fe856644878
timeCreated: 1441008968
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,59 @@
// =====================================================================
// Copyright 2013-2017 Fluffy Underware
// All rights reserved
//
// http://www.fluffyunderware.com
// =====================================================================
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using FluffyUnderware.DevTools;
namespace FluffyUnderware.DevToolsEditor
{
[CustomEditor(typeof(PoolManager))]
public class PoolManagerEditor : DTEditor<PoolManager>
{
protected override void OnReadNodes()
{
Node.AddSection("Type Pools",typePoolsGUI);
}
void typePoolsGUI(DTInspectorNode node)
{
foreach (KeyValuePair<Type, IPool> kv in Target.TypePools)
{
showBar(kv.Value);
}
}
public static void showBar(IPool pool)
{
Rect r = EditorGUILayout.GetControlRect(false, GUILayout.Height(20));
float hi = Mathf.Max(pool.Count, pool.Settings.Threshold);
Color c = Color.green;
if (pool.Count < pool.Settings.MinItems)
c = Color.yellow;
else if (pool.Count > pool.Settings.Threshold)
c = Color.red;
DTGUI.PushContentColor(c);
string s=pool.Identifier;
if (!string.IsNullOrEmpty(s))
{
int i = s.IndexOf(",");
if (i > 0)
s = pool.Identifier.Substring(0, i);
}
EditorGUI.ProgressBar(r, pool.Count / hi, s + ":" + pool.Count.ToString());
DTGUI.PopContentColor();
}
}
}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2f1bf8d1bfc7bd84d88dbc07008b45ef
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
@@ -0,0 +1,24 @@
// =====================================================================
// Copyright 2013-2017 Fluffy Underware
// All rights reserved
//
// http://www.fluffyunderware.com
// =====================================================================
using UnityEngine;
using UnityEditor;
using FluffyUnderware.DevTools;
namespace FluffyUnderware.DevToolsEditor
{
[CustomEditor(typeof(PrefabPool),true)]
public class PrefabPoolEditor : DTEditor<PrefabPool>
{
protected override void OnCustomInspectorGUIBefore()
{
PoolManagerEditor.showBar(Target);
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 034101b2c8b1d0647afbae54cbffb340
timeCreated: 1440757122
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: