mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2026-04-21 20:15:56 +08:00
update meta
This commit is contained in:
parent
5549e71ac4
commit
535e88f041
@ -78,7 +78,7 @@ namespace DCFApixels.DragonECS
|
||||
public override string Name { get { return typeof(T).GetMeta().Name; } }
|
||||
public override MetaGroup Group { get { return UnityComponentConsts.BaseGroup; } }
|
||||
public override MetaColor? Color { get { return MetaColor.DragonCyan; } }
|
||||
public override MetaDescription Description { get { return new MetaDescription(AUTHOR, $"IEcsComponent component. Holds a reference to a Unity {Name} component."); } }
|
||||
public override MetaDescription Description { get { return new MetaDescription(AUTHOR, $"Template for IEcsComponent component. Holds a reference to a Unity {Name} component."); } }
|
||||
public UnityComponentMetaProxy(Type type) : base(type) { }
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,6 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
||||
{
|
||||
[MetaColor(MetaColor.DragonRose)]
|
||||
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||
[MetaTags(MetaTags.HIDDEN)]
|
||||
[MetaID("DragonECS_2DD8BC809201633E2761D5AEF65B7090")]
|
||||
public class EcsLateGizmosRunner : EcsRunner<IEcsGizmos>, IEcsGizmos
|
||||
@ -70,7 +69,6 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
||||
|
||||
[MetaColor(MetaColor.DragonRose)]
|
||||
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||
[MetaTags(MetaTags.HIDDEN)]
|
||||
[MetaID("DragonECS_EDE8BC809201603B47C3A9D1EFD4EE95")]
|
||||
public class EcsLateRunRunner : EcsRunner<IEcsLateRun>, IEcsLateRun
|
||||
@ -88,7 +86,6 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
||||
|
||||
[MetaColor(MetaColor.DragonRose)]
|
||||
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.PROCESSES_GROUP)]
|
||||
[MetaDescription(EcsConsts.AUTHOR, "...")]
|
||||
[MetaTags(MetaTags.HIDDEN)]
|
||||
[MetaID("DragonECS_45F7BC809201866AA05F6DC096A47F01")]
|
||||
public class EcsFixedRunRunner : EcsRunner<IEcsFixedRun>, IEcsFixedRun
|
||||
|
||||
@ -41,8 +41,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
rect.xMin += 9f;
|
||||
GUI.Label(rect, "User Settings", EditorStyles.whiteLargeLabel);
|
||||
|
||||
//using (prefs.DisableAutoSave())
|
||||
{
|
||||
prefs.IsShowHidden = EditorGUILayout.ToggleLeft(
|
||||
UnityEditorUtility.TransformFieldName(nameof(UserSettingsPrefs.IsShowHidden)),
|
||||
prefs.IsShowHidden);
|
||||
@ -59,12 +57,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
UnityEditorUtility.TransformFieldName(nameof(UserSettingsPrefs.IsUseCustomNames)),
|
||||
prefs.IsUseCustomNames);
|
||||
|
||||
//prefs.IsFastModeRuntimeComponents = EditorGUILayout.ToggleLeft(
|
||||
// UnityEditorUtility.TransformFieldName(nameof(UserSettingsPrefs.IsFastModeRuntimeComponents)),
|
||||
// prefs.IsFastModeRuntimeComponents);
|
||||
|
||||
prefs.ComponentColorMode = (ComponentColorMode)EditorGUILayout.EnumPopup(UnityEditorUtility.TransformFieldName(nameof(UserSettingsPrefs.ComponentColorMode)), prefs.ComponentColorMode);
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
|
||||
@ -83,20 +83,20 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
}
|
||||
}
|
||||
}
|
||||
//[SerializeField]
|
||||
//private bool _isFastModeRuntimeComponents = false;
|
||||
//public bool IsFastModeRuntimeComponents
|
||||
//{
|
||||
// get => _isFastModeRuntimeComponents;
|
||||
// set
|
||||
// {
|
||||
// if (_isFastModeRuntimeComponents != value)
|
||||
// {
|
||||
// _isFastModeRuntimeComponents = value;
|
||||
// AutoSave();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
[SerializeField]
|
||||
private bool _isShowWrappedMemberMeta = true;
|
||||
public bool IsShowWrappedMemberMeta
|
||||
{
|
||||
get => _isShowWrappedMemberMeta;
|
||||
set
|
||||
{
|
||||
if (_isShowWrappedMemberMeta != value)
|
||||
{
|
||||
_isShowWrappedMemberMeta = value;
|
||||
AutoSave();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private ComponentColorMode _componentColorMode = ComponentColorMode.Auto;
|
||||
|
||||
@ -101,8 +101,16 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
}
|
||||
}
|
||||
|
||||
internal class DragonFieldCahce
|
||||
internal class DragonFieldCahce : ITypeMeta
|
||||
{
|
||||
Type ITypeMeta.Type => Meta.Type;
|
||||
string ITypeMeta.Name => Meta.Name;
|
||||
MetaColor ITypeMeta.Color => Meta.Color;
|
||||
MetaDescription ITypeMeta.Description => Meta.Description;
|
||||
MetaGroup ITypeMeta.Group => Meta.Group;
|
||||
IReadOnlyList<string> ITypeMeta.Tags => Meta.Tags;
|
||||
ITypeMeta ITypeMeta.BaseMeta => Meta;
|
||||
|
||||
internal static Type[] All => UnityEditorUtility._serializableTypes;
|
||||
internal static HashSet<Type> AllDict;
|
||||
internal static Dictionary<Type, DragonFieldCahce> RuntimeDict;
|
||||
@ -160,11 +168,9 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
get
|
||||
{
|
||||
if (_meta == null)
|
||||
{
|
||||
{
|
||||
_meta = Type.GetMeta();
|
||||
}
|
||||
}
|
||||
return _meta;
|
||||
}
|
||||
}
|
||||
@ -199,6 +205,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
return _defaultValueDummy;
|
||||
}
|
||||
}
|
||||
|
||||
public DragonFieldCahce(Type type)
|
||||
{
|
||||
Type = type;
|
||||
|
||||
@ -48,8 +48,10 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[MetaProxy(typeof(ComponentTemplateMetaProxy))]
|
||||
[DragonMemberWrapper("component")]
|
||||
[MetaColor(MetaColor.DragonCyan)]
|
||||
[MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.OTHER_GROUP)]
|
||||
[MetaProxy(typeof(ComponentTemplateMetaProxy))]
|
||||
public abstract class ComponentTemplateBase : IComponentTemplate
|
||||
{
|
||||
#region Properties
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#if UNITY_EDITOR
|
||||
using DCFApixels.DragonECS.Unity.Editors;
|
||||
using DCFApixels.DragonECS.Unity.Internal;
|
||||
using DCFApixels.DragonECS.Unity.RefRepairer.Editors;
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@ -57,6 +58,25 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
||||
private void OnGUI()
|
||||
{
|
||||
Event current = Event.current;
|
||||
int moveSign = 0;
|
||||
if (hasFocus && current.type == EventType.KeyUp && current.isKey)
|
||||
{
|
||||
if(current.keyCode == KeyCode.DownArrow)
|
||||
{
|
||||
moveSign = 1;
|
||||
}
|
||||
if (current.keyCode == KeyCode.UpArrow)
|
||||
{
|
||||
moveSign = -1;
|
||||
}
|
||||
}
|
||||
_selectedIndex += moveSign;
|
||||
if(moveSign != 0)
|
||||
{
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
|
||||
DragonDocs docs = DragonDocsPrefs.instance.Docs;
|
||||
if (docs == null || docs.Metas.IsEmpty)
|
||||
{
|
||||
@ -79,7 +99,6 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
|
||||
_selectedIndex = 0;
|
||||
}
|
||||
|
||||
|
||||
DrawToolbar();
|
||||
|
||||
GUILayout.BeginHorizontal(GUILayout.ExpandHeight(true));
|
||||
|
||||
@ -39,7 +39,6 @@ namespace DCFApixels.DragonECS.Unity
|
||||
namespace DCFApixels.DragonECS.Unity.Editors
|
||||
{
|
||||
using UnityEditor;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
[CustomPropertyDrawer(typeof(ReferenceDropDownAttribute), true)]
|
||||
[CustomPropertyDrawer(typeof(DragonMetaBlockAttribute), true)]
|
||||
@ -294,17 +293,14 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
{
|
||||
if (info != null)
|
||||
{
|
||||
meta = info.ComponentType.GetMeta();
|
||||
meta = info.Type.GetMeta();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mrNull == false)
|
||||
else if (mrNull == false)
|
||||
{
|
||||
var type = GetCachedManagedType(property);
|
||||
meta = type.GetMeta();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isDrawDropDown && mrNull == false && ReferenceDropDownAttribute.IsHideButtonIfNotNull)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user