From ac593b8a227164e44c8f31ede7caef9fe7d44cf8 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Sun, 23 Feb 2025 20:51:02 +0800 Subject: [PATCH] polishing --- Editor/DebugX.Editor.asmdef | 18 ++++++++++++++++++ Editor/DebugX.Editor.asmdef.meta | 7 +++++++ Runtime/Utils/StaticData.cs | 28 +--------------------------- Samples/Sample.unity | 10 +++++----- package.json | 5 +++-- 5 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 Editor/DebugX.Editor.asmdef create mode 100644 Editor/DebugX.Editor.asmdef.meta diff --git a/Editor/DebugX.Editor.asmdef b/Editor/DebugX.Editor.asmdef new file mode 100644 index 0000000..8b56b63 --- /dev/null +++ b/Editor/DebugX.Editor.asmdef @@ -0,0 +1,18 @@ +{ + "name": "DCFApixels.DebugX.Editor", + "rootNamespace": "DCFApixels", + "references": [ + "GUID:1139531e2a3a6bd4c8ad2bc68ae00719" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Editor/DebugX.Editor.asmdef.meta b/Editor/DebugX.Editor.asmdef.meta new file mode 100644 index 0000000..5032c7e --- /dev/null +++ b/Editor/DebugX.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 00687d448c048144183f19c17d44692c +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Utils/StaticData.cs b/Runtime/Utils/StaticData.cs index 507830a..c0285af 100644 --- a/Runtime/Utils/StaticData.cs +++ b/Runtime/Utils/StaticData.cs @@ -3,10 +3,7 @@ using static DCFApixels.DebugX; namespace DCFApixels.DebugXCore { - public interface IStaticData - { - string GetName(); - } + public interface IStaticData { } public interface IStaticMaterial : IStaticData { int GetExecuteOrder(); @@ -21,31 +18,26 @@ namespace DCFApixels.DebugXCore public readonly struct LitMat : IStaticMaterial { - public string GetName() => "Lit"; public int GetExecuteOrder() => 0; public Material GetMaterial() => Materials.Lit; } public readonly struct UnlitMat : IStaticMaterial { - public string GetName() => "Unlit"; public int GetExecuteOrder() => 100_000; public Material GetMaterial() => Materials.Unlit; } public readonly struct WireMat : IStaticMaterial { - public string GetName() => "Wire"; public int GetExecuteOrder() => 1_000_000; public Material GetMaterial() => Materials.Wire; } public readonly struct BillboardMat : IStaticMaterial { - public string GetName() => "Billboard"; public int GetExecuteOrder() => 200_000; public Material GetMaterial() => Materials.Billboard; } public readonly struct DotMat : IStaticMaterial { - public string GetName() => "Dot"; public int GetExecuteOrder() => 300_000; public Material GetMaterial() => Materials.Dot; } @@ -53,92 +45,74 @@ namespace DCFApixels.DebugXCore ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public readonly struct SphereMesh : IStaticMesh { - public string GetName() => "Sphere"; public Mesh GetMesh() => Meshes.Sphere; } public readonly struct CubeMesh : IStaticMesh { - public string GetName() => "Cube"; public Mesh GetMesh() => Meshes.Cube; } public readonly struct QuadMesh : IStaticMesh { - public string GetName() => "Quad"; public Mesh GetMesh() => Meshes.Quad; } public readonly struct CircleMesh : IStaticMesh { - public string GetName() => "Circle"; public Mesh GetMesh() => Meshes.Circle; } public readonly struct CapsuleBodyMesh : IStaticMesh { - public string GetName() => "CapsuleBody"; public Mesh GetMesh() => Meshes.CapsuleBody; } public readonly struct CapsuleHeadMesh : IStaticMesh { - public string GetName() => "CapsuleHead"; public Mesh GetMesh() => Meshes.CapsuleHead; } public readonly struct FlatCapsuleBodyMesh : IStaticMesh { - public string GetName() => "FlatCapsuleBody"; public Mesh GetMesh() => Meshes.FlatCapsuleBody; } public readonly struct FlatCapsuleHeadMesh : IStaticMesh { - public string GetName() => "FlatCapsuleHead"; public Mesh GetMesh() => Meshes.FlatCapsuleHead; } public readonly struct ArrowMesh : IStaticMesh { - public string GetName() => "Arrow"; public Mesh GetMesh() => Meshes.Arrow; } public readonly struct DotMesh : IStaticMesh { - public string GetName() => "Dot"; public Mesh GetMesh() => Meshes.Dot; } public readonly struct DotQuadMesh : IStaticMesh { - public string GetName() => "DotQuad"; public Mesh GetMesh() => Meshes.DotQuad; } public readonly struct DotDiamondMesh : IStaticMesh { - public string GetName() => "DotDiamond"; public Mesh GetMesh() => Meshes.DotDiamond; } public readonly struct DotCrossMesh : IStaticMesh { - public string GetName() => "DotCross"; public Mesh GetMesh() => Meshes.DotCross; } public readonly struct WireLineMesh : IStaticMesh { - public string GetName() => "WireLine"; public Mesh GetMesh() => Meshes.WireLine; } public readonly struct WireCubeMesh : IStaticMesh { - public string GetName() => "WireCube"; public Mesh GetMesh() => Meshes.WireCube; } public readonly struct WireArcMesh : IStaticMesh { - public string GetName() => "WireArc"; public Mesh GetMesh() => Meshes.WireArc; } public readonly struct WireCircleMesh : IStaticMesh { - public string GetName() => "WireCircle"; public Mesh GetMesh() => Meshes.WireCircle; } public readonly struct WireSphereMesh : IStaticMesh { - public string GetName() => "WireSphere"; public Mesh GetMesh() => Meshes.WireSphere; } } \ No newline at end of file diff --git a/Samples/Sample.unity b/Samples/Sample.unity index fe5f181..d761ca2 100644 --- a/Samples/Sample.unity +++ b/Samples/Sample.unity @@ -454,7 +454,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} m_LocalPosition: {x: 0, y: -0.325, z: 0} - m_LocalScale: {x: 6, y: 6, z: 1} + m_LocalScale: {x: 7, y: 6, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1269719929} @@ -1002,7 +1002,7 @@ Transform: m_GameObject: {fileID: 298618459} serializedVersion: 2 m_LocalRotation: {x: 0.374766, y: 0.10948002, z: -0.044618975, w: 0.91955084} - m_LocalPosition: {x: -7.0872693, y: 12.125551, z: -13.7735615} + m_LocalPosition: {x: -6.55, y: 12.125551, z: -13.9} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -1523,7 +1523,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} m_LocalPosition: {x: 0, y: -0.325, z: 0} - m_LocalScale: {x: 6, y: 6, z: 1} + m_LocalScale: {x: 7, y: 6, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 798932521} @@ -2073,7 +2073,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} m_LocalPosition: {x: 0, y: -0.325, z: 0} - m_LocalScale: {x: 6, y: 6, z: 1} + m_LocalScale: {x: 7, y: 6, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1146741158} @@ -4173,7 +4173,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: -0.325, z: 0} - m_LocalScale: {x: 6, y: 6, z: 1} + m_LocalScale: {x: 7, y: 6, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2018093306} diff --git a/package.json b/package.json index 68d0eef..49a1960 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "displayName": "DebugX", "description": "", - "unity": "2020.3", + "unity": "2021.3", "version": "0.5.0", "repository": { "type": "git", @@ -16,6 +16,7 @@ "keywords": [ "editor", - "utility" + "utility", + "gizmos" ] } \ No newline at end of file