mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2026-04-22 04:35:55 +08:00
update meta
This commit is contained in:
parent
9e848b790f
commit
7e15f7bd23
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using DCFApixels.DragonECS.Unity;
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
@ -14,9 +15,9 @@ namespace DCFApixels.DragonECS
|
|||||||
public static readonly MetaGroup JointGroup = new MetaGroup($"{UNITY_COMPONENT_NAME}/Joint/");
|
public static readonly MetaGroup JointGroup = new MetaGroup($"{UNITY_COMPONENT_NAME}/Joint/");
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
[MetaColor(255 / 3, 255, 0)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(UnityComponentConsts.UNITY_COMPONENT_NAME)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.COMPONENTS_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "Component-reference to Unity object for EcsPool")]
|
[MetaDescription(EcsConsts.AUTHOR, "Component-reference to Unity object for EcsPool.")]
|
||||||
public struct UnityComponent<T> : IEcsComponent, IEnumerable<T>//IntelliSense hack
|
public struct UnityComponent<T> : IEcsComponent, IEnumerable<T>//IntelliSense hack
|
||||||
where T : Component
|
where T : Component
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,22 +1,29 @@
|
|||||||
using DCFApixels.DragonECS.RunnersCore;
|
using DCFApixels.DragonECS.RunnersCore;
|
||||||
|
using DCFApixels.DragonECS.Unity;
|
||||||
using DCFApixels.DragonECS.Unity.Internal;
|
using DCFApixels.DragonECS.Unity.Internal;
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
{
|
{
|
||||||
[MetaName(nameof(DrawGizmos))]
|
[MetaName(nameof(DrawGizmos))]
|
||||||
[MetaColor(MetaColor.Orange)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "The process to run when EcsPipeline.DrawGizmos() is called.")]
|
||||||
public interface IEcsGizmosProcess : IEcsProcess
|
public interface IEcsGizmosProcess : IEcsProcess
|
||||||
{
|
{
|
||||||
public void DrawGizmos();
|
public void DrawGizmos();
|
||||||
}
|
}
|
||||||
[MetaName(nameof(LateRun))]
|
[MetaName(nameof(LateRun))]
|
||||||
[MetaColor(MetaColor.Orange)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "The process to run when EcsPipeline.LateRun() is called.")]
|
||||||
public interface IEcsLateRunProcess : IEcsProcess
|
public interface IEcsLateRunProcess : IEcsProcess
|
||||||
{
|
{
|
||||||
public void LateRun();
|
public void LateRun();
|
||||||
}
|
}
|
||||||
[MetaName(nameof(FixedRun))]
|
[MetaName(nameof(FixedRun))]
|
||||||
[MetaColor(MetaColor.Orange)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "The process to run when EcsPipeline.FixedRun() is called.")]
|
||||||
public interface IEcsFixedRunProcess : IEcsProcess
|
public interface IEcsFixedRunProcess : IEcsProcess
|
||||||
{
|
{
|
||||||
public void FixedRun();
|
public void FixedRun();
|
||||||
@ -40,8 +47,10 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
namespace DCFApixels.DragonECS.Unity.Internal
|
namespace DCFApixels.DragonECS.Unity.Internal
|
||||||
{
|
{
|
||||||
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
[MetaColor(MetaColor.Orange)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
public class EcsLateGizmosRunner : EcsRunner<IEcsGizmosProcess>, IEcsGizmosProcess
|
public class EcsLateGizmosRunner : EcsRunner<IEcsGizmosProcess>, IEcsGizmosProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
@ -74,7 +83,10 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[MetaColor(MetaColor.Orange)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
public class EcsLateRunRunner : EcsRunner<IEcsLateRunProcess>, IEcsLateRunProcess
|
public class EcsLateRunRunner : EcsRunner<IEcsLateRunProcess>, IEcsLateRunProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
@ -106,7 +118,11 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[MetaColor(MetaColor.Orange)]
|
|
||||||
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
public class EcsFixedRunRunner : EcsRunner<IEcsFixedRunProcess>, IEcsFixedRunProcess
|
public class EcsFixedRunRunner : EcsRunner<IEcsFixedRunProcess>, IEcsFixedRunProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
#if DEBUG && !DISABLE_DEBUG
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using DCFApixels.DragonECS.Unity;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
@ -5,8 +6,8 @@ namespace DCFApixels.DragonECS
|
|||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(AutoEntityCreator), 30)]
|
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(AutoEntityCreator), 30)]
|
||||||
[MetaColor(MetaColor.Cyan)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(EcsConsts.FRAMEWORK_GROUP, EcsUnityConsts.UNITY_GROUP)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
[MetaDescription(EcsConsts.AUTHOR, nameof(MonoBehaviour) + ". Automatically creates an entity in the selected world and connects it to EcsEntityConnect.")]
|
||||||
public class AutoEntityCreator : MonoBehaviour
|
public class AutoEntityCreator : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using UnityEngine;
|
|||||||
#region UNITY_EDITOR
|
#region UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using DCFApixels.DragonECS.Unity.Internal;
|
using DCFApixels.DragonECS.Unity.Internal;
|
||||||
|
using DCFApixels.DragonECS.Unity;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
@ -57,8 +58,8 @@ namespace DCFApixels.DragonECS
|
|||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(EcsEntityConnect), 30)]
|
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(EcsEntityConnect), 30)]
|
||||||
[MetaColor(MetaColor.Cyan)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(EcsConsts.FRAMEWORK_GROUP, EcsUnityConsts.UNITY_GROUP)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
[MetaDescription(EcsConsts.AUTHOR, nameof(MonoBehaviour) + ". Responsible for connecting the entity and GameObject using the EcsEntityConnect.ConnectWith method.")]
|
||||||
public class EcsEntityConnect : MonoBehaviour
|
public class EcsEntityConnect : MonoBehaviour
|
||||||
{
|
{
|
||||||
private entlong _entity;
|
private entlong _entity;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using DCFApixels.DragonECS.Unity;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
#endif
|
#endif
|
||||||
@ -7,8 +8,8 @@ using UnityEditor;
|
|||||||
namespace DCFApixels.DragonECS
|
namespace DCFApixels.DragonECS
|
||||||
{
|
{
|
||||||
[MetaColor(MetaColor.Cyan)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(EcsConsts.FRAMEWORK_GROUP, EcsUnityConsts.UNITY_GROUP)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.COMPONENTS_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
[MetaDescription(EcsConsts.AUTHOR, "This component is automatically added if an entity is connected to one of the EcsEntityConnect. It also contains a reference to the connected EcsEntityConnect.")]
|
||||||
public readonly struct GameObjectConnect : IEcsComponent, IEcsComponentLifecycle<GameObjectConnect>
|
public readonly struct GameObjectConnect : IEcsComponent, IEcsComponentLifecycle<GameObjectConnect>
|
||||||
{
|
{
|
||||||
public readonly EcsEntityConnect Connect;
|
public readonly EcsEntityConnect Connect;
|
||||||
|
|||||||
8
src/Consts.cs
Normal file
8
src/Consts.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace DCFApixels.DragonECS.Unity
|
||||||
|
{
|
||||||
|
public class EcsUnityConsts
|
||||||
|
{
|
||||||
|
public const string PACK_GROUP = "_" + EcsConsts.FRAMEWORK_NAME + "/Unity";
|
||||||
|
public const string ENTITY_BUILDING_GROUP = "Entity Building";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -41,6 +41,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
}
|
}
|
||||||
private void OnGUI()
|
private void OnGUI()
|
||||||
{
|
{
|
||||||
|
var prefs = SettingsPrefs.instance;
|
||||||
float labelWidth = EditorGUIUtility.labelWidth;
|
float labelWidth = EditorGUIUtility.labelWidth;
|
||||||
EditorGUIUtility.labelWidth = 0f;
|
EditorGUIUtility.labelWidth = 0f;
|
||||||
|
|
||||||
@ -55,38 +56,35 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
rect.xMin += 9f;
|
rect.xMin += 9f;
|
||||||
GUI.Label(rect, "Settings", EditorStyles.whiteLargeLabel);
|
GUI.Label(rect, "Settings", EditorStyles.whiteLargeLabel);
|
||||||
|
|
||||||
EditorGUI.BeginChangeCheck();
|
//using (prefs.DisableAutoSave())
|
||||||
Settings settings = new Settings();
|
|
||||||
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
settings.IsShowHidden = EditorGUILayout.Toggle(SettingsPrefs.instance.IsShowHidden, GUILayout.Width(checkBoxWidth));
|
|
||||||
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowHidden)), GUILayout.ExpandWidth(false));
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
settings.IsShowInterfaces = EditorGUILayout.Toggle(SettingsPrefs.instance.IsShowInterfaces, GUILayout.Width(checkBoxWidth));
|
|
||||||
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowInterfaces)), GUILayout.ExpandWidth(false));
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
settings.IsShowRuntimeComponents = EditorGUILayout.Toggle(SettingsPrefs.instance.IsShowRuntimeComponents, GUILayout.Width(checkBoxWidth));
|
|
||||||
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowRuntimeComponents)), GUILayout.ExpandWidth(false));
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
settings.AutoColorMode = (ComponentColorMode)EditorGUILayout.EnumPopup(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.ComponentColorMode)), SettingsPrefs.instance.ComponentColorMode);
|
|
||||||
|
|
||||||
if (EditorGUI.EndChangeCheck())
|
|
||||||
{
|
{
|
||||||
SettingsPrefs.instance.IsShowHidden = settings.IsShowHidden;
|
GUILayout.BeginHorizontal();
|
||||||
SettingsPrefs.instance.IsShowInterfaces = settings.IsShowInterfaces;
|
prefs.IsShowHidden = EditorGUILayout.Toggle(prefs.IsShowHidden, GUILayout.Width(checkBoxWidth));
|
||||||
SettingsPrefs.instance.IsShowRuntimeComponents = settings.IsShowRuntimeComponents;
|
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowHidden)), GUILayout.ExpandWidth(false));
|
||||||
SettingsPrefs.instance.ComponentColorMode = settings.AutoColorMode;
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
prefs.IsShowInterfaces = EditorGUILayout.Toggle(prefs.IsShowInterfaces, GUILayout.Width(checkBoxWidth));
|
||||||
|
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowInterfaces)), GUILayout.ExpandWidth(false));
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
prefs.IsShowRuntimeComponents = EditorGUILayout.Toggle(prefs.IsShowRuntimeComponents, GUILayout.Width(checkBoxWidth));
|
||||||
|
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsShowRuntimeComponents)), GUILayout.ExpandWidth(false));
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
prefs.IsUseCustomNames = EditorGUILayout.Toggle(prefs.IsUseCustomNames, GUILayout.Width(checkBoxWidth));
|
||||||
|
GUILayout.Label(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.IsUseCustomNames)), GUILayout.ExpandWidth(false));
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
prefs.ComponentColorMode = (ComponentColorMode)EditorGUILayout.EnumPopup(UnityEditorUtility.TransformFieldName(nameof(SettingsPrefs.ComponentColorMode)), prefs.ComponentColorMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
GUILayout.EndVertical();
|
GUILayout.EndVertical();
|
||||||
|
|
||||||
|
|
||||||
GUILayout.Space(20f);
|
GUILayout.Space(20f);
|
||||||
using (new EcsGUI.ColorScope(Color.white * 0.5f))
|
using (EcsGUI.SetColor(Color.white * 0.5f))
|
||||||
GUILayout.BeginVertical(EditorStyles.helpBox);
|
GUILayout.BeginVertical(EditorStyles.helpBox);
|
||||||
//using (new EcsGUI.ColorScope(Color.white * 1.2f))
|
//using (new EcsGUI.ColorScope(Color.white * 1.2f))
|
||||||
GUILayout.Label("", EditorStyles.toolbar, GUILayout.ExpandWidth(true), GUILayout.Height(22f));
|
GUILayout.Label("", EditorStyles.toolbar, GUILayout.ExpandWidth(true), GUILayout.Height(22f));
|
||||||
@ -141,13 +139,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
}
|
}
|
||||||
public static implicit operator DefineSymbolsInfo(string a) => new DefineSymbolsInfo(a, false);
|
public static implicit operator DefineSymbolsInfo(string a) => new DefineSymbolsInfo(a, false);
|
||||||
}
|
}
|
||||||
private struct Settings
|
|
||||||
{
|
|
||||||
public bool IsShowHidden;
|
|
||||||
public bool IsShowInterfaces;
|
|
||||||
public bool IsShowRuntimeComponents;
|
|
||||||
public ComponentColorMode AutoColorMode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -13,6 +13,20 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
[FilePath(EcsConsts.AUTHOR + "/" + EcsConsts.FRAMEWORK_NAME + "/" + nameof(SettingsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)]
|
[FilePath(EcsConsts.AUTHOR + "/" + EcsConsts.FRAMEWORK_NAME + "/" + nameof(SettingsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)]
|
||||||
internal class SettingsPrefs : ScriptableSingleton<SettingsPrefs>
|
internal class SettingsPrefs : ScriptableSingleton<SettingsPrefs>
|
||||||
{
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private bool _isUseCustomNames = true;
|
||||||
|
public bool IsUseCustomNames
|
||||||
|
{
|
||||||
|
get => _isUseCustomNames;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_isUseCustomNames != value)
|
||||||
|
{
|
||||||
|
_isUseCustomNames = value;
|
||||||
|
AutoSave();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private bool _isShowInterfaces = false;
|
private bool _isShowInterfaces = false;
|
||||||
public bool IsShowInterfaces
|
public bool IsShowInterfaces
|
||||||
@ -20,8 +34,11 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
get => _isShowInterfaces;
|
get => _isShowInterfaces;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_isShowInterfaces = value;
|
if (_isShowInterfaces != value)
|
||||||
Save(false);
|
{
|
||||||
|
_isShowInterfaces = value;
|
||||||
|
AutoSave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
@ -31,8 +48,11 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
get => _isShowHidden;
|
get => _isShowHidden;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_isShowHidden = value;
|
if (_isShowHidden != value)
|
||||||
Save(false);
|
{
|
||||||
|
_isShowHidden = value;
|
||||||
|
AutoSave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
@ -42,23 +62,26 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
get => _isShowRuntimeComponents;
|
get => _isShowRuntimeComponents;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_isShowRuntimeComponents = value;
|
if (_isShowRuntimeComponents != value)
|
||||||
Save(false);
|
{
|
||||||
}
|
_isShowRuntimeComponents = value;
|
||||||
}
|
AutoSave();
|
||||||
|
}
|
||||||
[SerializeField]
|
|
||||||
private bool _poolsToggle = false;
|
|
||||||
public bool PoolsToggle
|
|
||||||
{
|
|
||||||
get => _poolsToggle;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_poolsToggle = value;
|
|
||||||
Save(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[SerializeField]
|
||||||
|
//private bool _poolsToggle = false;
|
||||||
|
//public bool PoolsToggle
|
||||||
|
//{
|
||||||
|
// get => _poolsToggle;
|
||||||
|
// set
|
||||||
|
// {
|
||||||
|
// _isChanged = _poolsToggle != value;
|
||||||
|
// _poolsToggle = value;
|
||||||
|
// AutoSave();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private ComponentColorMode _componentColorMode = ComponentColorMode.Auto;
|
private ComponentColorMode _componentColorMode = ComponentColorMode.Auto;
|
||||||
@ -67,10 +90,19 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
get => _componentColorMode;
|
get => _componentColorMode;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_componentColorMode = value;
|
if (_componentColorMode != value)
|
||||||
Save(false);
|
{
|
||||||
|
_componentColorMode = value;
|
||||||
|
AutoSave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AutoSave()
|
||||||
|
{
|
||||||
|
Save(true);
|
||||||
|
Debug.Log("AutoSave");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
namespace DCFApixels.DragonECS.Unity.Internal
|
namespace DCFApixels.DragonECS.Unity.Internal
|
||||||
{
|
{
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class EntityMonitor : MonoBehaviour
|
internal class EntityMonitor : MonoBehaviour
|
||||||
{
|
{
|
||||||
private entlong _entity;
|
private entlong _entity;
|
||||||
|
|||||||
@ -3,8 +3,10 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace DCFApixels.DragonECS.Unity.Internal
|
namespace DCFApixels.DragonECS.Unity.Internal
|
||||||
{
|
{
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class PipelineMonitor : MonoBehaviour
|
internal class PipelineMonitor : MonoBehaviour
|
||||||
{
|
{
|
||||||
private EcsPipeline _pipeline;
|
private EcsPipeline _pipeline;
|
||||||
@ -18,8 +20,10 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class PipelineMonitorSystem : IEcsInit, IEcsPipelineMember, IEcsDestroy
|
internal class PipelineMonitorSystem : IEcsInit, IEcsPipelineMember, IEcsDestroy
|
||||||
{
|
{
|
||||||
private PipelineMonitor _monitor;
|
private PipelineMonitor _monitor;
|
||||||
|
|||||||
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
namespace DCFApixels.DragonECS.Unity.Editors
|
namespace DCFApixels.DragonECS.Unity.Editors
|
||||||
{
|
{
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class PipelineProcessMonitor : MonoBehaviour
|
internal class PipelineProcessMonitor : MonoBehaviour
|
||||||
{
|
{
|
||||||
private EcsPipeline _pipeline;
|
private EcsPipeline _pipeline;
|
||||||
|
|||||||
@ -4,8 +4,10 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace DCFApixels.DragonECS.Unity.Internal
|
namespace DCFApixels.DragonECS.Unity.Internal
|
||||||
{
|
{
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class WorldMonitor : MonoBehaviour
|
internal class WorldMonitor : MonoBehaviour
|
||||||
{
|
{
|
||||||
private EcsWorld _world;
|
private EcsWorld _world;
|
||||||
@ -19,8 +21,10 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[MetaTags(MetaTags.HIDDEN)]
|
|
||||||
[MetaColor(MetaColor.Gray)]
|
[MetaColor(MetaColor.Gray)]
|
||||||
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)]
|
||||||
|
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||||
|
[MetaTags(MetaTags.HIDDEN)]
|
||||||
internal class WorldMonitorSystem : IEcsInit, IEcsWorldEventListener, IEcsEntityEventListener
|
internal class WorldMonitorSystem : IEcsInit, IEcsWorldEventListener, IEcsEntityEventListener
|
||||||
{
|
{
|
||||||
private EcsWorld _world;
|
private EcsWorld _world;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
public class DragonDocs
|
public class DragonDocs
|
||||||
{
|
{
|
||||||
[DataMember, SerializeField]
|
[DataMember, SerializeField]
|
||||||
private readonly DragonDocsMeta[] _metas;
|
private DragonDocsMeta[] _metas;
|
||||||
|
|
||||||
public ReadOnlySpan<DragonDocsMeta> Metas
|
public ReadOnlySpan<DragonDocsMeta> Metas
|
||||||
{
|
{
|
||||||
@ -42,7 +42,7 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
{
|
{
|
||||||
foreach (var type in assembly.GetTypes())
|
foreach (var type in assembly.GetTypes())
|
||||||
{
|
{
|
||||||
if (memberType.IsAssignableFrom(type) || Attribute.GetCustomAttributes(type, metaAttributeType, false).Length > 1)
|
if ((type.IsInterface == false && type.IsAbstract == false && memberType.IsAssignableFrom(type)) || Attribute.GetCustomAttributes(type, metaAttributeType, false).Length > 1)
|
||||||
{
|
{
|
||||||
result.Add(type);
|
result.Add(type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,10 +12,11 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
[NonSerialized] private bool _isInitSourceType = false;
|
[NonSerialized] private bool _isInitSourceType = false;
|
||||||
|
|
||||||
[DataMember, SerializeField] internal string _assemblyQualifiedName = string.Empty;
|
[DataMember, SerializeField] internal string _assemblyQualifiedName = string.Empty;
|
||||||
[DataMember, SerializeField] internal EcsMemberType _memberType = EcsMemberType.Undefined;
|
//[DataMember, SerializeField] internal EcsMemberType _memberType = EcsMemberType.Undefined;
|
||||||
|
|
||||||
[DataMember, SerializeField] internal string _name = string.Empty;
|
[DataMember, SerializeField] internal string _name = string.Empty;
|
||||||
[DataMember, SerializeField] internal bool _isCustomName = false;
|
[DataMember, SerializeField] internal bool _isCustomName = false;
|
||||||
|
[DataMember, SerializeField] internal string _typeName = string.Empty;
|
||||||
[DataMember, SerializeField] internal MetaColor _color = MetaColor.BlackColor;
|
[DataMember, SerializeField] internal MetaColor _color = MetaColor.BlackColor;
|
||||||
[DataMember, SerializeField] internal bool _isCustomColor = false;
|
[DataMember, SerializeField] internal bool _isCustomColor = false;
|
||||||
[DataMember, SerializeField] internal string _autor = string.Empty;
|
[DataMember, SerializeField] internal string _autor = string.Empty;
|
||||||
@ -24,15 +25,17 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
[DataMember, SerializeField] internal string _group = string.Empty;
|
[DataMember, SerializeField] internal string _group = string.Empty;
|
||||||
[DataMember, SerializeField] internal string[] _tags = Array.Empty<string>();
|
[DataMember, SerializeField] internal string[] _tags = Array.Empty<string>();
|
||||||
|
|
||||||
|
[DataMember, SerializeField] internal bool _isHidden = false;
|
||||||
|
|
||||||
|
|
||||||
public string AssemblyQualifiedName
|
public string AssemblyQualifiedName
|
||||||
{
|
{
|
||||||
get { return _assemblyQualifiedName; }
|
get { return _assemblyQualifiedName; }
|
||||||
}
|
}
|
||||||
public EcsMemberType EcsMemberType
|
//public EcsMemberType EcsMemberType
|
||||||
{
|
//{
|
||||||
get { return _memberType; }
|
// get { return _memberType; }
|
||||||
}
|
//}
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return _name; }
|
get { return _name; }
|
||||||
@ -41,6 +44,10 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
{
|
{
|
||||||
get { return _isCustomName; }
|
get { return _isCustomName; }
|
||||||
}
|
}
|
||||||
|
public string TypeName
|
||||||
|
{
|
||||||
|
get { return _typeName; }
|
||||||
|
}
|
||||||
public MetaColor Color
|
public MetaColor Color
|
||||||
{
|
{
|
||||||
get { return _color; }
|
get { return _color; }
|
||||||
@ -65,15 +72,20 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
{
|
{
|
||||||
get { return _tags; }
|
get { return _tags; }
|
||||||
}
|
}
|
||||||
|
public bool IsHidden
|
||||||
|
{
|
||||||
|
get { return _isHidden; }
|
||||||
|
}
|
||||||
|
|
||||||
public DragonDocsMeta(TypeMeta meta)
|
public DragonDocsMeta(TypeMeta meta)
|
||||||
{
|
{
|
||||||
_sourceType = meta.Type;
|
_sourceType = meta.Type;
|
||||||
_assemblyQualifiedName = meta.Type.AssemblyQualifiedName;
|
_assemblyQualifiedName = meta.Type.AssemblyQualifiedName;
|
||||||
_memberType = meta.EcsMemberType;
|
//_memberType = meta.EcsMemberType;
|
||||||
|
|
||||||
_name = meta.Name;
|
_name = meta.Name;
|
||||||
_isCustomName = meta.IsCustomName;
|
_isCustomName = meta.IsCustomName;
|
||||||
|
_typeName = meta.TypeName;
|
||||||
_color = meta.Color;
|
_color = meta.Color;
|
||||||
_isCustomColor = meta.IsCustomColor;
|
_isCustomColor = meta.IsCustomColor;
|
||||||
_autor = meta.Description.Author;
|
_autor = meta.Description.Author;
|
||||||
@ -94,6 +106,8 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
{
|
{
|
||||||
_tags[i] = meta.Tags[i];
|
_tags[i] = meta.Tags[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isHidden = meta.IsHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetSourceType(out Type type)
|
public bool TryGetSourceType(out Type type)
|
||||||
@ -111,11 +125,8 @@ namespace DCFApixels.DragonECS.Unity.Docs
|
|||||||
|
|
||||||
int IComparable<DragonDocsMeta>.CompareTo(DragonDocsMeta other)
|
int IComparable<DragonDocsMeta>.CompareTo(DragonDocsMeta other)
|
||||||
{
|
{
|
||||||
// int c = string.Compare(_group, other._group);
|
int c = string.Compare(_group, other._group);
|
||||||
// //return c == 0 ? c : string.Compare(_name, other._name);
|
return c == 0 ? string.Compare(_name, other._name) : c;
|
||||||
// return c;
|
|
||||||
int c = string.Compare(_name, other._name);
|
|
||||||
return c == 0 ? c : string.Compare(_group, other._group);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,19 +9,19 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
[FilePath(EcsConsts.AUTHOR + "/" + EcsConsts.FRAMEWORK_NAME + "/" + nameof(DragonDocsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)]
|
[FilePath(EcsConsts.AUTHOR + "/" + EcsConsts.FRAMEWORK_NAME + "/" + nameof(DragonDocsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)]
|
||||||
internal class DragonDocsPrefs : ScriptableSingleton<DragonDocsPrefs>
|
internal class DragonDocsPrefs : ScriptableSingleton<DragonDocsPrefs>
|
||||||
{
|
{
|
||||||
[SerializeField] private DragonDocs _docs;
|
[SerializeField] private DragonDocs m_docs;
|
||||||
[SerializeField] private bool[] _isExpands;
|
[SerializeField] private bool[] m_isExpands;
|
||||||
|
|
||||||
[NonSerialized] private bool _isInitInfos = false;
|
[NonSerialized] private bool _isInitInfos = false;
|
||||||
[NonSerialized] private MetaGroupInfo[] _infos = null;
|
[NonSerialized] private MetaGroupInfo[] _infos = null;
|
||||||
|
|
||||||
public DragonDocs Docs
|
public DragonDocs Docs
|
||||||
{
|
{
|
||||||
get { return _docs; }
|
get { return m_docs; }
|
||||||
}
|
}
|
||||||
public Span<bool> IsExpands
|
public Span<bool> IsExpands
|
||||||
{
|
{
|
||||||
get { return new Span<bool>(_isExpands, 0, _docs.Metas.Length); }
|
get { return new Span<bool>(m_isExpands, 0, m_docs.Metas.Length); }
|
||||||
}
|
}
|
||||||
public ReadOnlySpan<MetaGroupInfo> Infos
|
public ReadOnlySpan<MetaGroupInfo> Infos
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
{
|
{
|
||||||
if (_isInitInfos) { return; }
|
if (_isInitInfos) { return; }
|
||||||
ReadOnlySpan<DragonDocsMeta> metas;
|
ReadOnlySpan<DragonDocsMeta> metas;
|
||||||
if (_docs == null || (metas = _docs.Metas).IsEmpty)
|
if (m_docs == null || (metas = m_docs.Metas).IsEmpty)
|
||||||
{
|
{
|
||||||
_infos = Array.Empty<MetaGroupInfo>();
|
_infos = Array.Empty<MetaGroupInfo>();
|
||||||
_isInitInfos = true;
|
_isInitInfos = true;
|
||||||
@ -53,7 +53,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(groupPath))
|
if (string.IsNullOrEmpty(groupPath))
|
||||||
{
|
{
|
||||||
groups.Add(new MetaGroupInfo("<ROOT>", "<ROOT>", startIndex, i - startIndex, 0));
|
groups.Add(new MetaGroupInfo("", "<OTHER>", startIndex, i - startIndex, 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -73,12 +73,12 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
private void AddInfo(List<MetaGroupInfo> infos, string path, int startIndex, int length)
|
private void AddInfo(List<MetaGroupInfo> infos, string path, int startIndex, int length)
|
||||||
{
|
{
|
||||||
MetaGroupInfo lastInfo = infos[infos.Count - 1];
|
MetaGroupInfo lastInfo = infos[infos.Count - 1];
|
||||||
if (lastInfo.Depth == 0) { lastInfo = new MetaGroupInfo("", "", 0, 0, 0); }
|
//if (lastInfo.Depth == 0) { lastInfo = new MetaGroupInfo("", "", 0, 0, 0); }
|
||||||
int depth = 1;
|
int depth = 0;
|
||||||
int lastSeparatorIndex = 0;
|
int lastSeparatorIndex = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int nameLength = 0;
|
int nameLength = 0;
|
||||||
if(lastInfo.Path.Length <= path.Length)
|
//if(lastInfo.Path.Length <= path.Length)
|
||||||
{
|
{
|
||||||
for (int j = 0, jMax = lastInfo.Path.Length; j < jMax; j++)
|
for (int j = 0, jMax = lastInfo.Path.Length; j < jMax; j++)
|
||||||
{
|
{
|
||||||
@ -123,11 +123,11 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
|
|
||||||
public void Save(DragonDocs docs)
|
public void Save(DragonDocs docs)
|
||||||
{
|
{
|
||||||
_docs = docs;
|
m_docs = docs;
|
||||||
if(_isExpands == null || _isExpands.Length != docs.Metas.Length)
|
if(m_isExpands == null || m_isExpands.Length != docs.Metas.Length)
|
||||||
{
|
{
|
||||||
Array.Resize(ref _isExpands, docs.Metas.Length);
|
Array.Resize(ref m_isExpands, docs.Metas.Length);
|
||||||
_isExpands[0] = true;
|
m_isExpands[0] = true;
|
||||||
}
|
}
|
||||||
_isInitInfos = false;
|
_isInitInfos = false;
|
||||||
_infos = null;
|
_infos = null;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using DCFApixels.DragonECS.Unity.Editors;
|
using DCFApixels.DragonECS.Unity.Editors;
|
||||||
using DCFApixels.DragonECS.Unity.Internal;
|
using DCFApixels.DragonECS.Unity.Internal;
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
{
|
{
|
||||||
var wnd = GetWindow<DragonDocsWindow>();
|
var wnd = GetWindow<DragonDocsWindow>();
|
||||||
wnd.titleContent = new GUIContent($"{EcsConsts.FRAMEWORK_NAME} Documentation");
|
wnd.titleContent = new GUIContent($"{EcsConsts.FRAMEWORK_NAME} Documentation");
|
||||||
|
wnd.minSize = new Vector2(100f, 120f);
|
||||||
wnd.Show();
|
wnd.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,22 +40,51 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
get { return SettingsPrefs.instance.IsShowHidden; }
|
get { return SettingsPrefs.instance.IsShowHidden; }
|
||||||
set { SettingsPrefs.instance.IsShowHidden = value; }
|
set { SettingsPrefs.instance.IsShowHidden = value; }
|
||||||
}
|
}
|
||||||
|
private static bool IsUseCustomNames
|
||||||
|
{
|
||||||
|
get { return SettingsPrefs.instance.IsUseCustomNames; }
|
||||||
|
set { SettingsPrefs.instance.IsUseCustomNames = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool _searchingSampleChanged = false;
|
||||||
|
private string _searchingSampleEnter = string.Empty;
|
||||||
|
private string _searchingSample = string.Empty;
|
||||||
|
private bool[] _searchingHideMetaMap = System.Array.Empty<bool>();
|
||||||
|
private bool[] _searchingHideGroupMap = System.Array.Empty<bool>();
|
||||||
|
|
||||||
private void OnGUI()
|
private void OnGUI()
|
||||||
{
|
{
|
||||||
Event current = Event.current;
|
Event current = Event.current;
|
||||||
DragonDocs docs = DragonDocsPrefs.instance.Docs;
|
DragonDocs docs = DragonDocsPrefs.instance.Docs;
|
||||||
if(docs == null || docs.Metas.IsEmpty)
|
var metas = docs.Metas;
|
||||||
|
if (docs == null || docs.Metas.IsEmpty)
|
||||||
{
|
{
|
||||||
docs = DragonDocs.Generate();
|
docs = DragonDocs.Generate();
|
||||||
DragonDocsPrefs.instance.Save(docs);
|
DragonDocsPrefs.instance.Save(docs);
|
||||||
}
|
}
|
||||||
|
var infos = DragonDocsPrefs.instance.Infos;
|
||||||
|
if (_searchingHideMetaMap.Length < metas.Length)
|
||||||
|
{
|
||||||
|
System.Array.Resize(ref _searchingHideMetaMap, metas.Length);
|
||||||
|
}
|
||||||
|
if (_searchingHideGroupMap.Length < infos.Length)
|
||||||
|
{
|
||||||
|
System.Array.Resize(ref _searchingHideGroupMap, DragonDocsPrefs.instance.Infos.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_selectedIndex < 0 || _selectedIndex >= infos.Length)
|
||||||
|
{
|
||||||
|
_selectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DrawToolbar();
|
||||||
|
|
||||||
GUILayout.BeginHorizontal(GUILayout.ExpandHeight(true));
|
GUILayout.BeginHorizontal(GUILayout.ExpandHeight(true));
|
||||||
|
|
||||||
|
|
||||||
ButtonsScrolPosition = GUILayout.BeginScrollView(ButtonsScrolPosition, UnityEditorUtility.GetStyle(Color.black, 0.1f), GUILayout.Width(_buttonsWidth));
|
ButtonsScrolPosition = GUILayout.BeginScrollView(ButtonsScrolPosition, UnityEditorUtility.GetStyle(Color.black, 0f), GUILayout.Width(_buttonsWidth));
|
||||||
var selectedGroupInfo = DrawGroups();
|
var selectedGroupInfo = DrawGroups();
|
||||||
GUILayout.EndScrollView();
|
GUILayout.EndScrollView();
|
||||||
|
|
||||||
@ -66,25 +97,146 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
DrawSelectedGroupMeta(selectedGroupInfo);
|
DrawSelectedGroupMeta(selectedGroupInfo);
|
||||||
GUILayout.EndScrollView();
|
GUILayout.EndScrollView();
|
||||||
|
|
||||||
|
//GUILayout.Space(EditorGUIUtility.standardVerticalSpacing * -2f);
|
||||||
GUILayout.EndHorizontal();
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
Rect r = GUILayoutUtility.GetLastRect();
|
||||||
|
float h = r.height;
|
||||||
|
r.height = EditorGUIUtility.standardVerticalSpacing;
|
||||||
|
//EditorGUI.DrawRect(r, new Color(0, 0, 0, 0.3f));
|
||||||
|
r.y += h;
|
||||||
|
EditorGUI.DrawRect(r, new Color(0, 0, 0, 0.3f));
|
||||||
|
|
||||||
GUI.enabled = true;
|
GUI.enabled = true;
|
||||||
IsShowHidden = EditorGUILayout.Toggle("Show Hidden", IsShowHidden);
|
|
||||||
if (GUILayout.Button("Update"))
|
GUILayout.Label(infos[_selectedIndex].Path);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawToolbar()
|
||||||
|
{
|
||||||
|
using (EcsGUI.SetColor(GUI.color * 0.8f))
|
||||||
|
GUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||||
|
GUILayout.Space(EditorGUIUtility.standardVerticalSpacing * 2f);
|
||||||
|
|
||||||
|
if (GUILayout.Button("Update", EditorStyles.toolbarButton, GUILayout.Width(80f)))
|
||||||
{
|
{
|
||||||
docs = DragonDocs.Generate();
|
DragonDocs docs = DragonDocs.Generate();
|
||||||
DragonDocsPrefs.instance.Save(docs);
|
DragonDocsPrefs.instance.Save(docs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (EcsGUI.Layout.IconButton(IsShowHidden ? Icons.Instance.VisibilityIconOn : Icons.Instance.VisibilityIconOff, 0f, IsShowHidden ? "Show Hidden" : "Don't Show Hidden", EditorStyles.toolbarButton, GUILayout.Width(EditorGUIUtility.singleLineHeight * 1.6f)))
|
||||||
|
{
|
||||||
|
IsShowHidden = !IsShowHidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EcsGUI.Layout.IconButton(IsUseCustomNames ? Icons.Instance.LabelIconMeta : Icons.Instance.LabelIconType, 1f, IsUseCustomNames ? "Use Meta Name" : "Use Type Name", EditorStyles.toolbarButton, GUILayout.Width(EditorGUIUtility.singleLineHeight * 1.6f)))
|
||||||
|
{
|
||||||
|
IsUseCustomNames = !IsUseCustomNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.Label("");
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
_searchingSampleEnter = EditorGUILayout.TextField(_searchingSampleEnter, EditorStyles.toolbarTextField, GUILayout.ExpandHeight(true), GUILayout.MaxWidth(200f));
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
_searchingSampleChanged = true;
|
||||||
|
}
|
||||||
|
if ((_searchingSampleChanged && Event.current.keyCode == KeyCode.Return) ||
|
||||||
|
EcsGUI.Layout.IconButton(Icons.Instance.SearchIcon, 3f, null, EditorStyles.toolbarButton, GUILayout.ExpandHeight(true), GUILayout.Width(EditorGUIUtility.singleLineHeight * 1.6f)))
|
||||||
|
{
|
||||||
|
Searh();
|
||||||
|
}
|
||||||
|
GUILayout.Space(EditorGUIUtility.standardVerticalSpacing * 2f);
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.Space(EditorGUIUtility.standardVerticalSpacing * -2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Searh()
|
||||||
|
{
|
||||||
|
_searchingSample = _searchingSampleEnter;
|
||||||
|
_searchingSampleChanged = false;
|
||||||
|
DragonDocs docs = DragonDocsPrefs.instance.Docs;
|
||||||
|
var metas = docs.Metas;
|
||||||
|
if (_searchingSample.Length <= 0)
|
||||||
|
{
|
||||||
|
var infos = DragonDocsPrefs.instance.Infos;
|
||||||
|
var isExpands = DragonDocsPrefs.instance.IsExpands;
|
||||||
|
|
||||||
|
for (int i = 0; i < _searchingHideMetaMap.Length; i++)
|
||||||
|
{
|
||||||
|
_searchingHideMetaMap[i] = false;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < _searchingHideGroupMap.Length; i++)
|
||||||
|
{
|
||||||
|
_searchingHideGroupMap[i] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int i = _selectedIndex;
|
||||||
|
var info = infos[i];
|
||||||
|
int depth = info.Depth;
|
||||||
|
while (depth > 0)
|
||||||
|
{
|
||||||
|
i--;
|
||||||
|
info = infos[i];
|
||||||
|
|
||||||
|
if (info.Depth >= depth)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
depth = info.Depth;
|
||||||
|
isExpands[i] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var infos = DragonDocsPrefs.instance.Infos;
|
||||||
|
|
||||||
|
for (int i = 0; i < infos.Length; i++)
|
||||||
|
{
|
||||||
|
var info = infos[i];
|
||||||
|
int visibleCount = 0;
|
||||||
|
bool isUseCustomNames = IsUseCustomNames;
|
||||||
|
for (int j = info.StartIndex, jMax = j + info.Length; j < jMax; j++)
|
||||||
|
{
|
||||||
|
var b = (isUseCustomNames ? metas[j].Name : metas[j].TypeName).Contains(_searchingSample, System.StringComparison.InvariantCultureIgnoreCase);
|
||||||
|
_searchingHideMetaMap[j] = !b;
|
||||||
|
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
visibleCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_searchingHideGroupMap[i] = visibleCount == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void DrawSelectedGroupMeta(MetaGroupInfo info)
|
private void DrawSelectedGroupMeta(MetaGroupInfo info)
|
||||||
{
|
{
|
||||||
|
bool hide = IsShowHidden == false;
|
||||||
var metas = Prefs.Docs.Metas;
|
var metas = Prefs.Docs.Metas;
|
||||||
for (int i = 0, j = info.StartIndex; i < info.Length; i++, j++)
|
int iMax = info.Length;
|
||||||
|
for (int i = 0, j = info.StartIndex; i < iMax; j++)
|
||||||
{
|
{
|
||||||
DrawMeta(metas[j], i, 12);
|
if (_searchingHideMetaMap[j] || (metas[j]._isHidden && hide))
|
||||||
|
{
|
||||||
|
iMax--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DrawMeta(metas[j], i, 12);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iMax <= 0)
|
||||||
|
{
|
||||||
|
GUILayout.Label(info.Length <= 0 ? "empty group" : "there are hidden items", EditorStyles.centeredGreyMiniLabel, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,10 +248,19 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
Color alphaPanelColor = panelColor;
|
Color alphaPanelColor = panelColor;
|
||||||
alphaPanelColor.a = EscEditorConsts.COMPONENT_DRAWER_ALPHA;
|
alphaPanelColor.a = EscEditorConsts.COMPONENT_DRAWER_ALPHA;
|
||||||
|
|
||||||
|
|
||||||
GUILayout.BeginVertical(UnityEditorUtility.GetStyle(alphaPanelColor));
|
GUILayout.BeginVertical(UnityEditorUtility.GetStyle(alphaPanelColor));
|
||||||
GUILayout.Space(1f);
|
GUILayout.Space(1f);
|
||||||
GUILayout.TextArea(meta.Name, EditorStyles.boldLabel);
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
GUILayout.TextArea(IsUseCustomNames ? meta.Name : meta.TypeName, EditorStyles.boldLabel, GUILayout.ExpandWidth(false));
|
||||||
|
if (meta.IsCustomName)
|
||||||
|
{
|
||||||
|
using (EcsGUI.SetAlpha(0.64f)) using (EcsGUI.SetAlignment(GUI.skin.label, TextAnchor.MiddleRight))
|
||||||
|
{
|
||||||
|
GUILayout.TextArea(IsUseCustomNames ? meta.TypeName : meta.Name, GUI.skin.label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
Rect lastRect = GUILayoutUtility.GetLastRect();
|
Rect lastRect = GUILayoutUtility.GetLastRect();
|
||||||
if (string.IsNullOrEmpty(meta.Description) == false)
|
if (string.IsNullOrEmpty(meta.Description) == false)
|
||||||
@ -140,21 +301,27 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
|
|
||||||
private MetaGroupInfo DrawGroups()
|
private MetaGroupInfo DrawGroups()
|
||||||
{
|
{
|
||||||
|
Event current = Event.current;
|
||||||
|
MetaGroupInfo result = new MetaGroupInfo("NO_NAME", "NO_NAME", 0, 0, 0);
|
||||||
|
var infos = Prefs.Infos;
|
||||||
|
var isExpands = Prefs.IsExpands;
|
||||||
|
|
||||||
using (EcsGUI.SetIndentLevel(0))
|
using (EcsGUI.SetIndentLevel(0))
|
||||||
{
|
{
|
||||||
Event current = Event.current;
|
|
||||||
MetaGroupInfo result = new MetaGroupInfo("NO_NAME", "NO_NAME", 0, 0, 0);
|
|
||||||
var infos = Prefs.Infos;
|
|
||||||
var IsExpands = Prefs.IsExpands;
|
|
||||||
|
|
||||||
int clippingDepth = int.MaxValue;
|
int clippingDepth = int.MaxValue;
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < infos.Length; i++)
|
for (int i = 0; i < infos.Length; i++)
|
||||||
{
|
{
|
||||||
|
if (_searchingHideGroupMap[i]) { continue; }
|
||||||
|
|
||||||
var groupInfo = infos[i];
|
var groupInfo = infos[i];
|
||||||
|
|
||||||
if (groupInfo.Depth > clippingDepth)
|
if (i == _selectedIndex)
|
||||||
|
{
|
||||||
|
result = groupInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_searchingSample.Length == 0 && groupInfo.Depth > clippingDepth)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -163,47 +330,58 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
clippingDepth = int.MaxValue;
|
clippingDepth = int.MaxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorGUI.indentLevel = groupInfo.Depth;
|
if(_searchingSample.Length == 0)
|
||||||
|
{
|
||||||
|
EditorGUI.indentLevel = groupInfo.Depth;
|
||||||
|
}
|
||||||
|
|
||||||
GUIContent label = UnityEditorUtility.GetLabel(groupInfo.Name);
|
GUIContent label = UnityEditorUtility.GetLabel(_searchingSample.Length == 0 ? groupInfo.Name : groupInfo.Path);
|
||||||
Rect r = GUILayoutUtility.GetRect(label, EditorStyles.foldout);
|
Rect r = GUILayoutUtility.GetRect(label, EditorStyles.foldout);
|
||||||
|
|
||||||
if (i == _selectedIndex)
|
if (i == _selectedIndex)
|
||||||
{
|
{
|
||||||
EditorGUI.DrawRect(r, new Color(0.12f, 0.5f, 1f, 0.40f));
|
EditorGUI.DrawRect(r, new Color(0.12f, 0.5f, 1f, 0.40f));
|
||||||
result = groupInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isClick;
|
using (EcsGUI.SetColor(0, 0, 0, 0)) using (EcsGUI.Disable) { GUI.Button(r, ""); }
|
||||||
using (EcsGUI.SetColor(0, 0, 0, 0))
|
|
||||||
using (EcsGUI.Disable)
|
bool isClick = false;
|
||||||
{
|
|
||||||
isClick = GUI.Button(r, "");
|
|
||||||
}
|
|
||||||
if (EcsGUI.HitTest(r))
|
if (EcsGUI.HitTest(r))
|
||||||
{
|
{
|
||||||
EditorGUI.DrawRect(r, new Color(1f, 1f, 1f, 0.12f));
|
EditorGUI.DrawRect(r, new Color(1f, 1f, 1f, 0.12f));
|
||||||
if (current.type == EventType.MouseDown)
|
if (current.type == EventType.MouseUp)
|
||||||
{
|
{
|
||||||
_selectedIndex = i;
|
isClick = true;
|
||||||
|
|
||||||
|
//_selectedIndex = i;
|
||||||
|
//current.Use();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i + 1 == infos.Length || infos[i + 1].Depth <= groupInfo.Depth)
|
if (_searchingSample.Length != 0 || (i + 1 == infos.Length || infos[i + 1].Depth <= groupInfo.Depth))
|
||||||
{
|
{
|
||||||
using (EcsGUI.SetBackgroundColor(0, 0, 0, 0))
|
using (EcsGUI.SetBackgroundColor(0, 0, 0, 0))
|
||||||
|
{
|
||||||
EditorGUI.Foldout(r, false, label, EditorStyles.foldout);
|
EditorGUI.Foldout(r, false, label, EditorStyles.foldout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IsExpands[i] = EditorGUI.Foldout(r, IsExpands[i], label, EditorStyles.foldout);
|
EditorGUI.BeginChangeCheck();
|
||||||
if (i == 0)
|
isExpands[i] = EditorGUI.Foldout(r, isExpands[i], label, EditorStyles.foldout);
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
{
|
{
|
||||||
IsExpands[i] = true;
|
isClick = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsExpands[i] == false)
|
if (isClick)
|
||||||
|
{
|
||||||
|
_selectedIndex = i;
|
||||||
|
current.Use();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isExpands[i] == false)
|
||||||
{
|
{
|
||||||
clippingDepth = groupInfo.Depth;
|
clippingDepth = groupInfo.Depth;
|
||||||
}
|
}
|
||||||
@ -218,9 +396,8 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
EditorGUI.DrawRect(r, new Color(0.2f, 0.6f, 1f));
|
EditorGUI.DrawRect(r, new Color(0.2f, 0.6f, 1f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawDragger()
|
private void DrawDragger()
|
||||||
@ -237,7 +414,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
rect.x -= m / 2f;
|
rect.x -= m / 2f;
|
||||||
rect.width = m;
|
rect.width = m;
|
||||||
|
|
||||||
EditorGUI.DrawRect(rect.AddPadding(1f, 0), new Color(0,0,0,0.5f));
|
EditorGUI.DrawRect(rect.AddPadding(1f, 0), new Color(0, 0, 0, 0.3f));
|
||||||
|
|
||||||
Event current = Event.current;
|
Event current = Event.current;
|
||||||
switch (current.type)
|
switch (current.type)
|
||||||
@ -252,7 +429,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EventType.MouseUp:
|
case EventType.MouseUp:
|
||||||
if(_dragState != DragState.None)
|
if (_dragState != DragState.None)
|
||||||
{
|
{
|
||||||
_dragState = DragState.None;
|
_dragState = DragState.None;
|
||||||
current.Use();
|
current.Use();
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
namespace DCFApixels.DragonECS
|
|
||||||
{
|
|
||||||
public class EcsUnityConsts
|
|
||||||
{
|
|
||||||
public const string UNITY_GROUP = "Unity";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using DCFApixels.DragonECS.Unity.Internal;
|
using DCFApixels.DragonECS.Unity;
|
||||||
|
using DCFApixels.DragonECS.Unity.Internal;
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -12,8 +13,8 @@ namespace DCFApixels.DragonECS
|
|||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(MonoEntityTemplate), 30)]
|
[AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(MonoEntityTemplate), 30)]
|
||||||
[MetaColor(MetaColor.Cyan)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(EcsConsts.FRAMEWORK_GROUP, EcsUnityConsts.UNITY_GROUP)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
[MetaDescription(EcsConsts.AUTHOR, nameof(MonoBehaviour) + " implementation of an entity template. Templates are a set of components that are applied to entities.")]
|
||||||
public class MonoEntityTemplate : MonoEntityTemplateBase, ITemplateInternal
|
public class MonoEntityTemplate : MonoEntityTemplateBase, ITemplateInternal
|
||||||
{
|
{
|
||||||
[SerializeReference]
|
[SerializeReference]
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using DCFApixels.DragonECS.Unity.Internal;
|
using DCFApixels.DragonECS.Unity;
|
||||||
|
using DCFApixels.DragonECS.Unity.Internal;
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -10,8 +11,8 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
|
|
||||||
[MetaColor(MetaColor.Cyan)]
|
[MetaColor(MetaColor.Cyan)]
|
||||||
[MetaGroup(EcsConsts.FRAMEWORK_GROUP, EcsUnityConsts.UNITY_GROUP)]
|
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)]
|
||||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
[MetaDescription(EcsConsts.AUTHOR, nameof(ScriptableObject) + " implementation of an entity template. Templates are a set of components that are applied to entities.")]
|
||||||
[CreateAssetMenu(fileName = nameof(ScriptableEntityTemplate), menuName = EcsConsts.FRAMEWORK_NAME + "/" + nameof(ScriptableEntityTemplate), order = 1)]
|
[CreateAssetMenu(fileName = nameof(ScriptableEntityTemplate), menuName = EcsConsts.FRAMEWORK_NAME + "/" + nameof(ScriptableEntityTemplate), order = 1)]
|
||||||
public class ScriptableEntityTemplate : ScriptableEntityTemplateBase, ITemplateInternal
|
public class ScriptableEntityTemplate : ScriptableEntityTemplateBase, ITemplateInternal
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
{
|
{
|
||||||
internal class Icons : Config<Icons>
|
internal class Icons : Config<Icons>
|
||||||
{
|
{
|
||||||
//Thank f*cking balls, everything inside #if UNITY_EDITOR is not serialized in the release build
|
//Everything inside #if UNITY_EDITOR is not serialized in the release build
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Texture _helpIcon;
|
private Texture _helpIcon;
|
||||||
@ -18,12 +18,28 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
private Texture _auotsetIcon;
|
private Texture _auotsetIcon;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Texture _auotsetCascadeIcon;
|
private Texture _auotsetCascadeIcon;
|
||||||
|
[SerializeField]
|
||||||
|
private Texture _searchIcon;
|
||||||
|
[SerializeField]
|
||||||
|
private Texture _visibilityIconOn;
|
||||||
|
[SerializeField]
|
||||||
|
private Texture _visibilityIconOff;
|
||||||
|
[SerializeField]
|
||||||
|
private Texture _labelIconType;
|
||||||
|
[SerializeField]
|
||||||
|
private Texture _labelIconMeta;
|
||||||
|
|
||||||
internal Texture HelpIcon { get { return _helpIcon; } }
|
internal Texture HelpIcon { get { return _helpIcon; } }
|
||||||
internal Texture CloseIcon { get { return _closeIcon; } }
|
internal Texture CloseIcon { get { return _closeIcon; } }
|
||||||
internal Texture CloseIconOn { get { return _closeIconOn; } }
|
internal Texture CloseIconOn { get { return _closeIconOn; } }
|
||||||
internal Texture UnlinkIcon { get { return _unlinkIcon; } }
|
internal Texture UnlinkIcon { get { return _unlinkIcon; } }
|
||||||
internal Texture AuotsetIcon { get { return _auotsetIcon; } }
|
internal Texture AuotsetIcon { get { return _auotsetIcon; } }
|
||||||
internal Texture AutosetCascadeIcon { get { return _auotsetCascadeIcon; } }
|
internal Texture AutosetCascadeIcon { get { return _auotsetCascadeIcon; } }
|
||||||
|
internal Texture SearchIcon { get { return _searchIcon; } }
|
||||||
|
internal Texture VisibilityIconOn { get { return _visibilityIconOn; } }
|
||||||
|
internal Texture VisibilityIconOff { get { return _visibilityIconOff; } }
|
||||||
|
internal Texture LabelIconType { get { return _labelIconType; } }
|
||||||
|
internal Texture LabelIconMeta { get { return _labelIconMeta; } }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,12 +4,17 @@ MonoImporter:
|
|||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences:
|
defaultReferences:
|
||||||
- _helpIcon: {fileID: 2800000, guid: e135cf23a5d53ce48a75e163b41e39d5, type: 3}
|
- _helpIcon: {fileID: 2800000, guid: e135cf23a5d53ce48a75e163b41e39d5, type: 3}
|
||||||
- _closeIcon: {fileID: 2800000, guid: 8a708e50662813d4a99c107e6431a60b, type: 3}
|
- _closeIcon: {fileID: 2800000, guid: 8a708e50662813d4a99c107e6431a60b, type: 3}
|
||||||
- _closeIconOn: {fileID: 2800000, guid: 6a1d402595b00c24db2ba647fed93a5c, type: 3}
|
- _closeIconOn: {fileID: 2800000, guid: 6a1d402595b00c24db2ba647fed93a5c, type: 3}
|
||||||
- _unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3}
|
- _unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3}
|
||||||
- _auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3}
|
- _auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3}
|
||||||
- _auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3}
|
- _auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3}
|
||||||
|
- _searchIcon: {fileID: 2800000, guid: 239e73d04c7ba4649bc4cc10e70e62e5, type: 3}
|
||||||
|
- _visibilityIconOn: {fileID: 2800000, guid: 9ce9d719a106be04fa4cf0c369c61e1c, type: 3}
|
||||||
|
- _visibilityIconOff: {fileID: 2800000, guid: 1f25a5ca611092642a8ee4e08fafcd43, type: 3}
|
||||||
|
- _labelIconType: {fileID: 2800000, guid: 5476d6e1435981e4cbc915a080f93ee6, type: 3}
|
||||||
|
- _labelIconMeta: {fileID: 2800000, guid: ebb82b09315bde749a10dfa45e64067c, type: 3}
|
||||||
executionOrder: 0
|
executionOrder: 0
|
||||||
icon: {instanceID: 0}
|
icon: {instanceID: 0}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
BIN
src/Icons/LabelIconMeta.png
Normal file
BIN
src/Icons/LabelIconMeta.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
122
src/Icons/LabelIconMeta.png.meta
Normal file
122
src/Icons/LabelIconMeta.png.meta
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ebb82b09315bde749a10dfa45e64067c
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
src/Icons/LabelIconType.png
Normal file
BIN
src/Icons/LabelIconType.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
122
src/Icons/LabelIconType.png.meta
Normal file
122
src/Icons/LabelIconType.png.meta
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5476d6e1435981e4cbc915a080f93ee6
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
src/Icons/SearchIcon.png
Normal file
BIN
src/Icons/SearchIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
122
src/Icons/SearchIcon.png.meta
Normal file
122
src/Icons/SearchIcon.png.meta
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 239e73d04c7ba4649bc4cc10e70e62e5
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
src/Icons/VisibilityIconOff.png
Normal file
BIN
src/Icons/VisibilityIconOff.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
122
src/Icons/VisibilityIconOff.png.meta
Normal file
122
src/Icons/VisibilityIconOff.png.meta
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1f25a5ca611092642a8ee4e08fafcd43
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
src/Icons/VisibilityIconOn.png
Normal file
BIN
src/Icons/VisibilityIconOn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
122
src/Icons/VisibilityIconOn.png.meta
Normal file
122
src/Icons/VisibilityIconOn.png.meta
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9ce9d719a106be04fa4cf0c369c61e1c
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -80,6 +80,24 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
EditorGUI.indentLevel = _value;
|
EditorGUI.indentLevel = _value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public struct AlignmentScope : IDisposable
|
||||||
|
{
|
||||||
|
private readonly GUIStyle _target;
|
||||||
|
private readonly TextAnchor _value;
|
||||||
|
public AlignmentScope(GUIStyle target, TextAnchor value)
|
||||||
|
{
|
||||||
|
_target = target;
|
||||||
|
_value = _target.alignment;
|
||||||
|
_target.alignment = value;
|
||||||
|
}
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
_target.alignment = _value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public static AlignmentScope SetAlignment(GUIStyle target, TextAnchor value) => new AlignmentScope(target, value);
|
||||||
public static IndentLevelScope SetIndentLevel(int level) => new IndentLevelScope(level);
|
public static IndentLevelScope SetIndentLevel(int level) => new IndentLevelScope(level);
|
||||||
public static ContentColorScope SetContentColor(Color value) => new ContentColorScope(value);
|
public static ContentColorScope SetContentColor(Color value) => new ContentColorScope(value);
|
||||||
public static ContentColorScope SetContentColor(float r, float g, float b, float a = 1f) => new ContentColorScope(r, g, b, a);
|
public static ContentColorScope SetContentColor(float r, float g, float b, float a = 1f) => new ContentColorScope(r, g, b, a);
|
||||||
@ -91,7 +109,8 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
public static EditorGUI.DisabledScope Enable => new EditorGUI.DisabledScope(false);
|
public static EditorGUI.DisabledScope Enable => new EditorGUI.DisabledScope(false);
|
||||||
public static EditorGUI.DisabledScope Disable => new EditorGUI.DisabledScope(true);
|
public static EditorGUI.DisabledScope Disable => new EditorGUI.DisabledScope(true);
|
||||||
public static EditorGUI.DisabledScope SetEnable(bool value) => new EditorGUI.DisabledScope(!value);
|
public static EditorGUI.DisabledScope SetEnable(bool value) => new EditorGUI.DisabledScope(!value);
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
private static readonly BindingFlags fieldFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
private static readonly BindingFlags fieldFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
||||||
|
|
||||||
@ -161,6 +180,14 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
#region small elems
|
#region small elems
|
||||||
public static void DrawIcon(Rect position, Texture icon, float iconPadding, string description)
|
public static void DrawIcon(Rect position, Texture icon, float iconPadding, string description)
|
||||||
{
|
{
|
||||||
|
if(position.width != position.height)
|
||||||
|
{
|
||||||
|
Vector2 center = position.center;
|
||||||
|
float size = Mathf.Min(position.width, position.height);
|
||||||
|
position.height = size;
|
||||||
|
position.width = size;
|
||||||
|
position.center = center;
|
||||||
|
}
|
||||||
using (SetColor(GUI.enabled ? GUI.color : GUI.color * new Color(1f, 1f, 1f, 0.4f)))
|
using (SetColor(GUI.enabled ? GUI.color : GUI.color * new Color(1f, 1f, 1f, 0.4f)))
|
||||||
{
|
{
|
||||||
GUI.Label(position, UnityEditorUtility.GetLabel(string.Empty, description));
|
GUI.Label(position, UnityEditorUtility.GetLabel(string.Empty, description));
|
||||||
@ -389,8 +416,41 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
EditorGUI.EndProperty();
|
EditorGUI.EndProperty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static class Layout
|
public static class Layout
|
||||||
{
|
{
|
||||||
|
public static bool IconButton(Texture icon, params GUILayoutOption[] options)
|
||||||
|
{
|
||||||
|
bool result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), options);
|
||||||
|
DrawIcon(GUILayoutUtility.GetLastRect(), icon, 0, null);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public static bool IconButton(Texture icon, float iconPadding = 0, string description = null)
|
||||||
|
{
|
||||||
|
bool result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty));
|
||||||
|
DrawIcon(GUILayoutUtility.GetLastRect(), icon, iconPadding, description);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public static bool IconButton(Texture icon, float iconPadding = 0, string description = null, GUIStyle style = null, params GUILayoutOption[] options)
|
||||||
|
{
|
||||||
|
bool result;
|
||||||
|
if(style == null)
|
||||||
|
{
|
||||||
|
result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), options);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), style, options);
|
||||||
|
}
|
||||||
|
DrawIcon(GUILayoutUtility.GetLastRect(), icon, iconPadding, description);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static void DrawEmptyComponentProperty(SerializedProperty property, string name, bool isDisplayEmpty)
|
public static void DrawEmptyComponentProperty(SerializedProperty property, string name, bool isDisplayEmpty)
|
||||||
{
|
{
|
||||||
EcsGUI.DrawEmptyComponentProperty(GUILayoutUtility.GetRect(UnityEditorUtility.GetLabel(name), EditorStyles.label), property, name, isDisplayEmpty);
|
EcsGUI.DrawEmptyComponentProperty(GUILayoutUtility.GetRect(UnityEditorUtility.GetLabel(name), EditorStyles.label), property, name, isDisplayEmpty);
|
||||||
|
|||||||
@ -18,3 +18,8 @@ MonoBehaviour:
|
|||||||
_unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3}
|
_unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3}
|
||||||
_auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3}
|
_auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3}
|
||||||
_auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3}
|
_auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3}
|
||||||
|
_searchIcon: {fileID: 2800000, guid: 239e73d04c7ba4649bc4cc10e70e62e5, type: 3}
|
||||||
|
_visibilityIconOn: {fileID: 2800000, guid: 9ce9d719a106be04fa4cf0c369c61e1c, type: 3}
|
||||||
|
_visibilityIconOff: {fileID: 2800000, guid: 1f25a5ca611092642a8ee4e08fafcd43, type: 3}
|
||||||
|
_labelIconType: {fileID: 2800000, guid: 5476d6e1435981e4cbc915a080f93ee6, type: 3}
|
||||||
|
_labelIconMeta: {fileID: 2800000, guid: ebb82b09315bde749a10dfa45e64067c, type: 3}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user