From 30fdf98833675b6ba3d36007a4b24d003c8e6736 Mon Sep 17 00:00:00 2001 From: DucNV Date: Thu, 5 Sep 2024 14:46:36 +0700 Subject: [PATCH 1/2] - add: Header hierarchy --- .../Hierarchy/Editor/HierarchyEditor.asmdef | 3 +- VirtueSky/Hierarchy/FolderHierarchy.meta | 8 + .../FolderHierarchy/HeaderHierarchy.cs | 36 +++ .../FolderHierarchy/HeaderHierarchy.cs.meta | 11 + .../FolderHierarchy/HeaderHierarchyIcon.cs | 142 +++++++++ .../HeaderHierarchyIcon.cs.meta | 11 + .../FolderHierarchy/HierarchyHeader.asmdef | 17 ++ .../HierarchyHeader.asmdef.meta | 7 + .../FolderHierarchy/InspectorUtility.cs | 272 ++++++++++++++++++ .../FolderHierarchy/InspectorUtility.cs.meta | 11 + VirtueSky/Hierarchy/Icons.meta | 8 + .../Hierarchy/Icons/HierarchyHighlight.png | Bin 0 -> 3804 bytes .../Icons/HierarchyHighlight.png.meta | 140 +++++++++ 13 files changed, 665 insertions(+), 1 deletion(-) create mode 100644 VirtueSky/Hierarchy/FolderHierarchy.meta create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs.meta create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs.meta create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef.meta create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs create mode 100644 VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs.meta create mode 100644 VirtueSky/Hierarchy/Icons.meta create mode 100644 VirtueSky/Hierarchy/Icons/HierarchyHighlight.png create mode 100644 VirtueSky/Hierarchy/Icons/HierarchyHighlight.png.meta diff --git a/VirtueSky/Hierarchy/Editor/HierarchyEditor.asmdef b/VirtueSky/Hierarchy/Editor/HierarchyEditor.asmdef index 8ccc3bc2..99da39cf 100644 --- a/VirtueSky/Hierarchy/Editor/HierarchyEditor.asmdef +++ b/VirtueSky/Hierarchy/Editor/HierarchyEditor.asmdef @@ -5,7 +5,8 @@ "Virtuesky.Sunflower.DataStorage.Editor", "VirtueSky.Sunflower.Inspector", "HierarchyNullable", - "HierarchyRuntime" + "HierarchyRuntime", + "Virtuesky.Sunflower.UtilsEdtitor" ], "includePlatforms": [ "Editor" diff --git a/VirtueSky/Hierarchy/FolderHierarchy.meta b/VirtueSky/Hierarchy/FolderHierarchy.meta new file mode 100644 index 00000000..3f72e54d --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 643b5b480bb19af43a78bf179abb87fc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs new file mode 100644 index 00000000..77a5fd06 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using VirtueSky.Inspector; + +namespace VirtueSky.Hierarchy +{ + [ExecuteInEditMode] + [EditorIcon("icon_hierarchy"), HideMonoScript] + public class HeaderHierarchy : MonoBehaviour + { + #region Variables + + public enum TextAlignment + { + Left, + Center + } + + [TitleColor("Text", CustomColor.Gold, CustomColor.Aqua)] [SerializeField] + public bool customText; + + [ShowIf(nameof(customText)), SerializeField] + public Color32 textColor = InspectorUtility.textNormalColor; + + [Space] [SerializeField] public FontStyle textStyle = FontStyle.BoldAndItalic; + + [SerializeField] public TextAlignment textAlignment = TextAlignment.Left; + + [TitleColor("Highlight", CustomColor.Coral, CustomColor.Lime)] [Space, SerializeField] + public bool customHighlight; + + [ShowIf(nameof(customHighlight)), SerializeField] + public Color32 highlightColor = InspectorUtility.cyanColor; + + #endregion + } // class end +} \ No newline at end of file diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs.meta b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs.meta new file mode 100644 index 00000000..acbe3ed2 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3036e8f2fe4f8e4bb99b79fe6ebdf01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 422b56a3ea31444cd82f5ee33cbd31d4, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs new file mode 100644 index 00000000..d4a21f9a --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs @@ -0,0 +1,142 @@ +#if UNITY_EDITOR +using System.Linq; +using UnityEditor; +using UnityEngine; +using VirtueSky.UtilsEditor; + +namespace VirtueSky.Hierarchy +{ + [InitializeOnLoad] + public class HeaderHierarchyIcon + { + #region Static Variables + + // icons + private static string assetPath = "/VirtueSky/Hierarchy/Icons"; + private static Texture2D icon_HierarchyHighlight; + + #endregion + + //---------------------------------------------------------------------------------------------------- + + #region Contructors + + static HeaderHierarchyIcon() + { + // subscribe to inspector updates + EditorApplication.hierarchyWindowItemOnGUI += EditorApplication_hierarchyWindowItemOnGUI; + } + + #endregion + + //---------------------------------------------------------------------------------------------------- + + #region Private Functions + + private static void CreateHierarchyIcon_Highlight() + { + icon_HierarchyHighlight = FileExtension.FindAssetWithPath("HierarchyHighlight.png", assetPath); + } + + private static void EditorApplication_hierarchyWindowItemOnGUI(int instanceID, Rect position) + { + // check for valid draw + if (Event.current.type != EventType.Repaint) + { + return; + } + + GameObject gameObject = EditorUtility.InstanceIDToObject(instanceID) as GameObject; + if (gameObject != null) + { + HeaderHierarchy component = gameObject.GetComponent(); + if (component != null) + { + // cache values + int hierarchyPixelHeight = 16; + bool isSelected = Selection.instanceIDs.Contains(instanceID); + bool isActive = component.isActiveAndEnabled; + Color32 defaultContentColor = GUI.contentColor; + Color32 textColor; + Color32 backgroundColor; + + if (isActive || isSelected) + { + // text + if (component.customText) + { + textColor = component.textColor; + } + else + { + textColor = InspectorUtility.textNormalColor; + } + } + else + { + // text + if (component.customText) + { + textColor = (Color)component.textColor * 0.6f; + } + else + { + textColor = InspectorUtility.textDisabledColor; + } + } + + // draw background + if (isSelected) + { + backgroundColor = InspectorUtility.backgroundActiveColor; + } + else + { + backgroundColor = InspectorUtility.backgroundNormalColorLight; + } + + Rect backgroundPosition = new Rect(position.xMin, position.yMin, position.width + hierarchyPixelHeight, position.height); + EditorGUI.DrawRect(backgroundPosition, backgroundColor); + + // check icon exists + if (!icon_HierarchyHighlight) + { + CreateHierarchyIcon_Highlight(); + } + + // draw highlight + if (component.customHighlight) + { + GUI.contentColor = component.highlightColor; + Rect iconPosition = new Rect(position.xMin, position.yMin, icon_HierarchyHighlight.width, icon_HierarchyHighlight.height); + GUIContent iconGUIContent = new GUIContent(icon_HierarchyHighlight); + EditorGUI.LabelField(iconPosition, iconGUIContent); + GUI.contentColor = defaultContentColor; + } + + // draw text + GUIStyle hierarchyText = new GUIStyle() { }; + hierarchyText.normal = new GUIStyleState() { textColor = textColor }; + hierarchyText.fontStyle = component.textStyle; + int offsetX; + if (component.textAlignment == HeaderHierarchy.TextAlignment.Center) + { + hierarchyText.alignment = TextAnchor.MiddleCenter; + offsetX = 0; + } + else + { + hierarchyText.alignment = TextAnchor.MiddleLeft; + offsetX = hierarchyPixelHeight + 2; + } + + Rect textOffset = new Rect(position.xMin + offsetX, position.yMin, position.width, position.height); + EditorGUI.LabelField(textOffset, component.name, hierarchyText); + } + } + } + + #endregion + } // class end +} +#endif \ No newline at end of file diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs.meta b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs.meta new file mode 100644 index 00000000..df1e5c44 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HeaderHierarchyIcon.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 051786f9cab235441ac9f2abcea3bd94 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef b/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef new file mode 100644 index 00000000..6b2ffc33 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef @@ -0,0 +1,17 @@ +{ + "name": "HierarchyHeader", + "rootNamespace": "", + "references": [ + "GUID:324caed91501a9c47a04ebfd87b68794", + "GUID:c904f6d969e991d459a0843b71c22ec5" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef.meta b/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef.meta new file mode 100644 index 00000000..4dbc7c62 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/HierarchyHeader.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d4acae227198a6b4395e2c4a4b0b6a56 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs b/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs new file mode 100644 index 00000000..599a2182 --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs @@ -0,0 +1,272 @@ +using UnityEngine; +#if UNITY_EDITOR +using UnityEditor; +#endif + + +namespace VirtueSky.Hierarchy +{ + public static class InspectorUtility + { + #region Static Variables + + // blank + public static readonly Color32 blankColor = new Color32(000, 000, 000, 000); + public static readonly Color32 cyanColor = new Color32(000, 179, 223, 255); + public static readonly Color32 yellowColor = new Color32(223, 179, 000, 255); + + // background + public static readonly Color32 backgroundNormalColorLight = new Color32(056, 056, 056, 255); + public static readonly Color32 backgroundNormalColor = new Color32(051, 051, 051, 255); + public static readonly Color32 backgroundNormalColorDark = new Color32(045, 045, 045, 255); + public static readonly Color32 backgroundActiveColor = new Color32(044, 093, 135, 255); + public static readonly Color32 backgroundHoverColor = new Color32(056, 056, 056, 255); + public static readonly Color32 backgroundShadowColor = new Color32(042, 042, 042, 255); + public static readonly Color32 backgroundSeperatorColor = new Color32(035, 035, 035, 255); + + // selected + public static readonly Color32 buttonSelectedColor = new Color32(128, 179, 223, 255); + + // button - normal, hover, active + public static readonly Color32 buttonHoverColor = new Color32(099, 099, 099, 255); + public static readonly Color32 buttonHoverBorderColor = new Color32(028, 028, 028, 255); + public static readonly Color32 buttonActiveColor = new Color32(000, 128, 223, 255); + public static readonly Color32 buttonActiveBorderColor = new Color32(010, 010, 010, 255); + + // text + public static readonly Color32 textNormalColor = new Color32(179, 179, 179, 255); + public static readonly Color32 textDisabledColor = new Color32(113, 113, 113, 255); + + #endregion + + //---------------------------------------------------------------------------------------------------- + + #region Helper Functions + +#if UNITY_EDITOR + public static void DrawInspectorLine(Color32 lineColor) + { + GUIStyle horizontalLine = new GUIStyle + { + normal = { background = EditorGUIUtility.whiteTexture }, + margin = new RectOffset(0, 0, 4, 4), + fixedHeight = 1 + }; + + Color defaultGUIColor = GUI.color; + GUI.color = lineColor; + EditorGUILayout.Space(); + GUILayout.Box(GUIContent.none, horizontalLine); + GUI.color = defaultGUIColor; + } +#endif + + public static Texture2D CreateTexture(int width, int height, int border, bool isRounded, Color32 backgroundColor, Color32 borderColor) + { + Color[] pixels = new Color[width * height]; + int pixelIndex = 0; + + if (isRounded) + { + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + // if at corner add corner color + if ((i < border || i >= width - border) && (j < border || j >= width - border)) + { + pixels[pixelIndex] = blankColor; + } + // otherwise if on border... + else if ((i < border || i >= width - border || j < border || j >= width - border) + || ((i < border * 2 || i >= width - border * 2) && (j < border * 2 || j >= width - border * 2))) + { + // ... add border color + pixels[pixelIndex] = borderColor; + } + else + { + // ... otherwise add background color + pixels[pixelIndex] = backgroundColor; + } + + pixelIndex++; + } + } + } + else + { + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + // if on border... + if (i < border || i >= width - border || j < border || j >= width - border) + { + // ... add border color + pixels[pixelIndex] = borderColor; + } + else + { + // ... otherwise add background color + pixels[pixelIndex] = backgroundColor; + } + + pixelIndex++; + } + } + } + + Texture2D result = new Texture2D(width, height); + result.SetPixels(pixels); + result.Apply(); + return result; + } + + public static Texture2D TintTexture(Texture2D texture2D, Color tint) + { + // null check + if (!texture2D) + { + return null; + } + + int width = texture2D.width; + int height = texture2D.height; + Color[] pixels = new Color[width * height]; + int pixelIndex = 0; + + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + pixels[pixelIndex] = texture2D.GetPixel(j, i) * tint; + pixelIndex++; + } + } + + Texture2D result = new Texture2D(width, height); + result.SetPixels(pixels); + result.Apply(); + return result; + } + + public static Texture2D AddBorderToTexture(Texture2D texture2D, Color borderColor, int borderThickness) + { + // null check + if (!texture2D) + { + return null; + } + + int width = texture2D.width; + int height = texture2D.height; + Color[] pixels = new Color[width * height]; + int pixelIndex = 0; + + for (int i = 0; i < width; i++) + { + for (int j = 0; j < height; j++) + { + // if on border... + if (i < borderThickness || i >= width - borderThickness || j < borderThickness || j >= width - borderThickness) + { + // ... add border color + pixels[pixelIndex] = borderColor; + } + else + { + // ... otherwise get pixel color + pixels[pixelIndex] = pixels[pixelIndex] = texture2D.GetPixel(j, i); + } + + pixelIndex++; + } + } + + Texture2D result = new Texture2D(width, height); + result.SetPixels(pixels); + result.Apply(); + return result; + } + + #endregion + + //---------------------------------------------------------------------------------------------------- + + #region Custom Button Styles + + public static GUIStyle Style_DefaultButton() + { + return new GUIStyle(GUI.skin.button); + } + + public static GUIStyle Style_Button() + { + GUIStyle buttonStyle = new GUIStyle(); + + buttonStyle.fontSize = 9; + buttonStyle.alignment = TextAnchor.MiddleCenter; + buttonStyle.normal.textColor = textNormalColor; + buttonStyle.hover.textColor = textNormalColor; + buttonStyle.active.textColor = textNormalColor; + buttonStyle.normal.background = CreateTexture(20, 20, 1, true, blankColor, blankColor); + buttonStyle.hover.background = CreateTexture(20, 20, 1, true, buttonHoverColor, buttonHoverBorderColor); + buttonStyle.active.background = CreateTexture(20, 20, 1, true, buttonActiveColor, buttonActiveBorderColor); + + return buttonStyle; + } + + public static GUIStyle Style_ImageButton(Texture2D normalTexture, int outline = 0) + { + Color32 hover = new Color32(223, 223, 223, 255); + Color32 active = new Color32(079, 128, 179, 255); + + if (0 < outline) + { + return Style_ImageButton(normalTexture, active, outline); + } + else + { + return Style_ImageButton(normalTexture, hover, active); + } + } + + public static GUIStyle Style_ImageButton(Texture2D normalTexture, Color activeTint, int thickness) + { + GUIStyle buttonStyle = new GUIStyle(); + Texture2D hoverTexture = AddBorderToTexture(normalTexture, activeTint, thickness); + Texture2D activeTexture = TintTexture(normalTexture, activeTint); + + buttonStyle.normal.background = normalTexture; + buttonStyle.hover.background = hoverTexture; + buttonStyle.active.background = activeTexture; + + return buttonStyle; + } + + public static GUIStyle Style_ImageButton(Texture2D normalTexture, Color hoverTint, Color activeTint) + { + GUIStyle buttonStyle = new GUIStyle(); + Texture2D hoverTexture = TintTexture(normalTexture, hoverTint); + Texture2D activeTexture = TintTexture(normalTexture, activeTint); + + buttonStyle.normal.background = normalTexture; + buttonStyle.hover.background = hoverTexture; + buttonStyle.active.background = activeTexture; + + return buttonStyle; + } + + public static GUIStyle Style_StealthButton() + { + GUIStyle buttonStyle = new GUIStyle(); + buttonStyle.fontSize = 10; + buttonStyle.normal.textColor = Color.grey; + + return buttonStyle; + } + + #endregion + } // class end +} \ No newline at end of file diff --git a/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs.meta b/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs.meta new file mode 100644 index 00000000..07de65fd --- /dev/null +++ b/VirtueSky/Hierarchy/FolderHierarchy/InspectorUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1abe08dca56cc5a42920f170820c5760 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/Icons.meta b/VirtueSky/Hierarchy/Icons.meta new file mode 100644 index 00000000..3f2ff816 --- /dev/null +++ b/VirtueSky/Hierarchy/Icons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b64e9c6185a69634386d98c3cf6888cf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VirtueSky/Hierarchy/Icons/HierarchyHighlight.png b/VirtueSky/Hierarchy/Icons/HierarchyHighlight.png new file mode 100644 index 0000000000000000000000000000000000000000..c063e33b05d9215bb5ca45ce74fcd91130ef1f15 GIT binary patch literal 3804 zcmai13pmsL9v{-h;R#*56}-k7 z(B}u}C@x zRB&)GGS~pg=J=uXu~;lh4~;^jbs>f>H-rU}`MNBwhQ!3Y4I;p$aOi;`oy~$vY?6K1 zJdl7uKsfw+WX!+?<1FsC?4f%=@yUTGeWV`hM{=M)8)S3+*?*(50RN&$r7SoJXX24`TTqX)ef$PR2Oofh&d*$9V5L*#vnM5vRfWRU!Ss0(GmNr>~IKn?sq<5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4gmhQ0kjHsB7c<)* z)kYa99<+W^6zFvIwvk`>?%UjwhE{>Mzk!S8_vuW3R^U*h!rsDFJ zUZ|~OE^S0x_cbI<SW<*EV z++a}SOU9NMGjnl#UM6t$*fra;eJLr0Gg%^~#5yx68^z@IjWaxFdTe~3T~4*_G3`P5 ze#}jQwoU%S+(s2y<{CU{(%3Rp$y-}Lv7*?xuD`pnCsvFpXtymLbANQH_lU2>gI15a zzQoCMJ_^dS;=0)L@?lxO%h3iWA5?QH>S$e~%LB4GaZ-uJW7|xpzZ%$VNR~EBtPWcz zmN9>e=TyAT!=9U1CEB**OJ!-^N4s{`+3_&n0_lO=aIJ~)shP>;;>M+KgrPiN(VHp@ z<<0rAVUKzvf-`5xX~`i9UODRBJhiZ_eTi@|I`3($ba`C+ZITg($|OA0nIddEe?r+F!FZTJMCOdTnr5f8Yewg)D#^=nFw#M$!ZpoigyPb~2Ld%0E{tf$}aI63T literal 0 HcmV?d00001 diff --git a/VirtueSky/Hierarchy/Icons/HierarchyHighlight.png.meta b/VirtueSky/Hierarchy/Icons/HierarchyHighlight.png.meta new file mode 100644 index 00000000..fcd39933 --- /dev/null +++ b/VirtueSky/Hierarchy/Icons/HierarchyHighlight.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 01b0134cecf44934f86df7ffd52f333d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + 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: 2 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 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 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 51 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 51 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: From 0d3e35ff4965b7a31c9400e82b0114cd2f4fa961 Mon Sep 17 00:00:00 2001 From: DucNV Date: Thu, 5 Sep 2024 14:47:24 +0700 Subject: [PATCH 2/2] - update version --- README.md | 4 ++-- VirtueSky/ControlPanel/ConstantPackage.cs | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4920c1a1..3069aee8 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ ### 1: Download the repo and drop it into folder `Assets` ### 2: Add the line below to `Packages/manifest.json` -for version `3.0.0` +for version `3.0.1` ```csharp -"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.0", +"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.1", ``` ## Includes modules diff --git a/VirtueSky/ControlPanel/ConstantPackage.cs b/VirtueSky/ControlPanel/ConstantPackage.cs index 4ba35b14..eff4620c 100644 --- a/VirtueSky/ControlPanel/ConstantPackage.cs +++ b/VirtueSky/ControlPanel/ConstantPackage.cs @@ -2,7 +2,7 @@ { public class ConstantPackage { - public const string VersionSunflower = "3.0.0"; + public const string VersionSunflower = "3.0.1"; public const string PackageNameInAppPurchase = "com.unity.purchasing"; public const string MaxVersionInAppPurchase = "4.12.2"; public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json"; diff --git a/package.json b/package.json index cc8f8886..64cbbc3c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.virtuesky.sunflower", "displayName": "Sunflower", "description": "Core ScriptableObject Architecture for building Unity games", - "version": "3.0.0", + "version": "3.0.1", "unity": "2022.3", "category": "virtuesky", "license": "MIT",