update template inspector

This commit is contained in:
Mikhail 2024-05-15 00:36:56 +08:00
parent 5b11b42f71
commit ce8052f8ce
21 changed files with 255 additions and 107 deletions

View File

@ -1,4 +1,5 @@
#if UNITY_EDITOR #if UNITY_EDITOR
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEditor; using UnityEditor;
@ -29,7 +30,6 @@ namespace DCFApixels.DragonECS.Unity.Editors
nameof(EcsConsts.DISABLE_DEBUG), nameof(EcsConsts.DISABLE_DEBUG),
nameof(EcsConsts.ENABLE_DUMMY_SPAN), nameof(EcsConsts.ENABLE_DUMMY_SPAN),
nameof(EcsConsts.DISABLE_CATH_EXCEPTIONS), nameof(EcsConsts.DISABLE_CATH_EXCEPTIONS),
"DEBUG",
}; };
for (int i = 0; i < _defineSymbols.Count; i++) for (int i = 0; i < _defineSymbols.Count; i++)
{ {
@ -74,11 +74,14 @@ namespace DCFApixels.DragonECS.Unity.Editors
GUILayout.Label(nameof(SettingsPrefs.IsShowRuntimeComponents), GUILayout.ExpandWidth(false)); GUILayout.Label(nameof(SettingsPrefs.IsShowRuntimeComponents), GUILayout.ExpandWidth(false));
GUILayout.EndHorizontal(); GUILayout.EndHorizontal();
settings.AutoColorMode = (AutoColorMode)EditorGUILayout.EnumPopup(nameof(SettingsPrefs.AutoColorMode), SettingsPrefs.instance.AutoColorMode);
if (EditorGUI.EndChangeCheck()) if (EditorGUI.EndChangeCheck())
{ {
SettingsPrefs.instance.IsShowHidden = settings.IsShowHidden; SettingsPrefs.instance.IsShowHidden = settings.IsShowHidden;
SettingsPrefs.instance.IsShowInterfaces = settings.IsShowInterfaces; SettingsPrefs.instance.IsShowInterfaces = settings.IsShowInterfaces;
SettingsPrefs.instance.IsShowRuntimeComponents = settings.IsShowRuntimeComponents; SettingsPrefs.instance.IsShowRuntimeComponents = settings.IsShowRuntimeComponents;
SettingsPrefs.instance.AutoColorMode = settings.AutoColorMode;
} }
GUILayout.EndVertical(); GUILayout.EndVertical();
@ -144,6 +147,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
public bool IsShowHidden; public bool IsShowHidden;
public bool IsShowInterfaces; public bool IsShowInterfaces;
public bool IsShowRuntimeComponents; public bool IsShowRuntimeComponents;
public AutoColorMode AutoColorMode;
} }
} }
} }

View File

@ -4,8 +4,14 @@ using UnityEngine;
namespace DCFApixels.DragonECS.Unity.Editors namespace DCFApixels.DragonECS.Unity.Editors
{ {
[FilePath(EcsConsts.FRAMEWORK_NAME + "/" + nameof(SettingsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)] internal enum AutoColorMode
public class SettingsPrefs : ScriptableSingleton<SettingsPrefs> {
Generic = 0,
Name = 1,
Rainbow = 2,
}
[FilePath(EcsConsts.AUTHOR + "/" + EcsConsts.FRAMEWORK_NAME + "/" + nameof(SettingsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)]
internal class SettingsPrefs : ScriptableSingleton<SettingsPrefs>
{ {
[SerializeField] [SerializeField]
private bool _isShowInterfaces = false; private bool _isShowInterfaces = false;
@ -52,6 +58,19 @@ namespace DCFApixels.DragonECS.Unity.Editors
Save(false); Save(false);
} }
} }
[SerializeField]
private AutoColorMode _autoColorMode = AutoColorMode.Name;
public AutoColorMode AutoColorMode
{
get => _autoColorMode;
set
{
_autoColorMode = value;
Save(false);
}
}
} }
} }
#endif #endif

View File

@ -16,6 +16,12 @@ namespace DCFApixels.DragonECS.Unity.Editors
private GenericMenu _genericMenu; private GenericMenu _genericMenu;
private bool _isInit = false; private bool _isInit = false;
private static AutoColorMode AutoColorMode
{
get { return SettingsPrefs.instance.AutoColorMode; }
set { SettingsPrefs.instance.AutoColorMode = value; }
}
#region Init #region Init
private void Init() private void Init()
{ {
@ -42,6 +48,11 @@ namespace DCFApixels.DragonECS.Unity.Editors
var componentTemplateDummies = ComponentTemplateTypeCache.Dummies; var componentTemplateDummies = ComponentTemplateTypeCache.Dummies;
foreach (var dummy in componentTemplateDummies) foreach (var dummy in componentTemplateDummies)
{ {
if (dummy.Type.GetCustomAttribute<SerializableAttribute>() == null)
{
Debug.LogWarning($"Type {dummy.Type.Name} does not have the [Serializable] attribute");
continue;
}
ITypeMeta meta = dummy is ITypeMeta metaOverride ? metaOverride : dummy.Type.ToMeta(); ITypeMeta meta = dummy is ITypeMeta metaOverride ? metaOverride : dummy.Type.ToMeta();
string name = meta.Name; string name = meta.Name;
string description = meta.Description.Text; string description = meta.Description.Text;
@ -112,7 +123,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
GUILayout.Label("", GUILayout.Height(0), GUILayout.ExpandWidth(true)); GUILayout.Label("", GUILayout.Height(0), GUILayout.ExpandWidth(true));
for (int i = 0; i < componentsProp.arraySize; i++) for (int i = 0; i < componentsProp.arraySize; i++)
{ {
DrawComponentData(componentsProp.GetArrayElementAtIndex(i), i); DrawComponentData(componentsProp.GetArrayElementAtIndex(i), componentsProp.arraySize, i);
} }
GUILayout.EndVertical(); GUILayout.EndVertical();
} }
@ -132,37 +143,85 @@ namespace DCFApixels.DragonECS.Unity.Editors
} }
} }
private void DrawComponentData(SerializedProperty componentRefProp, int index) private void DrawComponentData(SerializedProperty componentRefProp, int total, int index)
{ {
IComponentTemplate template = componentRefProp.managedReferenceValue as IComponentTemplate; IComponentTemplate template = componentRefProp.managedReferenceValue as IComponentTemplate;
if (template == null || componentRefProp.managedReferenceValue == null) if (template == null || componentRefProp.managedReferenceValue == null)
{ {
DrawDamagedComponent(componentRefProp, index); DrawDamagedComponent_Replaced(componentRefProp, index);
return;
}
Type componentType;
SerializedProperty componentProperty = componentRefProp;
try
{
ComponentTemplateBase customTemplate = componentProperty.managedReferenceValue as ComponentTemplateBase;
if (customTemplate != null)
{
componentProperty = componentRefProp.FindPropertyRelative("component");
componentType = customTemplate.GetType().GetField("component", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FieldType;
}
else
{
componentType = componentProperty.managedReferenceValue.GetType();
}
if (componentType == null || componentProperty == null)
{
throw new NullReferenceException();
}
}
catch (Exception e)
{
Debug.LogException(e, serializedObject.targetObject);
DrawDamagedComponent(index, "Damaged component template.");
return; return;
} }
Type componentType; //сюда попадают уже валидные компоненты
SerializedProperty componentProperty = componentRefProp;
ComponentTemplateBase customInitializer = componentProperty.managedReferenceValue as ComponentTemplateBase;
if (customInitializer != null)
{
componentProperty = componentRefProp.FindPropertyRelative("component");
componentType = customInitializer.GetType().GetField("component", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FieldType;
}
else
{
componentType = componentProperty.managedReferenceValue.GetType(); ;
}
ITypeMeta meta = template is ITypeMeta metaOverride ? metaOverride : template.Type.ToMeta(); ITypeMeta meta = template is ITypeMeta metaOverride ? metaOverride : template.Type.ToMeta();
string name = meta.Name; string name = meta.Name;
string description = meta.Description.Text; string description = meta.Description.Text;
Color panelColor = meta.Color.ToUnityColor().Desaturate(EscEditorConsts.COMPONENT_DRAWER_DESATURATE);
//GUIContent label = new GUIContent(name);
bool isEmpty = componentType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Length <= 0; bool isEmpty = componentType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Length <= 0;
var propsCounter = componentProperty.Copy();
int lastDepth = propsCounter.depth;
bool next = propsCounter.Next(true) && lastDepth < propsCounter.depth;
int propCount = next ? -1 : 0;
while (next)
{
propCount++;
next = propsCounter.Next(false);
}
float padding = EditorGUIUtility.standardVerticalSpacing; float padding = EditorGUIUtility.standardVerticalSpacing;
Color panelColor;
if (meta.IsCustomColor)
{
panelColor = meta.Color.ToUnityColor();
}
else
{
switch (AutoColorMode)
{
case AutoColorMode.Name:
panelColor = meta.Color.ToUnityColor().Desaturate(0.48f) / 1.18f; //.Desaturate(0.48f) / 1.18f;
break;
case AutoColorMode.Rainbow:
Color hsv = Color.HSVToRGB(1f / (Mathf.Max(total, EscEditorConsts.AUTO_COLOR_RAINBOW_MIN_RANGE)) * index, 1, 1);
panelColor = hsv.Desaturate(0.48f) / 1.18f;
break;
default:
panelColor = index % 2 == 0 ? new Color(0.40f, 0.40f, 0.40f) : new Color(0.54f, 0.54f, 0.54f);
break;
}
}
panelColor = panelColor.Desaturate(EscEditorConsts.COMPONENT_DRAWER_DESATURATE);
Color alphaPanelColor = panelColor; Color alphaPanelColor = panelColor;
alphaPanelColor.a = EscEditorConsts.COMPONENT_DRAWER_ALPHA; alphaPanelColor.a = EscEditorConsts.COMPONENT_DRAWER_ALPHA;
@ -171,24 +230,27 @@ namespace DCFApixels.DragonECS.Unity.Editors
EditorGUI.BeginChangeCheck(); EditorGUI.BeginChangeCheck();
GUILayout.BeginVertical(UnityEditorUtility.GetStyle(alphaPanelColor)); GUILayout.BeginVertical(UnityEditorUtility.GetStyle(alphaPanelColor));
#region Draw Component Block #region Draw Component Block
bool isRemoveComponent = false;
removeButtonRect.yMin = removeButtonRect.yMax; removeButtonRect.yMin = removeButtonRect.yMax;
removeButtonRect.yMax += RemoveButtonRect.height; removeButtonRect.yMax += RemoveButtonRect.height;
removeButtonRect.xMin = removeButtonRect.xMax - RemoveButtonRect.width; removeButtonRect.xMin = removeButtonRect.xMax - RemoveButtonRect.width;
removeButtonRect.center += Vector2.up * padding * 2f; removeButtonRect.center += Vector2.up * padding * 2f;
if (EcsGUI.CloseButton(removeButtonRect)) bool isRemoveComponent = EcsGUI.CloseButton(removeButtonRect);
{
isRemoveComponent = true;
}
if (isEmpty) if (propCount <= 0)
{ {
GUIContent label = UnityEditorUtility.GetLabel(name); GUIContent label = UnityEditorUtility.GetLabel(name);
GUILayout.Label(label); EditorGUILayout.LabelField(name);
Rect emptyPos = GUILayoutUtility.GetLastRect();
emptyPos.xMin += EditorGUIUtility.labelWidth;
if (isEmpty)
{
using (new EcsGUI.ContentColorScope(1f, 1f, 1f, 0.4f))
{
GUI.Label(emptyPos, "empty");
}
}
EditorGUI.BeginProperty(GUILayoutUtility.GetLastRect(), label, componentRefProp); EditorGUI.BeginProperty(GUILayoutUtility.GetLastRect(), label, componentRefProp);
EditorGUI.EndProperty(); EditorGUI.EndProperty();
} }
@ -226,19 +288,28 @@ namespace DCFApixels.DragonECS.Unity.Editors
EditorUtility.SetDirty(componentProperty.serializedObject.targetObject); EditorUtility.SetDirty(componentProperty.serializedObject.targetObject);
} }
} }
private void DrawDamagedComponent_Replaced(SerializedProperty componentRefProp, int index)
private void DrawDamagedComponent(SerializedProperty componentRefProp, int index)
{ {
DrawDamagedComponent(index, $"Damaged component template. If the problem occurred after renaming a component or initializer. use MovedFromAttrubute");
}
private void DrawDamagedComponent(int index, string message)
{
Rect removeButtonRect = GUILayoutUtility.GetLastRect();
GUILayout.BeginHorizontal(); GUILayout.BeginHorizontal();
EditorGUILayout.HelpBox($"Damaged component. If the problem occurred after renaming a component or initializer. use MovedFromAttrubute", MessageType.Warning); float padding = EditorGUIUtility.standardVerticalSpacing;
Rect lastrect = GUILayoutUtility.GetLastRect(); removeButtonRect.yMin = removeButtonRect.yMax;
Rect removeButtonRect = RemoveButtonRect; removeButtonRect.yMax += RemoveButtonRect.height;
removeButtonRect.center = new Vector2(lastrect.xMax + removeButtonRect.width, lastrect.yMin + removeButtonRect.height / 2f); removeButtonRect.xMin = removeButtonRect.xMax - RemoveButtonRect.width;
removeButtonRect.center += Vector2.up * padding * 2f;
GUILayout.Label("", GUILayout.Width(removeButtonRect.width)); bool isRemoveComponent = EcsGUI.CloseButton(removeButtonRect);
if (GUI.Button(removeButtonRect, "x", _removeButtonStyle))
EditorGUILayout.HelpBox(message, MessageType.Warning);
if (isRemoveComponent)
{ {
OnRemoveComponentAt(index); OnRemoveComponentAt(index);
} }

View File

@ -33,7 +33,9 @@ namespace DCFApixels.DragonECS
{ {
#region Properties #region Properties
public abstract Type Type { get; } public abstract Type Type { get; }
public virtual bool IsCustomName { get { return false; } }
public virtual string Name { get { return string.Empty; } } public virtual string Name { get { return string.Empty; } }
public virtual bool IsCustomColor { get { return false; } }
public virtual MetaColor Color { get { return new MetaColor(MetaColor.Black); } } public virtual MetaColor Color { get { return new MetaColor(MetaColor.Black); } }
public virtual MetaGroup Group { get { return MetaGroup.Empty; } } public virtual MetaGroup Group { get { return MetaGroup.Empty; } }
public virtual MetaDescription Description { get { return MetaDescription.Empty; } } public virtual MetaDescription Description { get { return MetaDescription.Empty; } }
@ -58,11 +60,13 @@ namespace DCFApixels.DragonECS
#region Properties #region Properties
public override Type Type { get { return typeof(T); } } public override Type Type { get { return typeof(T); } }
public override bool IsCustomName { get { return Meta.IsCustomName; } }
public override string Name { get { return Meta.Name; } } public override string Name { get { return Meta.Name; } }
public override bool IsCustomColor { get { return Meta.IsCustomColor; } }
public override MetaColor Color { get { return Meta.Color; } }
public override MetaGroup Group { get { return Meta.Group; } } public override MetaGroup Group { get { return Meta.Group; } }
public override MetaDescription Description { get { return Meta.Description; } } public override MetaDescription Description { get { return Meta.Description; } }
public override IReadOnlyCollection<string> Tags { get { return Meta.Tags; } } public override IReadOnlyCollection<string> Tags { get { return Meta.Tags; } }
public override MetaColor Color { get { return Meta.Color; } }
#endregion #endregion
#region Methods #region Methods
@ -129,7 +133,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
Type interfaceType = typeof(IComponentTemplate); Type interfaceType = typeof(IComponentTemplate);
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{ {
var targetTypes = assembly.GetTypes().Where(type => !type.IsGenericType && !(type.IsAbstract || type.IsInterface) && type.GetCustomAttribute<SerializableAttribute>() != null); var targetTypes = assembly.GetTypes().Where(type => !type.IsGenericType && !(type.IsAbstract || type.IsInterface) /*&& type.GetCustomAttribute<SerializableAttribute>() != null*/);
types.AddRange(targetTypes.Where(type => interfaceType.IsAssignableFrom(type))); types.AddRange(targetTypes.Where(type => interfaceType.IsAssignableFrom(type)));

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -3,10 +3,10 @@ guid: 8f9fb2a8877577940971d81a98aeaaaa
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

BIN
src/Icons/AutosetIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -3,10 +3,10 @@ guid: d01e651682f48b548b597714f47e14b9
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -43,7 +42,7 @@ TextureImporter:
nPOTScale: 0 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 2 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -99,7 +106,7 @@ TextureImporter:
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 379 B

View File

@ -3,10 +3,10 @@ guid: 8a708e50662813d4a99c107e6431a60b
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -3,10 +3,10 @@ guid: 6a1d402595b00c24db2ba647fed93a5c
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 646 B

View File

@ -3,10 +3,10 @@ guid: e135cf23a5d53ce48a75e163b41e39d5
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

BIN
src/Icons/UnlinkIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

View File

@ -3,10 +3,10 @@ guid: 5baead89a941e034e9f44d63617d3246
TextureImporter: TextureImporter:
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: {} externalObjects: {}
serializedVersion: 13 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -20,12 +20,11 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0 streamingMipmaps: 0
streamingMipmapsPriority: 0 streamingMipmapsPriority: 0
vTOnly: 0 vTOnly: 0
ignoreMipmapLimit: 0 ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 0 cubemapConvolution: 0
@ -52,7 +51,7 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 1 textureShape: 1
@ -64,20 +63,17 @@ TextureImporter:
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0 ignorePngGamma: 0
applyGammaDecoding: 0 applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0 resizeAlgorithm: 1
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 50 compressionQuality: 50
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
@ -90,7 +86,18 @@ TextureImporter:
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 0 overridden: 0
ignorePlatformSupport: 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 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet: spriteSheet:
@ -107,8 +114,9 @@ TextureImporter:
weights: [] weights: []
secondaryTextures: [] secondaryTextures: []
nameFileIdTable: {} nameFileIdTable: {}
mipmapLimitGroupName: spritePackingTag:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

View File

@ -39,6 +39,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
public struct ContentColorScope : IDisposable public struct ContentColorScope : IDisposable
{ {
private readonly Color _value; private readonly Color _value;
public ContentColorScope(float r, float g, float b, float a = 1f) : this(new Color(r, g, b, a)) { }
public ContentColorScope(Color value) public ContentColorScope(Color value)
{ {
_value = GUI.contentColor; _value = GUI.contentColor;

View File

@ -4,5 +4,6 @@
{ {
public const float COMPONENT_DRAWER_ALPHA = 0.26f; public const float COMPONENT_DRAWER_ALPHA = 0.26f;
public const float COMPONENT_DRAWER_DESATURATE = 0.86f; public const float COMPONENT_DRAWER_DESATURATE = 0.86f;
public const int AUTO_COLOR_RAINBOW_MIN_RANGE = 7;
} }
} }