From be60964ac866262efa1f14ab38510478b34855ae Mon Sep 17 00:00:00 2001 From: Alex Liu <63307936+Skyrim07@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:35:59 -0400 Subject: [PATCH] SKCell v0.14.1 Update --- Assets/SKCell/Attributes/SKMonoAttribute.cs | 11 +++++ Assets/SKCell/Core/SKCore.cs | 2 +- Assets/SKCell/Dialogue/Dialogue 101.asset | 4 +- .../SKCell/Dialogue/Dialogue 101.asset.meta | 2 +- .../Editor/Dialogue/SKDialogueEditor.cs | 12 ++++-- Assets/SKCell/Editor/SKAttributeDrawer.cs | 15 ++++++- Assets/SKCell/Editor/SKFolderIconSetter.cs | 4 ++ Assets/SKCell/Graphics/Dissolve_0.shader | 2 +- .../SKCell/Graphics/SKDissolveEffect.cs.meta | 2 +- .../SKCell/Graphics/SKOuterGlowEffect.cs.meta | 2 +- .../SKCell/Graphics/SKWireframeEffect.cs.meta | 2 +- .../SKCell/Textures/Noise_Random.png.meta | 42 +++++++++++++++++-- .../Scenes/DemoAssets/AttributesDemo.cs | 4 ++ Assets/SKCell/Scenes/SKShaderScene.unity | 2 +- docs/README.md | 6 ++- 15 files changed, 95 insertions(+), 17 deletions(-) diff --git a/Assets/SKCell/Attributes/SKMonoAttribute.cs b/Assets/SKCell/Attributes/SKMonoAttribute.cs index c550824..8c2e781 100644 --- a/Assets/SKCell/Attributes/SKMonoAttribute.cs +++ b/Assets/SKCell/Attributes/SKMonoAttribute.cs @@ -77,4 +77,15 @@ public SKFieldAliasAttribute(string message) Message = message; } } + + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + public class SKInspectorTextAttribute : PropertyAttribute + { + public string Message { get; } + + public SKInspectorTextAttribute(string message) + { + Message = message; + } + } } \ No newline at end of file diff --git a/Assets/SKCell/Core/SKCore.cs b/Assets/SKCell/Core/SKCore.cs index ad9ff14..ec65528 100644 --- a/Assets/SKCell/Core/SKCore.cs +++ b/Assets/SKCell/Core/SKCore.cs @@ -14,7 +14,7 @@ namespace SKCell [AddComponentMenu("SKCell/SKCore")] public sealed class SKCore : MonoSingleton { - public const string SKCELL_VERSION = "v0.14.0"; + public const string SKCELL_VERSION = "v0.14.1"; public static Action Awake000 = new Action(EmptyAction), Awake100 = new Action(EmptyAction), Start000 = new Action(EmptyAction), Start100 = new Action(EmptyAction), Start200 = new Action(EmptyAction), diff --git a/Assets/SKCell/Dialogue/Dialogue 101.asset b/Assets/SKCell/Dialogue/Dialogue 101.asset index c983143..c1f3c58 100644 --- a/Assets/SKCell/Dialogue/Dialogue 101.asset +++ b/Assets/SKCell/Dialogue/Dialogue 101.asset @@ -283,8 +283,8 @@ MonoBehaviour: uid: 366131 rect: serializedVersion: 2 - x: 1223.1111 - y: 979.8889 + x: 1242.1111 + y: 982.8889 width: 100 height: 80 oRect: diff --git a/Assets/SKCell/Dialogue/Dialogue 101.asset.meta b/Assets/SKCell/Dialogue/Dialogue 101.asset.meta index a2bb800..40e96c2 100644 --- a/Assets/SKCell/Dialogue/Dialogue 101.asset.meta +++ b/Assets/SKCell/Dialogue/Dialogue 101.asset.meta @@ -2,7 +2,7 @@ fileFormatVersion: 2 guid: 9add1eee567faba4fb864c2b76cfcbaa NativeFormatImporter: externalObjects: {} - mainObjectFileID: 11400000 + mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/SKCell/Editor/Dialogue/SKDialogueEditor.cs b/Assets/SKCell/Editor/Dialogue/SKDialogueEditor.cs index 9fa6df3..2e4ef53 100644 --- a/Assets/SKCell/Editor/Dialogue/SKDialogueEditor.cs +++ b/Assets/SKCell/Editor/Dialogue/SKDialogueEditor.cs @@ -45,7 +45,11 @@ private void OnEnable() { Init(); } - + + private void OnBecameVisible() + { + InitializeGUIStyles(); + } private void OnLostFocus() { @@ -162,7 +166,7 @@ private void InitializeGUIStyles() inspector_buttonStyle.normal.textColor = COL_TITLE; inspector_buttonStyle.hover.background = MakeTex(2, 2, new Color(.3f, .3f, .3f, 0.9f)); inspector_buttonStyle.hover.textColor = new Color(1f, .95f, .5f, 0.6f); - } + } public void SaveAsset() { @@ -170,7 +174,6 @@ public void SaveAsset() } public void LoadAsset(SKDialogueAsset asset) { - InitializeGUIStyles(); if (asset == null) { this.asset = null; @@ -391,6 +394,9 @@ void DrawInspector() } void DrawNode(SKDialogueEditorNode node, int id) { + if (node == null) + return; + node.rect = GUI.Window(id, node.rect, DrawNodeWindow,node.name); Rect iconRect = new Rect(node.rect.x-20, node.rect.y-20, 25, 25); diff --git a/Assets/SKCell/Editor/SKAttributeDrawer.cs b/Assets/SKCell/Editor/SKAttributeDrawer.cs index 2d400ec..1813611 100644 --- a/Assets/SKCell/Editor/SKAttributeDrawer.cs +++ b/Assets/SKCell/Editor/SKAttributeDrawer.cs @@ -115,7 +115,7 @@ private void SetPropertyValue(SerializedProperty property, object value) [CustomPropertyDrawer(typeof(SKFieldAliasAttribute))] - public class SKInspectorTextDrawer : PropertyDrawer + public class SKFieldAliasDrawer : PropertyDrawer { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { @@ -124,6 +124,19 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten EditorGUI.LabelField(position, textAttribute.Message); EditorGUI.PropertyField(position, property,true); } + } + + [CustomPropertyDrawer(typeof(SKInspectorTextAttribute))] + public class SKInspectorTextDrawer : PropertyDrawer + { + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + SKInspectorTextAttribute textAttribute = (SKInspectorTextAttribute)attribute; + + position.height = GetPropertyHeight(property, label) * 2; + EditorGUI.LabelField(position,textAttribute.Message); + EditorGUILayout.Space(GetPropertyHeight(property, label)); + } public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { diff --git a/Assets/SKCell/Editor/SKFolderIconSetter.cs b/Assets/SKCell/Editor/SKFolderIconSetter.cs index 8d0dacb..e4eb996 100644 --- a/Assets/SKCell/Editor/SKFolderIconSetter.cs +++ b/Assets/SKCell/Editor/SKFolderIconSetter.cs @@ -24,6 +24,10 @@ public class SKFolderIconEditor {"Scenes", new Color(0.83f, 0.72f,0.61f, 1f)}, {"TextMesh Pro", new Color(0.93f, 0.42f,0.41f, 1f)}, {"StreamingAssets", new Color(0.92f, 0.63f,0.96f, 1f)}, + {"Scripts", new Color(0.75f, 0.5f, 1.0f, 1f)}, + {"GameLogic", new Color(0.75f, 0.5f, 1.0f, 1f)}, + {"Anim", new Color(0.74f, 1.0f, 0.9f, 1f)}, + {"Animation", new Color(0.74f, 1.0f, 0.9f, 1f)}, }; static SKFolderIconEditor() { diff --git a/Assets/SKCell/Graphics/Dissolve_0.shader b/Assets/SKCell/Graphics/Dissolve_0.shader index 6fffc52..e60c4df 100644 --- a/Assets/SKCell/Graphics/Dissolve_0.shader +++ b/Assets/SKCell/Graphics/Dissolve_0.shader @@ -7,7 +7,7 @@ _MainTex ("Texture", 2D) = "white" {} _Noise ("Noise", 2D) = "white" {} _Threshold ("Threshold", range(0,1)) = 0.5 - _HighlightThreshold ("Highlight Threshold", float) =1 + _HighlightThreshold ("Highlight Threshold", float) = 0.1 } SubShader { diff --git a/Assets/SKCell/Graphics/SKDissolveEffect.cs.meta b/Assets/SKCell/Graphics/SKDissolveEffect.cs.meta index ff01387..3450bca 100644 --- a/Assets/SKCell/Graphics/SKDissolveEffect.cs.meta +++ b/Assets/SKCell/Graphics/SKDissolveEffect.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e65388e78d286d943a09feb3af41c96a +guid: 0c67edbc01850cd43aa662e04cb9926c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/SKCell/Graphics/SKOuterGlowEffect.cs.meta b/Assets/SKCell/Graphics/SKOuterGlowEffect.cs.meta index 932d34d..3ff8857 100644 --- a/Assets/SKCell/Graphics/SKOuterGlowEffect.cs.meta +++ b/Assets/SKCell/Graphics/SKOuterGlowEffect.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fb4b4be1f09990d4eba8ce263cef761a +guid: 550cdc5240398c84b91d9a426a1bf550 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/SKCell/Graphics/SKWireframeEffect.cs.meta b/Assets/SKCell/Graphics/SKWireframeEffect.cs.meta index 2e1b11a..780e4fc 100644 --- a/Assets/SKCell/Graphics/SKWireframeEffect.cs.meta +++ b/Assets/SKCell/Graphics/SKWireframeEffect.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8e200b1d0cb7ccb4ba4cfe1073c8c613 +guid: a31ef37cb9e2ebf4c8abbda403aca9cc MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/SKCell/Resources/SKCell/Textures/Noise_Random.png.meta b/Assets/SKCell/Resources/SKCell/Textures/Noise_Random.png.meta index 063a442..09464b1 100644 --- a/Assets/SKCell/Resources/SKCell/Textures/Noise_Random.png.meta +++ b/Assets/SKCell/Resources/SKCell/Textures/Noise_Random.png.meta @@ -36,9 +36,9 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 1 + wrapU: 0 + wrapV: 0 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -76,6 +76,42 @@ TextureImporter: 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 + - serializedVersion: 3 + buildTarget: WebGL + 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: [] diff --git a/Assets/SKCell/Scenes/DemoAssets/AttributesDemo.cs b/Assets/SKCell/Scenes/DemoAssets/AttributesDemo.cs index 4b31c6c..4fc8bd5 100644 --- a/Assets/SKCell/Scenes/DemoAssets/AttributesDemo.cs +++ b/Assets/SKCell/Scenes/DemoAssets/AttributesDemo.cs @@ -6,6 +6,10 @@ namespace SKCell.Test { public class AttributesDemo : MonoBehaviour { + [SKInspectorText("Set the value of the magic number below,\nand use the button above to print it out!")] + [SerializeField] + private byte a; + public int magicNumber = 42; [SKFolder("Integer Fields")] public int number1; diff --git a/Assets/SKCell/Scenes/SKShaderScene.unity b/Assets/SKCell/Scenes/SKShaderScene.unity index 0cbe01d..9dd0237 100644 --- a/Assets/SKCell/Scenes/SKShaderScene.unity +++ b/Assets/SKCell/Scenes/SKShaderScene.unity @@ -959,7 +959,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 647554853} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} + m_Mesh: {fileID: 4300000, guid: 3dc73593dfbf37b4ba183c7b17d0b18d, type: 3} --- !u!4 &647554858 Transform: m_ObjectHideFlags: 0 diff --git a/docs/README.md b/docs/README.md index 2f51ec8..3b430c0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # SKCell -v0.14.0 by Alex Liu +v0.14.1 by Alex Liu SKCell is a powerful, comprehensive utility package for Unity that can greatly enhance your development experience. Webpage: here @@ -3399,6 +3399,10 @@ Select SKCell/Tools/Texture Utils to open the window. - Added SKVariableMonitor - Fixed issues with SKTextAnimator - Fixed issues with SKQuitControl +
0.14.1 + - Fixed display issues with SKDialogueEditor + - Added new attribute: SKInspectorText + - Added new project folder colors v0.13.x 2023.10