├── Image └── UGizmo-02.png ├── src └── UGizmo │ ├── Assets │ ├── UGizmo │ │ ├── Internal.meta │ │ ├── UGizmos.cs.meta │ │ ├── Internal │ │ │ ├── Gizmo.cs.meta │ │ │ ├── Utility.meta │ │ │ ├── DrawData.cs.meta │ │ │ ├── Extension.meta │ │ │ ├── Extension │ │ │ │ ├── Arrow.cs.meta │ │ │ │ ├── Cone.cs.meta │ │ │ │ ├── Cube.cs.meta │ │ │ │ ├── Gizmo.meta │ │ │ │ ├── Jobs.meta │ │ │ │ ├── Plane.cs.meta │ │ │ │ ├── Point.cs.meta │ │ │ │ ├── Tube.cs.meta │ │ │ │ ├── Arrow2d.cs.meta │ │ │ │ ├── Capsule.cs.meta │ │ │ │ ├── Capsule2d.cs.meta │ │ │ │ ├── Circle.cs.meta │ │ │ │ ├── Cylinder.cs.meta │ │ │ │ ├── Frustum.cs.meta │ │ │ │ ├── Hemisphere.cs.meta │ │ │ │ ├── Semicircle.cs.meta │ │ │ │ ├── Triangle.cs.meta │ │ │ │ ├── WireCircle.cs.meta │ │ │ │ ├── WireCone.cs.meta │ │ │ │ ├── WireCube.cs.meta │ │ │ │ ├── WireLine.cs.meta │ │ │ │ ├── WirePlane.cs.meta │ │ │ │ ├── WireSphere.cs.meta │ │ │ │ ├── Gizmo │ │ │ │ │ ├── ConeGizmo.cs.meta │ │ │ │ │ ├── PrimitiveGizmo.cs.meta │ │ │ │ │ ├── WireLineGizmo.cs.meta │ │ │ │ │ ├── ConeGizmo.cs │ │ │ │ │ ├── WireLineGizmo.cs │ │ │ │ │ └── PrimitiveGizmo.cs │ │ │ │ ├── WireArrow2d.cs.meta │ │ │ │ ├── WireCapsule.cs.meta │ │ │ │ ├── WireCapsule2d.cs.meta │ │ │ │ ├── WireCylinder.cs.meta │ │ │ │ ├── WireHemisphere.cs.meta │ │ │ │ ├── WireSemicircle.cs.meta │ │ │ │ ├── WireTriangle.cs.meta │ │ │ │ ├── Jobs │ │ │ │ │ ├── CreateArrowJob.cs.meta │ │ │ │ │ ├── CreateConeJob.cs.meta │ │ │ │ │ ├── CreateArrow2dJob.cs.meta │ │ │ │ │ ├── CreateCapsule2dJob.cs.meta │ │ │ │ │ ├── CreateCapsuleJob.cs.meta │ │ │ │ │ ├── CreateFrustumJob.cs.meta │ │ │ │ │ ├── CreatePrimitiveJob.cs.meta │ │ │ │ │ ├── CreateWireArrow2dJob.cs.meta │ │ │ │ │ ├── CreateWireCapsuleJob.cs.meta │ │ │ │ │ ├── CreateWireConeJob.cs.meta │ │ │ │ │ ├── CreateWireLineJob.cs.meta │ │ │ │ │ ├── CreateWirePlaneJob.cs.meta │ │ │ │ │ ├── CreateWireCapsule2dJob.cs.meta │ │ │ │ │ ├── CreateWireCylinderJob.cs.meta │ │ │ │ │ ├── CreateWireTriangleJob.cs.meta │ │ │ │ │ ├── CreatePrimitiveJob.cs │ │ │ │ │ ├── CreateConeJob.cs │ │ │ │ │ ├── CreateWireLineJob.cs │ │ │ │ │ ├── CreateWireTriangleJob.cs │ │ │ │ │ ├── CreateWirePlaneJob.cs │ │ │ │ │ ├── CreateArrowJob.cs │ │ │ │ │ ├── CreateWireCapsule2dJob.cs │ │ │ │ │ ├── CreateWireCylinderJob.cs │ │ │ │ │ ├── CreateCapsule2dJob.cs │ │ │ │ │ ├── CreateCapsuleJob.cs │ │ │ │ │ ├── CreateWireConeJob.cs │ │ │ │ │ ├── CreateWireCapsuleJob.cs │ │ │ │ │ └── CreateWireArrow2dJob.cs │ │ │ │ ├── Sphere.cs.meta │ │ │ │ ├── Cone.cs │ │ │ │ ├── Cube.cs │ │ │ │ ├── Tube.cs │ │ │ │ ├── Sphere.cs │ │ │ │ ├── Plane.cs │ │ │ │ ├── Circle.cs │ │ │ │ ├── Cylinder.cs │ │ │ │ ├── Hemisphere.cs │ │ │ │ ├── Triangle.cs │ │ │ │ ├── Semicircle.cs │ │ │ │ ├── Point.cs │ │ │ │ ├── WireLine.cs │ │ │ │ ├── WireCube.cs │ │ │ │ ├── WireCircle.cs │ │ │ │ ├── WireSphere.cs │ │ │ │ ├── WireHemisphere.cs │ │ │ │ ├── WireSemicircle.cs │ │ │ │ ├── WirePlane.cs │ │ │ │ ├── WireTriangle.cs │ │ │ │ ├── Frustum.cs │ │ │ │ ├── Arrow.cs │ │ │ │ ├── WireCone.cs │ │ │ │ ├── Capsule.cs │ │ │ │ ├── WireArrow2d.cs │ │ │ │ ├── WireCylinder.cs │ │ │ │ ├── Capsule2d.cs │ │ │ │ ├── WireCapsule.cs │ │ │ │ ├── WireCapsule2d.cs │ │ │ │ └── Arrow2d.cs │ │ │ ├── GizmoDrawSystem.cs.meta │ │ │ ├── GizmoDrawer.cs.meta │ │ │ ├── IGizmoCreator.cs.meta │ │ │ ├── NoResizableList.cs.meta │ │ │ ├── PreparableGizmo.cs.meta │ │ │ ├── SharedGizmoBuffer.cs.meta │ │ │ ├── UGizmoDispatcher.cs.meta │ │ │ ├── UnsafeListReference.cs.meta │ │ │ ├── Utility │ │ │ │ ├── AssetUtility.cs.meta │ │ │ │ ├── GizmoUtility.cs.meta │ │ │ │ ├── UnmanagedUtility.cs.meta │ │ │ │ ├── UnityInternalUtility.cs.meta │ │ │ │ ├── UnityInternalUtility.cs │ │ │ │ ├── UnmanagedUtility.cs │ │ │ │ ├── AssetUtility.cs │ │ │ │ └── GizmoUtility.cs │ │ │ ├── ContinuousGizmoBuffer.cs.meta │ │ │ ├── GizmoInstanceActivator.cs.meta │ │ │ ├── PreparingJobScheduler.cs.meta │ │ │ ├── GizmoDrawBuffer.cs.meta │ │ │ ├── DrawData.cs │ │ │ ├── IGizmoCreator.cs │ │ │ ├── UnsafeListReference.cs │ │ │ ├── PreparableGizmo.cs │ │ │ ├── Gizmo.cs │ │ │ ├── NoResizableList.cs │ │ │ ├── PreparingJobScheduler.cs │ │ │ ├── SharedGizmoBuffer.cs │ │ │ └── ContinuousGizmoBuffer.cs │ │ ├── UGizmosCore.cs.meta │ │ ├── package.json.meta │ │ ├── UGizmo.asmdef.meta │ │ ├── Resources.meta │ │ ├── Samples.meta │ │ ├── Shader.meta │ │ ├── Resources │ │ │ ├── UGizmo.meta │ │ │ └── UGizmo │ │ │ │ ├── Meshes.meta │ │ │ │ ├── Materials.meta │ │ │ │ ├── Meshes │ │ │ │ ├── Cone.mesh.meta │ │ │ │ ├── Cube.mesh.meta │ │ │ │ ├── Tube.mesh.meta │ │ │ │ ├── Capsule.mesh.meta │ │ │ │ ├── Circle.mesh.meta │ │ │ │ ├── Cylinder.mesh.meta │ │ │ │ ├── Plane.mesh.meta │ │ │ │ ├── Point.mesh.meta │ │ │ │ ├── Sphere.mesh.meta │ │ │ │ ├── Triangle.mesh.meta │ │ │ │ ├── WireCube.asset.meta │ │ │ │ ├── WireLine.asset.meta │ │ │ │ ├── Hemisphere.mesh.meta │ │ │ │ ├── Semicircle.mesh.meta │ │ │ │ ├── WireCircle.asset.meta │ │ │ │ ├── WireSphere.asset.meta │ │ │ │ ├── WireHemisphere.asset.meta │ │ │ │ └── WireSemicircle.asset.meta │ │ │ │ └── Materials │ │ │ │ ├── CommonMesh.mat.meta │ │ │ │ ├── CommonWire.mat.meta │ │ │ │ ├── CommonMeshCullOff.mat.meta │ │ │ │ └── CommonMeshFront.mat.meta │ │ ├── Samples~ │ │ │ ├── Benchmark.meta │ │ │ ├── Benchmark │ │ │ │ ├── Editor.meta │ │ │ │ └── Editor │ │ │ │ │ ├── Scenes.meta │ │ │ │ │ └── Scenes │ │ │ │ │ └── UGizmo_Benchmark.unity.meta │ │ │ ├── UGizmoSamples_HDRP.meta │ │ │ ├── UGizmoSamples_URP.meta │ │ │ ├── UGizmoSamples_URP │ │ │ │ ├── Scenes │ │ │ │ │ └── Sample_URP.unity.meta │ │ │ │ ├── Scenes.meta │ │ │ │ ├── Scripts.meta │ │ │ │ ├── Materials.meta │ │ │ │ ├── UGizmo.Samples.URP.asmdef.meta │ │ │ │ ├── Materials │ │ │ │ │ ├── Physics.mat.meta │ │ │ │ │ ├── Obstacle.mat.meta │ │ │ │ │ ├── Utilities.mat.meta │ │ │ │ │ ├── 2D Primitives.mat.meta │ │ │ │ │ └── 3D Primitives.mat.meta │ │ │ │ ├── Scripts │ │ │ │ │ ├── DrawArrows.cs.meta │ │ │ │ │ ├── DrawPhysics.cs.meta │ │ │ │ │ ├── DrawPhysics2d.cs.meta │ │ │ │ │ ├── DrawPrimitives.cs.meta │ │ │ │ │ ├── DrawPrimitives2d.cs.meta │ │ │ │ │ ├── DrawWithDuration.cs.meta │ │ │ │ │ ├── DrawWithDuration.cs │ │ │ │ │ ├── DrawPhysics.cs │ │ │ │ │ ├── DrawPhysics2d.cs │ │ │ │ │ ├── DrawArrows.cs │ │ │ │ │ ├── DrawPrimitives2d.cs │ │ │ │ │ └── DrawPrimitives.cs │ │ │ │ └── UGizmo.Samples.URP.asmdef │ │ │ └── UGizmoSamples_HDRP │ │ │ │ ├── Scenes.meta │ │ │ │ ├── Scenes │ │ │ │ └── Sample_HDRP.unity.meta │ │ │ │ ├── Materials.meta │ │ │ │ ├── Scripts.meta │ │ │ │ ├── UGizmo.Samples.HDRP.asmdef.meta │ │ │ │ ├── Materials │ │ │ │ ├── Obstacle.mat.meta │ │ │ │ ├── Physics.mat.meta │ │ │ │ ├── Utilities.mat.meta │ │ │ │ ├── 2D Primitives.mat.meta │ │ │ │ └── 3D Primitives.mat.meta │ │ │ │ ├── Scripts │ │ │ │ ├── DrawArrows.cs.meta │ │ │ │ ├── DrawPhysics.cs.meta │ │ │ │ ├── DrawPhysics2d.cs.meta │ │ │ │ ├── DrawPrimitives.cs.meta │ │ │ │ ├── DrawPrimitives2d.cs.meta │ │ │ │ ├── DrawWithDuration.cs.meta │ │ │ │ ├── DrawWithDuration.cs │ │ │ │ ├── DrawPhysics.cs │ │ │ │ ├── DrawPhysics2d.cs │ │ │ │ ├── DrawArrows.cs │ │ │ │ ├── DrawPrimitives2d.cs │ │ │ │ └── DrawPrimitives.cs │ │ │ │ └── UGizmo.Samples.HDRP.asmdef │ │ ├── Shader │ │ │ ├── UGizmoMesh.shader.meta │ │ │ ├── UGizmoWire.shader.meta │ │ │ ├── UGizmoMeshCullOff.shader.meta │ │ │ ├── UGizmoMeshFront.shader.meta │ │ │ ├── UGizmoWire.shader │ │ │ ├── UGizmoMeshFront.shader │ │ │ └── UGizmoMeshCullOff.shader │ │ ├── UGizmo.asmdef │ │ └── package.json │ ├── UGizmo.meta │ ├── Settings.meta │ ├── Settings │ │ ├── URP-Balanced.asset.meta │ │ ├── URP-HighFidelity.asset.meta │ │ ├── URP-Performant.asset.meta │ │ ├── SampleSceneProfile.asset.meta │ │ ├── URP-Balanced-Renderer.asset.meta │ │ ├── URP-Performant-Renderer.asset.meta │ │ ├── URP-HighFidelity-Renderer.asset.meta │ │ └── URP-Performant-Renderer.asset │ ├── UniversalRenderPipelineGlobalSettings.asset.meta │ └── UniversalRenderPipelineGlobalSettings.asset │ ├── ProjectSettings │ ├── ProjectVersion.txt │ ├── CommonBurstAotSettings.json │ ├── ClusterInputManager.asset │ ├── PresetManager.asset │ ├── XRSettings.asset │ ├── VersionControlSettings.asset │ ├── TimeManager.asset │ ├── VFXManager.asset │ ├── BurstAotSettings_WebGL.json │ ├── URPProjectSettings.asset │ ├── AudioManager.asset │ ├── EntitiesClientSettings.asset │ ├── BurstAotSettings_StandaloneWindows.json │ ├── EditorBuildSettings.asset │ ├── ShaderGraphSettings.asset │ ├── TagManager.asset │ ├── UnityConnectSettings.asset │ ├── PackageManagerSettings.asset │ ├── MemorySettings.asset │ ├── DynamicsManager.asset │ ├── EditorSettings.asset │ ├── NavMeshAreas.asset │ ├── Physics2DSettings.asset │ └── GraphicsSettings.asset │ ├── .gitignore │ ├── UIElementsSchema │ ├── UnityEditor.AddressableAssets.Diagnostics.xsd │ ├── UnityEditor.UIElements.Debugger.xsd │ ├── UnityEditor.Search.xsd │ ├── UIElements.xsd │ ├── GlobalNamespace.xsd │ ├── UnityEditor.ShortcutManagement.xsd │ └── Unity.Entities.UI.xsd │ └── Packages │ └── manifest.json └── LICENSE /Image/UGizmo-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harumas/UGizmo/HEAD/Image/UGizmo-02.png -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0f91162f32c44a4ad4b061c6d4d161d 3 | timeCreated: 1714215024 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/UGizmos.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a01fb0b93c914fa1ba366bd0f0d20ac6 3 | timeCreated: 1707361144 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Gizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cf598b7b0ac429f87e6db77c2e38d99 3 | timeCreated: 1708411685 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e52fb5dda454c88a1d82f8e7353e5d7 3 | timeCreated: 1715358142 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/UGizmosCore.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 978af58d7b994db7921c2fac6f67b1b0 3 | timeCreated: 1712984436 -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.18f1 2 | m_EditorVersionWithRevision: 2022.3.18f1 (d29bea25151d) 3 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/DrawData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 249175ea97cb4bf2a03d695cd57912c8 3 | timeCreated: 1711781736 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c48a0a07f9d45d9a8e1c948bb87ef71 3 | timeCreated: 1707396499 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Arrow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4562278b45114d2ebc15f51bca1cabbf 3 | timeCreated: 1711971652 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed5a719c2f0248f8b4c91e8bdff1ffbf 3 | timeCreated: 1711881799 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f62e21566694b9e95b68bc368fbd023 3 | timeCreated: 1711866569 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97b6bf706d844a16b7edca5d486a6f7d 3 | timeCreated: 1714214978 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9386a501363745cfbaf417831f77ba99 3 | timeCreated: 1709554033 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Plane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c36bb4e33204bfe89adcf181b8ebe94 3 | timeCreated: 1712021339 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Point.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69c107fee1fe459c8a228883612c208b 3 | timeCreated: 1712149540 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Tube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08047bee8522434380a46afa4e94c264 3 | timeCreated: 1712069935 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/GizmoDrawSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8c0d98e150348798ead854fd6426f7e 3 | timeCreated: 1711780011 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/GizmoDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ae2f96a62204cc8903749e7e46002c6 3 | timeCreated: 1709177994 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/IGizmoCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94df994539914b3cb27f0354d326d0f4 3 | timeCreated: 1709004823 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/NoResizableList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebf8012bd5fb4e98862ee01d240c61c2 3 | timeCreated: 1709273370 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/PreparableGizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4b02669aada450b81f2f82362add29f 3 | timeCreated: 1714217057 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Arrow2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae8dba75fe7249ada8aca667f543031e 3 | timeCreated: 1712032847 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Capsule.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 705c7c3fefb04ad386538dd2d43d059e 3 | timeCreated: 1712069632 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Capsule2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb2c05b2663a424eaa1045b52dba312b 3 | timeCreated: 1712901986 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Circle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfbc7250699c419f89b8bb835abf3341 3 | timeCreated: 1712155015 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cylinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3aa1b64f44df4926b52f75002982f8a8 3 | timeCreated: 1711882553 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Frustum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0e11319a7a94b34a0bc67d9faa79e48 3 | timeCreated: 1709635915 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Hemisphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36a30815ed4146219b726306821e1c91 3 | timeCreated: 1712069931 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Semicircle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fe0a2c28dd240a0b17b6a95f9269612 3 | timeCreated: 1712901581 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Triangle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6499fcbf0b704a1291c9f8759e72f43e 3 | timeCreated: 1712034327 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCircle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce092a8937a14f5c9a1351f693302597 3 | timeCreated: 1712156006 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCone.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 977e5a92e64544ef861bc642a63260a1 3 | timeCreated: 1712845151 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCube.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 448e652246824306812c5340a6895bb1 3 | timeCreated: 1709557455 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireLine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2c330392193496c9c998c3e73c9eb7f 3 | timeCreated: 1709377877 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WirePlane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a83a7369a8c4a15a22dd7197ade9411 3 | timeCreated: 1712148500 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireSphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38ef44c7a1ee456ebb543bc21a1895b9 3 | timeCreated: 1709004926 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/SharedGizmoBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecfaf12a1400419d80e09beccf281ed0 3 | timeCreated: 1713096563 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/UGizmoDispatcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da002cfda9d94cdb825377ca382a202e 3 | timeCreated: 1714703416 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/UnsafeListReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f93620a6344061b9757370912fa55a 3 | timeCreated: 1714968448 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/AssetUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2593ae9cae304eaa917f9904069dd4de 3 | timeCreated: 1709554201 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/GizmoUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90e66e5d828a494bab2b1e6ee5635487 3 | timeCreated: 1712028365 -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/CommonBurstAotSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 4, 4 | "DisabledWarnings": "" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/ContinuousGizmoBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 892fdbb1b676497eb9a0f98a3c61c337 3 | timeCreated: 1715328939 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/ConeGizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b8284fb93cc4d12868e808a837395e0 3 | timeCreated: 1714206477 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireArrow2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56c2637bb4404d9cb65bb758c291e32d 3 | timeCreated: 1712059239 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCapsule.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cafffd0f9f149da93be913763c5ea0f 3 | timeCreated: 1712457596 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCapsule2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fdd7b79128d44d39fa9a48ed47de990 3 | timeCreated: 1712924855 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCylinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ae684b49211464c986292af6f29bf4d 3 | timeCreated: 1712841331 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireHemisphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ff7252090e7423d8cea8910f22d98e6 3 | timeCreated: 1712457669 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireSemicircle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b79234c4d10641c0a56765f539c6a264 3 | timeCreated: 1712924814 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireTriangle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a52f1b7adf314756914773f99ab8e58f 3 | timeCreated: 1712155973 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/GizmoInstanceActivator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1830aef331940b59ea6d6e8857b6062 3 | timeCreated: 1711782029 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/PreparingJobScheduler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62f2877a618a409fa9765e53f47522b9 3 | timeCreated: 1711944429 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/UnmanagedUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26c41cdd42734c81ae8a2ceceb8239c3 3 | timeCreated: 1714228868 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/PrimitiveGizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a967b42f6b04e00846cdf94d1e075d7 3 | timeCreated: 1714198815 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/WireLineGizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d32187741962479ab4087c9c72d5dea0 3 | timeCreated: 1714204483 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateArrowJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 234c3e67e26e411197975d87bbcd5b8d 3 | timeCreated: 1711972373 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateConeJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9cf7f7f07f14f44acdfb52cab51f341 3 | timeCreated: 1712847331 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/UnityInternalUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e7045024bc549c49efedf3af9d7c0a0 3 | timeCreated: 1715357069 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateArrow2dJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8db6d8ee4d94cdc9173ddfd379c7124 3 | timeCreated: 1712034860 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateCapsule2dJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cf69ecb50d9419eb4d8f706ddc90da6 3 | timeCreated: 1712901126 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateCapsuleJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c44e5a1983e14fda9da117585de87a7f 3 | timeCreated: 1712071560 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateFrustumJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef0a1a7f1f9842da97c5037abb621aae 3 | timeCreated: 1709636114 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreatePrimitiveJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd54063359a94f709b226ce211945955 3 | timeCreated: 1708072497 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireArrow2dJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1b117377b2742248a4f92a1813d0611 3 | timeCreated: 1712058761 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCapsuleJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28a186bfa6c44ac7875198fcea815abd 3 | timeCreated: 1712455970 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireConeJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 297c12fd928f43009d461e3847044b44 3 | timeCreated: 1712846124 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireLineJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b81b7dc2b2e441a59272d2d6a99eec41 3 | timeCreated: 1709377958 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWirePlaneJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04991dc74ff14a7eb389de5f38ef86d0 3 | timeCreated: 1712313061 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCapsule2dJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 761d96ccb3de49c79b1caebc91d4e87f 3 | timeCreated: 1712924911 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCylinderJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a8e8d00d5cd45c4866dd85ada0977d9 3 | timeCreated: 1712841593 -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireTriangleJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90d2f31278194426b53a2a959dc370d6 3 | timeCreated: 1712896375 -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f0b484616766d1438d3d6cf715ae44b 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ade67e22de8c06a4d83f6a45b6be0d3a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 709f11a7f3c4041caa4ef136ea32d874 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/UGizmo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1e10642d7fcc6b41bab01db03480669 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d3ae7dc56a97334a877410b63258b80 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02c1ac10f1783f5429c631d1dd8fcbad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1603f8e42bb4acd41a31b8b5de75702c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1d08d29a2e39534eb5b44b5b1fbde9c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/Benchmark.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd26f70738d9b2a49a17f88e87cbbd82 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfafedc28835c1840ba030a76b80339f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48a3a4f50b5a03145af3e3c75a668852 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/Benchmark/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 459869baee74378409ab361a562c1035 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 532b527970218cc4bad5041aea8c85cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9677beff905c4b64da459ff145de4c2a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scenes/Sample_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-Balanced.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1260c1148f6143b28bae5ace5e9c5d1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-HighFidelity.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b7fd9122c28c4d15b667c7040e3b3fd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-Performant.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0e2fc18fe036412f8223b3b3d9ad574 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/Benchmark/Editor/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63ecd26b582ce2242bcd14176867a5a8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/Benchmark/Editor/Scenes/UGizmo_Benchmark.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4c18921298c76646a758f8d4dc691ed 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17c74f225488c1446a6860e728e0f307 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scenes/Sample_HDRP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83451121f83e84149be107f6d3379859 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7d1c54eb652fcf47a5d96bb73e7207a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe503057e7fca0440b02ca4256476d0a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/SampleSceneProfile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6560a915ef98420e9faacc1c7438823 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48e563a1fd42503498d96fbdbf50cf4d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 524350a810957074aa58dcb2f9d21697 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99dae36bc3232414a82ec09e295f398a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/UGizmo.Samples.HDRP.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa3740c29f7bd6843bcf8a3573f7d0e0 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/UGizmo.Samples.URP.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1acaeb2f16a0c146bce3a35bd307f53 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-Balanced-Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e634585d5c4544dd297acaee93dc2beb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-Performant-Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 707360a9c581a4bd7aa53bfeb1429f71 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Cone.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a7d1e226fe35a14297e22d9c6bf0e40 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Cube.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e174c2116dd47fe4e91e947a6746f180 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Tube.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82a77a03b11649645b9e882f1dff54e7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-HighFidelity-Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c40be3174f62c4acf8c1216858c64956 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Capsule.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dde2d7bde732c7544a19b169be04bd5e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Circle.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cc55a08c5ab3c1468e5761bd1438f61 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Cylinder.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 862e6c1f4d6c89241a18f5ff4acbdbb8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Plane.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c2a97d9a9a97d44db52465df22e3536 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Point.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5c8d7c2cbb17554d97faa18708ce547 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Sphere.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3547790770049ee4694dc34dcbec7b2e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Triangle.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c9280af21a48094d8186cd8c979f297 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireCube.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b30685063d6e8f8419593fe621be4a38 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireLine.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cfdaccbc24a2cb47aabe8752abc443d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UniversalRenderPipelineGlobalSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18dc0cd2c080841dea60987a38ce93fa 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Materials/CommonMesh.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91667927d318248448e65f853d9eed60 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Materials/CommonWire.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 324bf8f14fa29254da8035da6a81b5c0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Hemisphere.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0988da8c34415144d85f911bfde27835 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/Semicircle.mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6821c9ea800406347ab602533f3ae6a2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireCircle.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c6656755aa14f04d84fecc493ff7f46 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireSphere.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b420b4d2db7aa94087fe5518a4e4bb6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Materials/CommonMeshCullOff.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3042c3612d3e8e44f85e8e4f9ee90d0e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Materials/CommonMeshFront.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8133cb710bffb7479069b41740f8073 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireHemisphere.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d098592fad5e9a1428e2ea18e9bcc976 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Resources/UGizmo/Meshes/WireSemicircle.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a37aab506dbd5d44abab326511a33360 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials/Physics.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65605db38b65e4143946c1b90dbb6286 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials/Obstacle.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e41a2d45d8c102f4db988a26a5a3a114 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials/Physics.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e7862558d09eb14cac2f470aac1ae74 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials/Utilities.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: addf12ba85056004ca1aa1a3cbd5ff5b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials/Obstacle.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50f4684ee2fae6f4f87d552269113c0e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials/Utilities.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b9691e14f5ef524d87b9b13eaf29d22 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials/2D Primitives.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3924e8e166700243a390cd0ff840d27 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Materials/3D Primitives.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf4ec1bc769d1334295a8a798ba14961 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials/2D Primitives.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6d3df28f73759e4290547370c93a3c8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Materials/3D Primitives.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18bac04286c01ba47af42e132f2dde2c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoMesh.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fad764c338be04478c50a9ff5997b6c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoWire.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7348339d484b964aa698dac5a2ee8c1 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoMeshCullOff.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cc363dbe9eec224abdb907182a2f9a4 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoMeshFront.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c3f9ecae12488a4f9ef9395da3e647f 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Sphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 162ab2c0a22942e59bac531bf488b1d3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/GizmoDrawBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91fd7b7fa4c4420c9623d1b6cab8d112 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawArrows.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90f8b96b02edffa44bd4dc0c57a9e5a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawArrows.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efbac5b70ff4e2d4ab5a77ab81e6cea1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPhysics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c4b24e2a0d523647a4a10ce9ad753c4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPhysics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78dad9d283e70a14a8f98a04998674ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPhysics2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34c8685ba96bae144a735adaf37c8d97 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPrimitives.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f832c1b4a6ea8e248a30e0ec38762fc0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPhysics2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92dd5690a603429aa0d2adb25cd2b4e1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPrimitives.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f47a3052d2755ae4eacb68418ba5a11f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPrimitives2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54d81dee0ab64a34e8acd1e3d7a31532 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawWithDuration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e5f2e76410e4f941975f9b06dd99e9d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPrimitives2d.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66a8ef51b77236346b04d5db8c2d8056 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawWithDuration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe76d60000e3dde4aa6f097260e8d3b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cone.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class ConeAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Cone"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Cone : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cube.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class CubeAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Cube"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Cube : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Tube.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class TubeAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Tube"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Tube : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Sphere.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class SphereAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Sphere"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Sphere : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/DrawData.cs: -------------------------------------------------------------------------------- 1 | using Unity.Mathematics; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Internal 5 | { 6 | internal readonly struct DrawData 7 | { 8 | public readonly float4x4 Matrix; 9 | public readonly Color Color; 10 | 11 | public DrawData(in float4x4 matrix, in Color color) 12 | { 13 | this.Matrix = matrix; 14 | this.Color = color; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Plane.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class PlaneAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Plane"; 8 | public override string MaterialName => "CommonMeshCullOff"; 9 | } 10 | 11 | internal sealed class Plane : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Circle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class CircleAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Circle"; 8 | public override string MaterialName => "CommonMeshCullOff"; 9 | } 10 | 11 | internal sealed class Circle : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Cylinder.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class CylinderAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Cylinder"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Cylinder : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Hemisphere.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class HemisphereAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Hemisphere"; 8 | public override string MaterialName => "CommonMesh"; 9 | } 10 | 11 | internal sealed class Hemisphere : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Triangle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class TriangleAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Triangle"; 8 | public override string MaterialName => "CommonMeshCullOff"; 9 | } 10 | 11 | internal sealed class Triangle : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Semicircle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class SemicircleAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Semicircle"; 8 | public override string MaterialName => "CommonMeshCullOff"; 9 | } 10 | 11 | internal sealed class Semicircle : GizmoDrawer 12 | { 13 | } 14 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/BurstAotSettings_WebGL.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 4, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "DebugDataKind": 1, 9 | "EnableArmv9SecurityFeatures": false, 10 | "CpuMinTargetX32": 0, 11 | "CpuMaxTargetX32": 0, 12 | "CpuMinTargetX64": 0, 13 | "CpuMaxTargetX64": 0, 14 | "OptimizeFor": 0 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Point.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class PointAsset : GizmoAsset 6 | { 7 | public override string MeshName => "Point"; 8 | public override string MaterialName => "CommonMeshFront"; 9 | } 10 | 11 | internal sealed class Point : GizmoDrawer 12 | { 13 | public override int RenderQueue => 2000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireLine.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireLineAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireLine"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireLine : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCube.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireCubeAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireCube"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireCube : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 7 16 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCircle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireCircleAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireCircle"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireCircle : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireSphere.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireSphereAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireSphere"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireSphere : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/UGizmo.Samples.URP.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UGizmo.Samples.URP", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c1e10642d7fcc6b41bab01db03480669" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/UGizmo.Samples.HDRP.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UGizmo.Samples.HDRP", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c1e10642d7fcc6b41bab01db03480669" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireHemisphere.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireHemisphereAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireHemisphere"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireHemisphere : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireSemicircle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | 3 | namespace UGizmo.Internal.Extension 4 | { 5 | internal sealed class WireSemicircleAsset : GizmoAsset 6 | { 7 | public override string MeshName => "WireSemicircle"; 8 | public override string MaterialName => "CommonWire"; 9 | } 10 | 11 | internal sealed class WireSemicircle : GizmoDrawer 12 | { 13 | public override int RenderQueue => 3000; 14 | } 15 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/EntitiesClientSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: e2ea235c1fcfe29488ed97c467a0da53, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | FilterSettings: 16 | ExcludedBakingSystemAssemblies: [] 17 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 4, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "DebugDataKind": 0, 9 | "EnableArmv9SecurityFeatures": false, 10 | "CpuMinTargetX32": 0, 11 | "CpuMaxTargetX32": 0, 12 | "CpuMinTargetX64": 0, 13 | "CpuMaxTargetX64": 0, 14 | "CpuTargetsX32": 6, 15 | "CpuTargetsX64": 72, 16 | "OptimizeFor": 0 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/UGizmo/Samples/UGizmoSamples_URP/Scenes/Sample_URP.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | - enabled: 0 12 | path: Assets/a.unity 13 | guid: 6ac9520dd320af04c9164e1a5129cd4c 14 | m_configObjects: 15 | com.unity.addressableassets: {fileID: 11400000, guid: 69b17c677cffeba44a3ef87cdad0ab21, 16 | type: 2} 17 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/ShaderGraphSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | shaderVariantLimit: 128 16 | customInterpolatorErrorThreshold: 32 17 | customInterpolatorWarningThreshold: 16 18 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/UGizmo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UGizmo", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:2665a8d13d1b3f18800f46e256720795", 6 | "GUID:d8b63aba1907145bea998dd612889d6b", 7 | "GUID:df380645f10b7bc4b97d4f5eb6303d95", 8 | "GUID:e0cd26848372d4e5c891c569017e11f1" 9 | ], 10 | "includePlatforms": [], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": true, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/IGizmoCreator.cs: -------------------------------------------------------------------------------- 1 | namespace UGizmo.Internal 2 | { 3 | internal interface IGizmoCreator 4 | { 5 | void Create(GizmoInstanceActivator dispatcher); 6 | } 7 | 8 | internal abstract class GizmoAsset : IGizmoCreator 9 | where TDrawer : GizmoDrawer, new() 10 | where TJobData : unmanaged 11 | { 12 | public abstract string MeshName { get; } 13 | public abstract string MaterialName { get; } 14 | 15 | public void Create(GizmoInstanceActivator activator) 16 | { 17 | activator.RegisterDrawer(this); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/UnsafeListReference.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections; 3 | using Unity.Collections.LowLevel.Unsafe; 4 | 5 | namespace UGizmo.Internal 6 | { 7 | public class UnsafeListReference : IDisposable where T : unmanaged 8 | { 9 | private UnsafeList jobBuffer; 10 | 11 | public ref UnsafeList Ref => ref jobBuffer; 12 | 13 | public UnsafeListReference(int capacity, Allocator allocator) 14 | { 15 | jobBuffer = new UnsafeList(capacity, allocator); 16 | } 17 | 18 | public void Dispose() 19 | { 20 | jobBuffer.Dispose(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WirePlane.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WirePlane : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | LineData* planeBuffer = Gizmo.Reserve(InstanceCount * 4); 11 | 12 | JobHandle jobHandle = new CreateWirePlaneJob() 13 | { 14 | GizmoDataPtr = JobDataPtr, 15 | Result = planeBuffer 16 | }.Schedule(InstanceCount, 16); 17 | 18 | return jobHandle; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireTriangle.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal unsafe class WireTriangle : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 3); 11 | 12 | JobHandle jobHandle = new CreateWireTriangleJob() 13 | { 14 | GizmoDataPtr = JobDataPtr, 15 | Result = lineBuffer 16 | }.Schedule(InstanceCount, 16); 17 | 18 | return jobHandle; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Frustum.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class Frustum : PreparingJobScheduler 7 | { 8 | private const int LineCount = 12; 9 | 10 | public override JobHandle Schedule() 11 | { 12 | var buffer = Gizmo.Reserve(InstanceCount * LineCount); 13 | 14 | JobHandle jobHandle = new CreateFrustumJob() 15 | { 16 | GizmoDataPtr = JobDataPtr, 17 | Result = buffer 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawWithDuration.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UGizmo.Samples.HDRP 4 | { 5 | public class DrawWithDuration : MonoBehaviour 6 | { 7 | [SerializeField] private float duration; 8 | 9 | private void Start() 10 | { 11 | //Display at 1-second intervals 12 | InvokeRepeating(nameof(DrawGizmoWithDuration), 0f, duration + 1f); 13 | } 14 | 15 | private void DrawGizmoWithDuration() 16 | { 17 | UGizmos.DrawSphere(transform.position, 2f, Color.yellow, duration); 18 | UGizmos.DrawCube(transform.position + new Vector3(3f, 0f, 0f), Quaternion.identity, Vector3.one, Color.yellow, duration); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawWithDuration.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UGizmo.Samples.URP 4 | { 5 | public class DrawWithDuration : MonoBehaviour 6 | { 7 | [SerializeField] private float duration; 8 | 9 | private void Start() 10 | { 11 | //Display at 1-second intervals 12 | InvokeRepeating(nameof(DrawGizmoWithDuration), 0f, duration + 1f); 13 | } 14 | 15 | private void DrawGizmoWithDuration() 16 | { 17 | UGizmos.DrawSphere(transform.position, 2f, Color.yellow, duration); 18 | UGizmos.DrawCube(transform.position + new Vector3(3f, 0f, 0f), Quaternion.identity, Vector3.one, Color.yellow, duration); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Arrow.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class Arrow : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* cylinderBuffer = Gizmo.Reserve(InstanceCount); 11 | ConeData* coneBuffer = Gizmo.Reserve(InstanceCount); 12 | 13 | JobHandle jobHandle = new CreateArrowJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | CylinderResult = cylinderBuffer, 17 | ConeResult = coneBuffer, 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCone.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WireCone : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* circleBuffer = Gizmo.Reserve(InstanceCount); 11 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 4); 12 | 13 | JobHandle jobHandle = new CreateWireConeJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | WireCircleResult = circleBuffer, 17 | LineResult = lineBuffer 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Capsule.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class Capsule : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* hemisphereBuffer = Gizmo.Reserve(InstanceCount * 2); 11 | PrimitiveData* tubeBuffer = Gizmo.Reserve(InstanceCount); 12 | 13 | JobHandle jobHandle = new CreateCapsuleJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | HemisphereResult = hemisphereBuffer, 17 | TubeResult = tubeBuffer, 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireArrow2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WireArrow2d : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* triangleBuffer = Gizmo.Reserve(InstanceCount); 11 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 4); 12 | 13 | JobHandle jobHandle = new CreateWireArrow2dJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | TriangleResult = triangleBuffer, 17 | LineResult = lineBuffer 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCylinder.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WireCylinder : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* circleBuffer = Gizmo.Reserve(InstanceCount * 2); 11 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 4); 12 | 13 | JobHandle jobHandle = new CreateWireCylinderJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | WireCircleResult = circleBuffer, 17 | LineResult = lineBuffer 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Capsule2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class Capsule2d : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* semicircleBuffer = Gizmo.Reserve(InstanceCount * 2); 11 | PrimitiveData* planeBuffer = Gizmo.Reserve(InstanceCount); 12 | 13 | JobHandle jobHandle = new CreateCapsule2dJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | SemicircleResult = semicircleBuffer, 17 | PlaneResult = planeBuffer, 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCapsule.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WireCapsule : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* hemisphereBuffer = Gizmo.Reserve(InstanceCount * 2); 11 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 4); 12 | 13 | JobHandle jobHandle = new CreateWireCapsuleJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | HemisphereResult = hemisphereBuffer, 17 | LineResult = lineBuffer, 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/WireCapsule2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal sealed unsafe class WireCapsule2d : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* semicircleBuffer = Gizmo.Reserve(InstanceCount * 2); 11 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 2); 12 | 13 | JobHandle jobHandle = new CreateWireCapsule2dJob() 14 | { 15 | GizmoDataPtr = JobDataPtr, 16 | WireSemicircleResult = semicircleBuffer, 17 | LineResult = lineBuffer, 18 | }.Schedule(InstanceCount, 16); 19 | 20 | return jobHandle; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/UnityInternalUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using UnityEngine; 5 | 6 | namespace UGizmo.Internal.Utility 7 | { 8 | public static class UnityInternalUtility 9 | { 10 | private static readonly MethodInfo setNativeDataMethod; 11 | 12 | static UnityInternalUtility() 13 | { 14 | setNativeDataMethod = typeof(GraphicsBuffer).GetRuntimeMethods().First(method => method.Name == "InternalSetNativeData"); 15 | } 16 | 17 | public static Action CreateInternalSetDataDelegate(GraphicsBuffer graphicsBuffer) 18 | { 19 | Type targetType = typeof(Action); 20 | return (Action)Delegate.CreateDelegate(targetType, graphicsBuffer, setNativeDataMethod); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/PreparableGizmo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace UGizmo.Internal 4 | { 5 | internal static class PreparableGizmo 6 | where TScheduler : PreparingJobScheduler, new() 7 | where TPrepareData : unmanaged 8 | { 9 | private static TScheduler scheduler; 10 | private static bool isInitialized; 11 | 12 | public static void Initialize(TScheduler gizmo) 13 | { 14 | scheduler = gizmo; 15 | isInitialized = true; 16 | } 17 | 18 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 19 | public static void AddData(in TPrepareData data, float duration) 20 | { 21 | if (!isInitialized) 22 | { 23 | return; 24 | } 25 | 26 | scheduler.Add(data, duration); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Arrow2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension 5 | { 6 | internal unsafe class Arrow2d : PreparingJobScheduler 7 | { 8 | public override JobHandle Schedule() 9 | { 10 | PrimitiveData* planeBuffer = Gizmo.Reserve(InstanceCount); 11 | PrimitiveData* triangleBuffer = Gizmo.Reserve(InstanceCount); 12 | LineData* lineBuffer = Gizmo.Reserve(InstanceCount * 7); 13 | 14 | JobHandle jobHandle = new CreateArrow2dJob() 15 | { 16 | GizmoDataPtr = JobDataPtr, 17 | PlaneResult = planeBuffer, 18 | TriangleResult = triangleBuffer, 19 | LineResult = lineBuffer 20 | }.Schedule(InstanceCount, 16); 21 | 22 | return jobHandle; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.harumaro.ugizmo", 3 | "version": "1.0.1", 4 | "unity": "2021.3", 5 | "displayName": "UGizmo", 6 | "description": "Highly efficient gizmo drawer for Unity.", 7 | "keywords": [ 8 | "gizmo", 9 | "debug" 10 | ], 11 | "dependencies": { 12 | "com.unity.burst": "1.8.12", 13 | "com.unity.collections": "1.2.4", 14 | "com.unity.mathematics": "1.2.6" 15 | }, 16 | "author": { 17 | "name": "Harumaro" 18 | }, 19 | "samples": [ 20 | { 21 | "displayName": "UGizmo Sample for URP", 22 | "description": "Contains gizmo samples", 23 | "path": "Samples~/UGizmoSamples_URP" 24 | }, 25 | { 26 | "displayName": "UGizmo Sample for HDRP", 27 | "description": "Contains gizmo samples", 28 | "path": "Samples~/UGizmoSamples_HDRP" 29 | }, 30 | { 31 | "displayName": "UGizmo Benchmark", 32 | "description": "Contains Benchmark", 33 | "path": "Samples~/Benchmark" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/ConeGizmo.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension.Gizmo 5 | { 6 | public unsafe class ConeGizmo : IGizmoJobScheduler 7 | { 8 | private readonly SharedGizmoBuffer sharedGizmoBuffer; 9 | 10 | public ConeGizmo() 11 | { 12 | sharedGizmoBuffer = SharedGizmoBuffer.GetSharedBuffer(); 13 | } 14 | 15 | public JobHandle Schedule() 16 | { 17 | var createJob = new CreateConeJob() 18 | { 19 | GizmoDataPtr = sharedGizmoBuffer.JobBuffer.Ptr, 20 | Result = sharedGizmoBuffer.DrawBuffer.Ptr 21 | }; 22 | 23 | return createJob.Schedule(sharedGizmoBuffer.JobBuffer.Length, 16); 24 | } 25 | 26 | public void Clear() 27 | { 28 | sharedGizmoBuffer.Clear(); 29 | } 30 | 31 | public void Dispose() 32 | { 33 | sharedGizmoBuffer?.Dispose(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/WireLineGizmo.cs: -------------------------------------------------------------------------------- 1 | using UGizmo.Internal.Extension.Jobs; 2 | using Unity.Jobs; 3 | 4 | namespace UGizmo.Internal.Extension.Gizmo 5 | { 6 | public unsafe class WireLineGizmo : IGizmoJobScheduler 7 | { 8 | private readonly SharedGizmoBuffer sharedGizmoBuffer; 9 | 10 | public WireLineGizmo() 11 | { 12 | sharedGizmoBuffer = SharedGizmoBuffer.GetSharedBuffer(); 13 | } 14 | 15 | public JobHandle Schedule() 16 | { 17 | var createJob = new CreateWireLineJob() 18 | { 19 | GizmoDataPtr = sharedGizmoBuffer.JobBuffer.Ptr, 20 | Result = sharedGizmoBuffer.DrawBuffer.Ptr 21 | }; 22 | 23 | return createJob.Schedule(sharedGizmoBuffer.JobBuffer.Length, 16); 24 | } 25 | 26 | public void Clear() 27 | { 28 | sharedGizmoBuffer.Clear(); 29 | } 30 | 31 | public void Dispose() 32 | { 33 | sharedGizmoBuffer?.Dispose(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Harumaron 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 1 16 | m_AdvancedSettingsExpanded: 1 17 | m_ScopedRegistriesSettingsExpanded: 1 18 | m_SeeAllPackageVersions: 0 19 | m_DismissPreviewPackagesInUse: 0 20 | oneTimeWarningShown: 1 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_ConfigSource: 0 29 | m_UserSelectedRegistryName: 30 | m_UserAddingNewScopedRegistry: 0 31 | m_RegistryInfoDraft: 32 | m_Modified: 0 33 | m_ErrorMessage: 34 | m_UserModificationsInstanceId: -830 35 | m_OriginalInstanceId: -832 36 | m_LoadAssets: 0 37 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Gizmo/PrimitiveGizmo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UGizmo.Internal.Extension.Jobs; 3 | using Unity.Jobs; 4 | 5 | namespace UGizmo.Internal.Extension.Gizmo 6 | { 7 | public interface IGizmoJobScheduler : IDisposable 8 | { 9 | JobHandle Schedule(); 10 | void Clear(); 11 | } 12 | 13 | public unsafe class PrimitiveGizmo : IGizmoJobScheduler 14 | { 15 | private readonly SharedGizmoBuffer sharedGizmoBuffer; 16 | 17 | public PrimitiveGizmo() 18 | { 19 | sharedGizmoBuffer = SharedGizmoBuffer.GetSharedBuffer(); 20 | } 21 | 22 | public JobHandle Schedule() 23 | { 24 | var createJob = new CreatePrimitiveJob() 25 | { 26 | GizmoDataPtr = sharedGizmoBuffer.JobBuffer.Ptr, 27 | Result = sharedGizmoBuffer.DrawBuffer.Ptr 28 | }; 29 | 30 | return createJob.Schedule(sharedGizmoBuffer.JobBuffer.Length, 16); 31 | } 32 | 33 | public void Clear() 34 | { 35 | sharedGizmoBuffer.Clear(); 36 | } 37 | 38 | public void Dispose() 39 | { 40 | sharedGizmoBuffer?.Dispose(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/UnmanagedUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections; 3 | using Unity.Collections.LowLevel.Unsafe; 4 | 5 | namespace UGizmo.Internal.Utility 6 | { 7 | internal static unsafe class UnmanagedUtility 8 | { 9 | internal static T* Malloc(int count, Allocator allocator) where T : unmanaged 10 | { 11 | long size = (long)UnsafeUtility.SizeOf() * (long)count; 12 | 13 | return (T*)UnsafeUtility.Malloc(size, UnsafeUtility.AlignOf(), allocator); 14 | } 15 | 16 | internal static void Free(ref T* ptr, Allocator allocator) where T : unmanaged 17 | { 18 | if (ptr == (T*)0) 19 | { 20 | throw new ObjectDisposedException("The Pointer has been disposed, it is not allowed to access it"); 21 | } 22 | 23 | UnsafeUtility.Free(ptr, allocator); 24 | ptr = (T*)0; 25 | } 26 | 27 | internal static void ResizePointer(ref T* pointer, int from, int to, Allocator allocator) where T : unmanaged 28 | { 29 | T* newPointer = Malloc(to, allocator); 30 | UnsafeUtility.MemCpy(newPointer, pointer, UnsafeUtility.SizeOf() * from); 31 | Free(ref pointer, allocator); 32 | 33 | pointer = newPointer; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/AssetUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using UnityEngine; 4 | 5 | namespace UGizmo.Internal.Utility 6 | { 7 | internal static class AssetUtility 8 | { 9 | /// 10 | /// Loads meshes and materials from a given path. 11 | /// 12 | /// 13 | /// 14 | /// 15 | /// 16 | internal static (Mesh mesh, Material material) CreateMeshAndMaterial(string meshPath, string materialPath) 17 | { 18 | const string rootPath = "UGizmo"; 19 | Mesh mesh = Resources.Load(Path.Combine(rootPath, "Meshes", meshPath)); 20 | Material material = Resources.Load(Path.Combine(rootPath, "Materials", materialPath)); 21 | 22 | if (mesh == null) 23 | { 24 | Debug.LogError("Mesh is null!"); 25 | throw new ArgumentNullException(nameof(mesh)); 26 | } 27 | 28 | if (material == null) 29 | { 30 | Debug.LogError("Material is null!"); 31 | throw new ArgumentNullException(nameof(material)); 32 | } 33 | 34 | return (mesh, material); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPhysics.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.URP 5 | { 6 | public class DrawPhysics : MonoBehaviour 7 | { 8 | [SerializeField] private Transform ray; 9 | [SerializeField] private Transform sphere; 10 | [SerializeField] private Transform box; 11 | [SerializeField] private Transform capsule; 12 | 13 | private void OnDrawGizmos() 14 | { 15 | UGizmos.Raycast(ray.position, Vector3.forward, 10f); 16 | UGizmos.SphereCast(sphere.position, 0.5f, Vector3.forward, 10f); 17 | UGizmos.BoxCast(box.position, box.localScale * 0.5f, Vector3.forward, box.rotation, 10f); 18 | UGizmos.CapsuleCast(capsule.position + capsule.up * 0.5f, capsule.position - capsule.up * 0.5f, 0.5f, Vector3.forward, 10f); 19 | } 20 | 21 | #if !UNITY_EDITOR 22 | private void Update() 23 | { 24 | UGizmos.Raycast(ray.position, Vector3.forward, 10f); 25 | UGizmos.SphereCast(sphere.position, 0.5f, Vector3.forward, 10f); 26 | UGizmos.BoxCast(box.position, box.localScale * 0.5f, Vector3.forward, box.rotation, 10f); 27 | UGizmos.CapsuleCast(capsule.position + capsule.up * 0.5f, capsule.position - capsule.up * 0.5f, 0.5f, Vector3.forward, 10f); 28 | } 29 | #endif 30 | } 31 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPhysics.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.HDRP 5 | { 6 | public class DrawPhysics : MonoBehaviour 7 | { 8 | [SerializeField] private Transform ray; 9 | [SerializeField] private Transform sphere; 10 | [SerializeField] private Transform box; 11 | [SerializeField] private Transform capsule; 12 | 13 | private void OnDrawGizmos() 14 | { 15 | UGizmos.Raycast(ray.position, Vector3.forward, 10f); 16 | UGizmos.SphereCast(sphere.position, 0.5f, Vector3.forward, 10f); 17 | UGizmos.BoxCast(box.position, box.localScale * 0.5f, Vector3.forward, box.rotation, 10f); 18 | UGizmos.CapsuleCast(capsule.position + capsule.up * 0.5f, capsule.position - capsule.up * 0.5f, 0.5f, Vector3.forward, 10f); 19 | } 20 | 21 | 22 | #if !UNITY_EDITOR 23 | private void Update() 24 | { 25 | UGizmos.Raycast(ray.position, Vector3.forward, 10f); 26 | UGizmos.SphereCast(sphere.position, 0.5f, Vector3.forward, 10f); 27 | UGizmos.BoxCast(box.position, box.localScale * 0.5f, Vector3.forward, box.rotation, 10f); 28 | UGizmos.CapsuleCast(capsule.position + capsule.up * 0.5f, capsule.position - capsule.up * 0.5f, 0.5f, Vector3.forward, 10f); 29 | } 30 | #endif 31 | } 32 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UniversalRenderPipelineGlobalSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3} 13 | m_Name: UniversalRenderPipelineGlobalSettings 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 3 16 | m_RenderingLayerNames: 17 | - Light Layer default 18 | - Light Layer 1 19 | - Light Layer 2 20 | - Light Layer 3 21 | - Light Layer 4 22 | - Light Layer 5 23 | - Light Layer 6 24 | - Light Layer 7 25 | m_ValidRenderingLayers: 255 26 | lightLayerName0: Light Layer default 27 | lightLayerName1: Light Layer 1 28 | lightLayerName2: Light Layer 2 29 | lightLayerName3: Light Layer 3 30 | lightLayerName4: Light Layer 4 31 | lightLayerName5: Light Layer 5 32 | lightLayerName6: Light Layer 6 33 | lightLayerName7: Light Layer 7 34 | m_StripDebugVariants: 1 35 | m_StripUnusedPostProcessingVariants: 1 36 | m_StripUnusedVariants: 0 37 | m_StripUnusedLODCrossFadeVariants: 1 38 | m_StripScreenCoordOverrideVariants: 1 39 | supportRuntimeDebugDisplay: 0 40 | m_ShaderVariantLogLevel: 0 41 | m_ExportShaderVariants: 1 42 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPhysics2d.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UGizmo.Samples.HDRP 4 | { 5 | public class DrawPhysics2d : MonoBehaviour 6 | { 7 | [SerializeField] private Transform ray; 8 | [SerializeField] private Transform circle2d; 9 | [SerializeField] private Transform box2d; 10 | [SerializeField] private Transform capsule2d; 11 | 12 | private void OnDrawGizmos() 13 | { 14 | UGizmos.Raycast2D(ray.position, ray.right, 5f); 15 | UGizmos.CircleCast2D(circle2d.position, 0.5f, circle2d.right, 5f); 16 | UGizmos.BoxCast2D(box2d.position, box2d.localScale, box2d.localEulerAngles.z * Mathf.Deg2Rad, Vector2.down, 5f); 17 | UGizmos.CapsuleCast2D(capsule2d.position, capsule2d.localScale, capsule2d.localEulerAngles.z * Mathf.Deg2Rad, CapsuleDirection2D.Vertical, 18 | Vector2.down, 5f); 19 | } 20 | 21 | #if !UNITY_EDITOR 22 | private void Update() 23 | { 24 | UGizmos.Raycast2D(ray.position, ray.right, 5f); 25 | UGizmos.CircleCast2D(circle2d.position, 0.5f, circle2d.right, 5f); 26 | UGizmos.BoxCast2D(box2d.position, box2d.localScale, box2d.localEulerAngles.z * Mathf.Deg2Rad, Vector2.down, 5f); 27 | UGizmos.CapsuleCast2D(capsule2d.position, capsule2d.localScale, capsule2d.localEulerAngles.z * Mathf.Deg2Rad, CapsuleDirection2D.Vertical, 28 | Vector2.down, 5f); 29 | } 30 | #endif 31 | } 32 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPhysics2d.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UGizmo.Samples.URP 4 | { 5 | public class DrawPhysics2d : MonoBehaviour 6 | { 7 | [SerializeField] private Transform ray; 8 | [SerializeField] private Transform circle2d; 9 | [SerializeField] private Transform box2d; 10 | [SerializeField] private Transform capsule2d; 11 | 12 | private void OnDrawGizmos() 13 | { 14 | UGizmos.Raycast2D(ray.position, ray.right, 5f); 15 | UGizmos.CircleCast2D(circle2d.position, 0.5f, circle2d.right, 5f); 16 | UGizmos.BoxCast2D(box2d.position, box2d.localScale, box2d.localEulerAngles.z * Mathf.Deg2Rad, Vector2.down, 5f); 17 | UGizmos.CapsuleCast2D(capsule2d.position, capsule2d.localScale, capsule2d.localEulerAngles.z * Mathf.Deg2Rad, CapsuleDirection2D.Vertical, 18 | Vector2.down, 5f); 19 | } 20 | 21 | #if !UNITY_EDITOR 22 | private void Update() 23 | { 24 | UGizmos.Raycast2D(ray.position, ray.right, 5f); 25 | UGizmos.CircleCast2D(circle2d.position, 0.5f, circle2d.right, 5f); 26 | UGizmos.BoxCast2D(box2d.position, box2d.localScale, box2d.localEulerAngles.z * Mathf.Deg2Rad, Vector2.down, 5f); 27 | UGizmos.CapsuleCast2D(capsule2d.position, capsule2d.localScale, capsule2d.localEulerAngles.z * Mathf.Deg2Rad, CapsuleDirection2D.Vertical, 28 | Vector2.down, 5f); 29 | } 30 | #endif 31 | } 32 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreatePrimitiveJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreatePrimitiveJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public PrimitiveData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public DrawData* Result; 21 | 22 | [BurstCompile] 23 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 24 | { 25 | PrimitiveData* drawData = GizmoDataPtr + index; 26 | 27 | float4x4 matrix = float4x4.TRS(drawData->Position, drawData->Rotation, drawData->Scale); 28 | 29 | Result[index] = new DrawData(matrix, drawData->Color); 30 | } 31 | } 32 | 33 | public readonly struct PrimitiveData 34 | { 35 | public readonly float3 Position; 36 | public readonly quaternion Rotation; 37 | public readonly float3 Scale; 38 | public readonly Color Color; 39 | 40 | public PrimitiveData(float3 position, quaternion rotation, float3 scale, Color color) 41 | { 42 | Position = position; 43 | Rotation = rotation; 44 | Scale = scale; 45 | Color = color; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateConeJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateConeJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public ConeData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public DrawData* Result; 20 | 21 | [BurstCompile] 22 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 23 | { 24 | ConeData* coneData = GizmoDataPtr + index; 25 | 26 | float3 position = coneData->Origin + coneData->Direction * coneData->Distance * 0.5f; 27 | float cos = (1 + math.clamp(-coneData->Direction.y, -1f, 1f)) * 0.5f; 28 | float3 axis = math.normalizesafe(new float3(-coneData->Direction.z, 0f, coneData->Direction.x), new float3(0f, 0f, 1f)); 29 | 30 | float4 value = new float4(axis * math.sqrt(1f - cos), math.sqrt(cos)); 31 | quaternion rotation = new quaternion(value); 32 | 33 | float width = math.tan(coneData->Angle); 34 | float3 scale = new float3(width, coneData->Distance, width); 35 | 36 | float4x4 matrix = float4x4.TRS(position, rotation, scale); 37 | Result[index] = new DrawData(matrix, coneData->Color); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Gizmo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace UGizmo.Internal 4 | { 5 | /// 6 | /// Class for static access to GizmoDrawer. 7 | /// 8 | /// 9 | /// 10 | internal static unsafe class Gizmo 11 | where TDrawer : GizmoDrawer 12 | where TJobData : unmanaged 13 | { 14 | private static TDrawer gizmoDrawer; 15 | private static bool isInitialized; 16 | 17 | public static void Initialize(TDrawer drawer) 18 | { 19 | isInitialized = true; 20 | gizmoDrawer = drawer; 21 | } 22 | 23 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 24 | public static void AddData(in TJobData data, float duration) 25 | { 26 | if (!isInitialized) 27 | { 28 | return; 29 | } 30 | 31 | gizmoDrawer.Add(data, duration); 32 | } 33 | 34 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 35 | public static void AddDataRange(TJobData* data, int length, float duration) 36 | { 37 | if (!isInitialized) 38 | { 39 | return; 40 | } 41 | 42 | gizmoDrawer.AddRange(data, length, duration); 43 | } 44 | 45 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 46 | public static TJobData* Reserve(int count) 47 | { 48 | return gizmoDrawer.Reserve(count); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 2 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerCacheSize: 10 14 | m_SpritePackerPaddingPower: 1 15 | m_Bc7TextureCompressor: 0 16 | m_EtcTextureCompressorBehavior: 1 17 | m_EtcTextureFastCompressor: 1 18 | m_EtcTextureNormalCompressor: 2 19 | m_EtcTextureBestCompressor: 4 20 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 21 | m_ProjectGenerationRootNamespace: 22 | m_EnableTextureStreamingInEditMode: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | m_EnableEditorAsyncCPUTextureLoading: 0 25 | m_AsyncShaderCompilation: 1 26 | m_PrefabModeAllowAutoSave: 1 27 | m_EnterPlayModeOptionsEnabled: 1 28 | m_EnterPlayModeOptions: 3 29 | m_GameObjectNamingDigits: 1 30 | m_GameObjectNamingScheme: 0 31 | m_AssetNamingUsesSpace: 1 32 | m_InspectorUseIMGUIDefaultInspector: 0 33 | m_UseLegacyProbeSampleCount: 0 34 | m_SerializeInlineMappingsOnOneLine: 0 35 | m_DisableCookiesInLightmapper: 1 36 | m_AssetPipelineMode: 1 37 | m_RefreshImportMode: 0 38 | m_CacheServerMode: 0 39 | m_CacheServerEndpoint: 40 | m_CacheServerNamespacePrefix: default 41 | m_CacheServerEnableDownload: 1 42 | m_CacheServerEnableUpload: 1 43 | m_CacheServerEnableAuth: 0 44 | m_CacheServerEnableTls: 0 45 | m_CacheServerValidationMode: 2 46 | m_CacheServerDownloadBatchSize: 128 47 | m_EnableEnlightenBakedGI: 0 48 | -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /src/UGizmo/.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # Jetbrain Rider Cache 14 | .idea/ 15 | Assets/Plugins/Editor/JetBrains* 16 | 17 | # MemoryCaptures can get excessive in size. 18 | # They also could contain extremely sensitive data 19 | /[Mm]emoryCaptures/ 20 | 21 | # Recordings can get excessive in size 22 | /[Rr]ecordings/ 23 | 24 | # Uncomment this line if you wish to ignore the asset store tools plugin 25 | # /[Aa]ssets/AssetStoreTools* 26 | 27 | # Autogenerated Jetbrains Rider plugin 28 | /[Aa]ssets/Plugins/Editor/JetBrains* 29 | 30 | # Visual Studio cache directory 31 | .vs/ 32 | 33 | # Gradle cache directory 34 | .gradle/ 35 | 36 | # Autogenerated VS/MD/Consulo solution and project files 37 | ExportedObj/ 38 | .consulo/ 39 | *.csproj 40 | *.unityproj 41 | *.sln 42 | *.suo 43 | *.tmp 44 | *.user 45 | *.userprefs 46 | *.pidb 47 | *.booproj 48 | *.svd 49 | *.pdb 50 | *.mdb 51 | *.opendb 52 | *.VC.db 53 | 54 | # Unity3D generated meta files 55 | *.pidb.meta 56 | *.pdb.meta 57 | *.mdb.meta 58 | 59 | # Unity3D generated file on crash reports 60 | sysinfo.txt 61 | 62 | # Builds 63 | *.apk 64 | *.aab 65 | *.unitypackage 66 | *.app 67 | 68 | # Crashlytics generated file 69 | crashlytics-build.properties 70 | 71 | # Packed Addressables 72 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 73 | 74 | # Temporary auto-generated Android Assets 75 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 76 | /[Aa]ssets/[Ss]treamingAssets/aa/* 77 | 78 | /Assets/DebugDrawingExtension/ 79 | /Assets/MiniTools/ 80 | /Assets/DebugDrawingExtension.meta 81 | /Assets/MiniTools.meta -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoWire.shader: -------------------------------------------------------------------------------- 1 | Shader "UGizmo/Wire" 2 | { 3 | SubShader 4 | { 5 | Tags 6 | { 7 | "RenderType" = "Transparent" "Queue" = "Transparent" 8 | } 9 | 10 | Pass 11 | { 12 | Cull Back 13 | ZTest Always 14 | ZWrite Off 15 | Blend SrcAlpha OneMinusSrcAlpha 16 | Offset -1, -1 17 | 18 | Lighting Off 19 | Fog 20 | { 21 | Mode Off 22 | } 23 | 24 | CGPROGRAM 25 | #pragma vertex vert 26 | #pragma fragment frag 27 | #pragma multi_compile_instancing 28 | #include "UnityCG.cginc" 29 | 30 | struct DrawData 31 | { 32 | float4x4 mat; 33 | float4 color; 34 | }; 35 | 36 | StructuredBuffer _DrawBuffer; 37 | 38 | struct Attributes 39 | { 40 | float4 positionOS : POSITION; 41 | }; 42 | 43 | struct Varyings 44 | { 45 | float4 positionHCS : SV_POSITION; 46 | float4 color : COLOR; 47 | }; 48 | 49 | Varyings vert(Attributes IN, uint instanceID : SV_InstanceID) 50 | { 51 | Varyings o; 52 | DrawData drawData = _DrawBuffer[instanceID]; 53 | 54 | float4 pos = mul(drawData.mat, IN.positionOS); 55 | o.positionHCS = UnityObjectToClipPos(pos.xyz); 56 | o.color = drawData.color; 57 | return o; 58 | } 59 | 60 | half4 frag(Varyings v) : SV_Target 61 | { 62 | return v.color; 63 | } 64 | ENDCG 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireLineJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateWireLineJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public LineData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public DrawData* Result; 21 | 22 | [BurstCompile] 23 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 24 | { 25 | LineData* data = GizmoDataPtr + index; 26 | 27 | float3 diff = data->End - data->Start; 28 | float3 position = data->Start + diff * 0.5f; 29 | float length = math.length(diff); 30 | 31 | float cos = (1 + math.clamp(diff.z / length, -1f, 1f)) * 0.5f; 32 | float3 axis = math.normalizesafe(new float3(-diff.y, diff.x, 0f), new float3(0f, 0f, 1f)); 33 | quaternion rotation = new quaternion(new float4(axis * math.sqrt(1 - cos), math.sqrt(cos))); 34 | float4x4 matrix = float4x4.TRS(position, rotation, new float3(0f, 0f, length)); 35 | 36 | Result[index] = new DrawData(matrix, data->Color); 37 | } 38 | } 39 | 40 | public struct LineData 41 | { 42 | public readonly float3 Start; 43 | public readonly float3 End; 44 | public readonly Color Color; 45 | 46 | public LineData(float3 start, float3 end, Color color) 47 | { 48 | Start = start; 49 | End = end; 50 | Color = color; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 6 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_GizmoOptions: 10 48 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 49 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/NoResizableList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Runtime.CompilerServices; 6 | 7 | namespace UGizmo.Internal 8 | { 9 | internal sealed class NoResizableList : IEnumerable 10 | { 11 | private T[] items; 12 | private int count; 13 | 14 | public NoResizableList(int capacity = 64) 15 | { 16 | items = new T[capacity]; 17 | } 18 | 19 | public int Count 20 | { 21 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 22 | get => count; 23 | } 24 | 25 | public Span AsSpan() => items.AsSpan(0, count); 26 | 27 | public T this[int index] 28 | { 29 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 30 | get => items[index]; 31 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 32 | set => items[index] = value; 33 | } 34 | 35 | public void SetArray(T[] items) 36 | { 37 | this.items = items; 38 | } 39 | 40 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 41 | public void Add(T item) 42 | { 43 | if (items.Length == count) 44 | { 45 | throw new OutOfMemoryException(); 46 | } 47 | 48 | items[count++] = item; 49 | } 50 | 51 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 52 | public void Clear() 53 | { 54 | count = 0; 55 | } 56 | 57 | public IEnumerator GetEnumerator() 58 | { 59 | return items.AsEnumerable().GetEnumerator(); 60 | } 61 | 62 | IEnumerator IEnumerable.GetEnumerator() 63 | { 64 | return GetEnumerator(); 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoMeshFront.shader: -------------------------------------------------------------------------------- 1 | Shader "UGizmo/MeshFront" 2 | { 3 | SubShader 4 | { 5 | Tags 6 | { 7 | "RenderType" = "Transparent" "Queue" = "Transparent" 8 | } 9 | 10 | Pass 11 | { 12 | Cull Back 13 | ZTest Always 14 | ZWrite Off 15 | Blend SrcAlpha OneMinusSrcAlpha 16 | Offset -1, -1 17 | 18 | Lighting Off 19 | Fog 20 | { 21 | Mode Off 22 | } 23 | 24 | CGPROGRAM 25 | #pragma vertex vert 26 | #pragma fragment frag 27 | #pragma multi_compile_instancing 28 | #include "UnityCG.cginc" 29 | 30 | struct DrawData 31 | { 32 | float4x4 mat; 33 | float4 color; 34 | }; 35 | 36 | StructuredBuffer _DrawBuffer; 37 | 38 | struct Attributes 39 | { 40 | float4 positionOS : POSITION; 41 | float3 normal : NORMAL; 42 | }; 43 | 44 | struct Varyings 45 | { 46 | float4 positionHCS : SV_POSITION; 47 | float4 color : COLOR; 48 | }; 49 | 50 | Varyings vert(Attributes IN, uint instanceID : SV_InstanceID) 51 | { 52 | Varyings o; 53 | DrawData drawData = _DrawBuffer[instanceID]; 54 | 55 | float4 pos = mul(drawData.mat, IN.positionOS); 56 | o.positionHCS = UnityObjectToClipPos(pos.xyz); 57 | o.color = drawData.color; 58 | 59 | return o; 60 | } 61 | 62 | half4 frag(Varyings v) : SV_Target 63 | { 64 | return v.color; 65 | } 66 | ENDCG 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireTriangleJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateWireTriangleJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public PrimitiveData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public LineData* Result; 20 | 21 | private const int LineCount = 3; 22 | 23 | private static readonly float3[] vertices; 24 | 25 | static CreateWireTriangleJob() 26 | { 27 | vertices = new[] 28 | { 29 | new float3(0f, 1f / 1.73205080757f, 0f), 30 | new float3(-0.5f, -1f / (2f * 1.73205080757f), 0f), 31 | new float3(0.5f, -1f / (2f * 1.73205080757f), 0f), 32 | }; 33 | } 34 | 35 | [BurstCompile] 36 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 37 | { 38 | PrimitiveData* planeData = GizmoDataPtr + index; 39 | 40 | float3 position = planeData->Position; 41 | float3 p1 = math.rotate(planeData->Rotation, vertices[0] * planeData->Scale) + position; 42 | float3 p2 = math.rotate(planeData->Rotation, vertices[1] * planeData->Scale) + position; 43 | float3 p3 = math.rotate(planeData->Rotation, vertices[2] * planeData->Scale) + position; 44 | 45 | Result[LineCount * index + 0] = new LineData(p1, p2, planeData->Color); 46 | Result[LineCount * index + 1] = new LineData(p2, p3, planeData->Color); 47 | Result[LineCount * index + 2] = new LineData(p3, p1, planeData->Color); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Utility/GizmoUtility.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Mathematics; 3 | 4 | namespace UGizmo.Internal.Utility 5 | { 6 | [BurstCompile] 7 | public static class GizmoUtility 8 | { 9 | private static readonly float3 up = new float3(0f, 1f, 0f); 10 | private static readonly float3 forward = new float3(0f, 0f, 1f); 11 | private static readonly quaternion rotate90X = quaternion.Euler(math.PI / 2f, 0f, 0f); 12 | 13 | [BurstCompile] 14 | public static void FromUpToRotation(in float3 to, out quaternion rotation) 15 | { 16 | float length = math.length(to); 17 | rotation = quaternion.AxisAngle( 18 | angle: math.acos(math.clamp(to.y / length, -1f, 1f)), 19 | axis: math.normalizesafe(new float3(to.z, 0f, -to.x), forward) 20 | ); 21 | } 22 | 23 | [BurstCompile] 24 | public static void LengthAndNormalize(in float3 diff, out float length, out float3 normal) 25 | { 26 | float dot = math.dot(diff, diff); 27 | length = math.sqrt(dot); 28 | normal = math.select(forward, diff * (1.0f / length), dot > math.FLT_MIN_NORMAL); 29 | } 30 | 31 | [BurstCompile] 32 | public static void Rotate90X(in quaternion from, out quaternion to) 33 | { 34 | to = math.mul(from, rotate90X); 35 | } 36 | 37 | public static quaternion GetRotate90X() 38 | { 39 | return rotate90X; 40 | } 41 | 42 | [BurstCompile] 43 | public static void Rotate2D(in float angle, out quaternion to) 44 | { 45 | to = quaternion.AxisAngle(forward, angle); 46 | } 47 | 48 | [BurstCompile] 49 | public static void PlaneToQuad(in float angle, out quaternion to) 50 | { 51 | to = math.mul(rotate90X, quaternion.AxisAngle(up, angle)); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWirePlaneJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateWirePlaneJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public PrimitiveData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public LineData* Result; 20 | 21 | private const int LineCount = 4; 22 | 23 | private static readonly float3[] vertices = new[] 24 | { 25 | new float3(-0.5f, 0f, 0.5f), 26 | new float3(0.5f, 0f, 0.5f), 27 | new float3(-0.5f, 0f, -0.5f), 28 | new float3(0.5f, 0f, -0.5f), 29 | }; 30 | 31 | [BurstCompile] 32 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 33 | { 34 | PrimitiveData* planeData = GizmoDataPtr + index; 35 | 36 | float3 position = planeData->Position; 37 | float3 p1 = math.rotate(planeData->Rotation, vertices[0] * planeData->Scale) + position; 38 | float3 p2 = math.rotate(planeData->Rotation, vertices[1] * planeData->Scale) + position; 39 | float3 p3 = math.rotate(planeData->Rotation, vertices[2] * planeData->Scale) + position; 40 | float3 p4 = math.rotate(planeData->Rotation, vertices[3] * planeData->Scale) + position; 41 | 42 | Result[LineCount * index + 0] = new LineData(p1, p2, planeData->Color); 43 | Result[LineCount * index + 1] = new LineData(p2, p4, planeData->Color); 44 | Result[LineCount * index + 2] = new LineData(p4, p3, planeData->Color); 45 | Result[LineCount * index + 3] = new LineData(p3, p1, planeData->Color); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/UnityEditor.AddressableAssets.Diagnostics.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/Settings/URP-Performant-Renderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: URP-Performant-Renderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, 17 | type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | shaders: 23 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 24 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 25 | screenSpaceShadowPS: {fileID: 0} 26 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 27 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 28 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 29 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 30 | coreBlitPS: {fileID: 0} 31 | coreBlitColorAndDepthPS: {fileID: 0} 32 | cameraMotionVector: {fileID: 0} 33 | objectMotionVector: {fileID: 0} 34 | m_OpaqueLayerMask: 35 | serializedVersion: 2 36 | m_Bits: 4294967295 37 | m_TransparentLayerMask: 38 | serializedVersion: 2 39 | m_Bits: 4294967295 40 | m_DefaultStencilState: 41 | overrideStencilState: 0 42 | stencilReference: 0 43 | stencilCompareFunction: 8 44 | passOperation: 2 45 | failOperation: 0 46 | zFailOperation: 0 47 | m_ShadowTransparentReceive: 1 48 | m_RenderingMode: 0 49 | m_DepthPrimingMode: 0 50 | m_AccurateGbufferNormals: 0 51 | m_ClusteredRendering: 0 52 | m_TileSize: 32 53 | -------------------------------------------------------------------------------- /src/UGizmo/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.codewriter.triinspector": "https://github.com/codewriter-packages/Tri-Inspector.git", 4 | "com.unity.collab-proxy": "2.2.0", 5 | "com.unity.collections": "2.1.4", 6 | "com.unity.ide.rider": "3.0.27", 7 | "com.unity.ide.visualstudio": "2.0.22", 8 | "com.unity.ide.vscode": "1.2.5", 9 | "com.unity.render-pipelines.universal": "14.0.10", 10 | "com.unity.test-framework": "1.1.33", 11 | "com.unity.textmeshpro": "3.0.6", 12 | "com.unity.timeline": "1.7.6", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.visualscripting": "1.9.1", 15 | "com.unity.modules.ai": "1.0.0", 16 | "com.unity.modules.androidjni": "1.0.0", 17 | "com.unity.modules.animation": "1.0.0", 18 | "com.unity.modules.assetbundle": "1.0.0", 19 | "com.unity.modules.audio": "1.0.0", 20 | "com.unity.modules.cloth": "1.0.0", 21 | "com.unity.modules.director": "1.0.0", 22 | "com.unity.modules.imageconversion": "1.0.0", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0", 25 | "com.unity.modules.particlesystem": "1.0.0", 26 | "com.unity.modules.physics": "1.0.0", 27 | "com.unity.modules.physics2d": "1.0.0", 28 | "com.unity.modules.screencapture": "1.0.0", 29 | "com.unity.modules.terrain": "1.0.0", 30 | "com.unity.modules.terrainphysics": "1.0.0", 31 | "com.unity.modules.tilemap": "1.0.0", 32 | "com.unity.modules.ui": "1.0.0", 33 | "com.unity.modules.uielements": "1.0.0", 34 | "com.unity.modules.umbra": "1.0.0", 35 | "com.unity.modules.unityanalytics": "1.0.0", 36 | "com.unity.modules.unitywebrequest": "1.0.0", 37 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 38 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 39 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 40 | "com.unity.modules.unitywebrequestwww": "1.0.0", 41 | "com.unity.modules.vehicles": "1.0.0", 42 | "com.unity.modules.video": "1.0.0", 43 | "com.unity.modules.vr": "1.0.0", 44 | "com.unity.modules.wind": "1.0.0", 45 | "com.unity.modules.xr": "1.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/UnityEditor.Search.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/UIElements.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/PreparingJobScheduler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | 7 | namespace UGizmo.Internal 8 | { 9 | internal interface IPreparingJobScheduler : IDisposable 10 | { 11 | void Register(GizmoInstanceActivator activator); 12 | void EnqueueContinuousGizmo(); 13 | void ClearContinuousGizmo(); 14 | JobHandle Schedule(); 15 | void Clear(); 16 | } 17 | 18 | internal abstract unsafe class PreparingJobScheduler : IPreparingJobScheduler 19 | where TScheduler : PreparingJobScheduler, new() 20 | where TJobData : unmanaged 21 | { 22 | protected int InstanceCount => jobData.Length; 23 | 24 | private const int InitialCapacity = 4096; 25 | private UnsafeList jobData; 26 | private ContinuousGizmoBuffer continuousGizmoBuffer; 27 | 28 | protected TJobData* JobDataPtr => jobData.Ptr; 29 | 30 | protected PreparingJobScheduler() 31 | { 32 | jobData = new UnsafeList(InitialCapacity, Allocator.Persistent); 33 | continuousGizmoBuffer = new ContinuousGizmoBuffer(data => jobData.Add(data)); 34 | } 35 | 36 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 37 | public void Add(in TJobData data, float duration) 38 | { 39 | if (duration > 0f) 40 | { 41 | continuousGizmoBuffer.Add(data, duration); 42 | } 43 | else 44 | { 45 | jobData.Add(data); 46 | } 47 | } 48 | 49 | public void EnqueueContinuousGizmo() 50 | { 51 | continuousGizmoBuffer.EnqueueAllJobData(); 52 | } 53 | 54 | public void ClearContinuousGizmo() 55 | { 56 | continuousGizmoBuffer.Clear(); 57 | } 58 | 59 | public abstract JobHandle Schedule(); 60 | 61 | public void Register(GizmoInstanceActivator activator) 62 | { 63 | activator.RegisterScheduler((TScheduler)this); 64 | } 65 | 66 | public void Clear() 67 | { 68 | jobData.Clear(); 69 | } 70 | 71 | public void Dispose() 72 | { 73 | jobData.Dispose(); 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawArrows.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.HDRP 5 | { 6 | public class DrawArrows : MonoBehaviour 7 | { 8 | [SerializeField] private Transform arrowA; 9 | [SerializeField] private Transform arrowB; 10 | [SerializeField] private Transform arrow2dA; 11 | [SerializeField] private Transform arrow2dB; 12 | [SerializeField] private Transform facingArrow2dA; 13 | [SerializeField] private Transform facingArrow2dB; 14 | [SerializeField] private Transform wireArrowA; 15 | [SerializeField] private Transform wireArrowB; 16 | [SerializeField] private Transform facingWireArrowA; 17 | [SerializeField] private Transform facingWireArrowB; 18 | [SerializeField] private Transform distanceA; 19 | [SerializeField] private Transform distanceB; 20 | [SerializeField] private Transform measureA; 21 | [SerializeField] private Transform measureB; 22 | 23 | private void OnDrawGizmos() 24 | { 25 | Color color = new Color(0.12f, 0.09f, 1f); 26 | UGizmos.DrawArrow(arrowA.position, arrowB.position, color); 27 | UGizmos.DrawArrow2d(arrow2dA.position, arrow2dB.position, Vector3.forward, color); 28 | UGizmos.DrawFacingArrow2d(facingArrow2dA.position, facingArrow2dB.position, color); 29 | UGizmos.DrawWireArrow(wireArrowA.position, wireArrowB.position, Vector3.forward, color); 30 | UGizmos.DrawFacingWireArrow(facingWireArrowA.position, facingWireArrowB.position, color); 31 | UGizmos.DrawDistance(distanceA.position, distanceB.position, color); 32 | UGizmos.DrawMeasure(measureA.position, measureB.position, 1, color); 33 | } 34 | 35 | #if !UNITY_EDITOR 36 | private void Update() 37 | { 38 | Color color = new Color(0.12f, 0.09f, 1f); 39 | UGizmos.DrawArrow(arrowA.position, arrowB.position, color); 40 | UGizmos.DrawArrow2d(arrow2dA.position, arrow2dB.position, Vector3.forward, color); 41 | UGizmos.DrawFacingArrow2d(facingArrow2dA.position, facingArrow2dB.position, color); 42 | UGizmos.DrawWireArrow(wireArrowA.position, wireArrowB.position, Vector3.forward, color); 43 | UGizmos.DrawFacingWireArrow(facingWireArrowA.position, facingWireArrowB.position, color); 44 | UGizmos.DrawDistance(distanceA.position, distanceB.position, color); 45 | UGizmos.DrawMeasure(measureA.position, measureB.position, 1, color); 46 | } 47 | #endif 48 | } 49 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawArrows.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.URP 5 | { 6 | public class DrawArrows : MonoBehaviour 7 | { 8 | [SerializeField] private Transform arrowA; 9 | [SerializeField] private Transform arrowB; 10 | [SerializeField] private Transform arrow2dA; 11 | [SerializeField] private Transform arrow2dB; 12 | [SerializeField] private Transform facingArrow2dA; 13 | [SerializeField] private Transform facingArrow2dB; 14 | [SerializeField] private Transform wireArrowA; 15 | [SerializeField] private Transform wireArrowB; 16 | [SerializeField] private Transform facingWireArrowA; 17 | [SerializeField] private Transform facingWireArrowB; 18 | [SerializeField] private Transform distanceA; 19 | [SerializeField] private Transform distanceB; 20 | [SerializeField] private Transform measureA; 21 | [SerializeField] private Transform measureB; 22 | 23 | private void OnDrawGizmos() 24 | { 25 | Color color = new Color(0.12f, 0.09f, 1f); 26 | UGizmos.DrawArrow(arrowA.position, arrowB.position, color); 27 | UGizmos.DrawArrow2d(arrow2dA.position, arrow2dB.position, Vector3.forward, color); 28 | UGizmos.DrawFacingArrow2d(facingArrow2dA.position, facingArrow2dB.position, color); 29 | UGizmos.DrawWireArrow(wireArrowA.position, wireArrowB.position, Vector3.forward, color); 30 | UGizmos.DrawFacingWireArrow(facingWireArrowA.position, facingWireArrowB.position, color); 31 | UGizmos.DrawDistance(distanceA.position, distanceB.position, color); 32 | UGizmos.DrawMeasure(measureA.position, measureB.position, 1, color); 33 | } 34 | 35 | #if !UNITY_EDITOR 36 | private void Update() 37 | { 38 | Color color = new Color(0.12f, 0.09f, 1f); 39 | UGizmos.DrawArrow(arrowA.position, arrowB.position, color); 40 | UGizmos.DrawArrow2d(arrow2dA.position, arrow2dB.position, Vector3.forward, color); 41 | UGizmos.DrawFacingArrow2d(facingArrow2dA.position, facingArrow2dB.position, color); 42 | UGizmos.DrawWireArrow(wireArrowA.position, wireArrowB.position, Vector3.forward, color); 43 | UGizmos.DrawFacingWireArrow(facingWireArrowA.position, facingWireArrowB.position, color); 44 | UGizmos.DrawDistance(distanceA.position, distanceB.position, color); 45 | UGizmos.DrawMeasure(measureA.position, measureB.position, 1, color); 46 | } 47 | #endif 48 | } 49 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPrimitives2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.URP 5 | { 6 | public class DrawPrimitives2d : MonoBehaviour 7 | { 8 | [SerializeField] private Color color; 9 | [SerializeField] private Transform box2D; 10 | [SerializeField] private Transform wireBox2D; 11 | [SerializeField] private Transform circle2D; 12 | [SerializeField] private Transform wireCircle2D; 13 | [SerializeField] private Transform triangle2D; 14 | [SerializeField] private Transform wireTriangle2D; 15 | [SerializeField] private Transform capsule2D; 16 | [SerializeField] private Transform wireCapsule2D; 17 | 18 | private void OnDrawGizmos() 19 | { 20 | UGizmos.DrawBox2D(box2D.position, box2D.rotation, box2D.localScale, color); 21 | UGizmos.DrawWireBox2D(wireBox2D.position, wireBox2D.rotation, wireBox2D.localScale, color); 22 | 23 | UGizmos.DrawCircle2D(circle2D.position, circle2D.rotation, 0.5f, color); 24 | UGizmos.DrawWireCircle2D(wireCircle2D.position, wireCircle2D.rotation, 0.5f, color); 25 | 26 | UGizmos.DrawTriangle2D(triangle2D.position, triangle2D.localEulerAngles.z * Mathf.Deg2Rad, triangle2D.localScale, color); 27 | UGizmos.DrawWireTriangle2D(wireTriangle2D.position, wireTriangle2D.localEulerAngles.z * Mathf.Deg2Rad, wireTriangle2D.localScale, color); 28 | 29 | UGizmos.DrawCapsule2D(capsule2D.position, capsule2D.rotation, 2f, 0.5f, color); 30 | UGizmos.DrawWireCapsule2D(wireCapsule2D.position, wireCapsule2D.rotation, 2f, 0.5f, color); 31 | } 32 | 33 | #if !UNITY_EDITOR 34 | private void Update() 35 | { 36 | UGizmos.DrawBox2D(box2D.position, box2D.rotation, box2D.localScale, color); 37 | UGizmos.DrawWireBox2D(wireBox2D.position, wireBox2D.rotation, wireBox2D.localScale, color); 38 | 39 | UGizmos.DrawCircle2D(circle2D.position, circle2D.rotation, 0.5f, color); 40 | UGizmos.DrawWireCircle2D(wireCircle2D.position, wireCircle2D.rotation, 0.5f, color); 41 | 42 | UGizmos.DrawTriangle2D(triangle2D.position, triangle2D.localEulerAngles.z * Mathf.Deg2Rad, triangle2D.localScale, color); 43 | UGizmos.DrawWireTriangle2D(wireTriangle2D.position, wireTriangle2D.localEulerAngles.z * Mathf.Deg2Rad, wireTriangle2D.localScale, color); 44 | 45 | UGizmos.DrawCapsule2D(capsule2D.position, capsule2D.rotation, 2f, 0.5f, color); 46 | UGizmos.DrawWireCapsule2D(wireCapsule2D.position, wireCapsule2D.rotation, 2f, 0.5f, color); 47 | } 48 | #endif 49 | } 50 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPrimitives2d.cs: -------------------------------------------------------------------------------- 1 | using UGizmo; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.HDRP 5 | { 6 | public class DrawPrimitives2d : MonoBehaviour 7 | { 8 | [SerializeField] private Color color; 9 | [SerializeField] private Transform box2D; 10 | [SerializeField] private Transform wireBox2D; 11 | [SerializeField] private Transform circle2D; 12 | [SerializeField] private Transform wireCircle2D; 13 | [SerializeField] private Transform triangle2D; 14 | [SerializeField] private Transform wireTriangle2D; 15 | [SerializeField] private Transform capsule2D; 16 | [SerializeField] private Transform wireCapsule2D; 17 | 18 | 19 | private void OnDrawGizmos() 20 | { 21 | UGizmos.DrawBox2D(box2D.position, box2D.rotation, box2D.localScale, color); 22 | UGizmos.DrawWireBox2D(wireBox2D.position, wireBox2D.rotation, wireBox2D.localScale, color); 23 | 24 | UGizmos.DrawCircle2D(circle2D.position, circle2D.rotation, 0.5f, color); 25 | UGizmos.DrawWireCircle2D(wireCircle2D.position, wireCircle2D.rotation, 0.5f, color); 26 | 27 | UGizmos.DrawTriangle2D(triangle2D.position, triangle2D.localEulerAngles.z * Mathf.Deg2Rad, triangle2D.localScale, color); 28 | UGizmos.DrawWireTriangle2D(wireTriangle2D.position, wireTriangle2D.localEulerAngles.z * Mathf.Deg2Rad, wireTriangle2D.localScale, color); 29 | 30 | UGizmos.DrawCapsule2D(capsule2D.position, capsule2D.rotation, 2f, 0.5f, color); 31 | UGizmos.DrawWireCapsule2D(wireCapsule2D.position, wireCapsule2D.rotation, 2f, 0.5f, color); 32 | } 33 | 34 | #if !UNITY_EDITOR 35 | private void Update() 36 | { 37 | UGizmos.DrawBox2D(box2D.position, box2D.rotation, box2D.localScale, color); 38 | UGizmos.DrawWireBox2D(wireBox2D.position, wireBox2D.rotation, wireBox2D.localScale, color); 39 | 40 | UGizmos.DrawCircle2D(circle2D.position, circle2D.rotation, 0.5f, color); 41 | UGizmos.DrawWireCircle2D(wireCircle2D.position, wireCircle2D.rotation, 0.5f, color); 42 | 43 | UGizmos.DrawTriangle2D(triangle2D.position, triangle2D.localEulerAngles.z * Mathf.Deg2Rad, triangle2D.localScale, color); 44 | UGizmos.DrawWireTriangle2D(wireTriangle2D.position, wireTriangle2D.localEulerAngles.z * Mathf.Deg2Rad, wireTriangle2D.localScale, color); 45 | 46 | UGizmos.DrawCapsule2D(capsule2D.position, capsule2D.rotation, 2f, 0.5f, color); 47 | UGizmos.DrawWireCapsule2D(wireCapsule2D.position, wireCapsule2D.rotation, 2f, 0.5f, color); 48 | } 49 | #endif 50 | } 51 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateArrowJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateArrowJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public ArrowData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public PrimitiveData* CylinderResult; 21 | 22 | [NativeDisableUnsafePtrRestriction] 23 | [WriteOnly] 24 | public ConeData* ConeResult; 25 | 26 | [BurstCompile] 27 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 28 | { 29 | ArrowData* arrowData = GizmoDataPtr + index; 30 | 31 | float3 diff = arrowData->To - arrowData->From; 32 | float length = math.length(diff); 33 | float3 normal = diff * (1f / length); 34 | 35 | float threshold = length / (arrowData->HeadLength * 2f); 36 | float headLength = threshold <= 1f ? length * 0.5f : arrowData->HeadLength; 37 | float bodyLength = length - headLength; 38 | 39 | float3 bodyPosition = arrowData->From + normal * bodyLength * 0.5f; 40 | 41 | float cos = (1 + math.clamp(diff.y / length, -1f, 1f)) * 0.5f; 42 | float3 axis = math.normalizesafe(new float3(diff.z, 0f, -diff.x), new float3(0f, 0f, 1f)); 43 | 44 | quaternion rotation = new quaternion(new float4(axis * math.sqrt(1f - cos), math.sqrt(cos))); 45 | 46 | float width = arrowData->Width * math.min(1f, threshold); 47 | float3 bodyScale = new float3(width, bodyLength, width); 48 | 49 | CylinderResult[index] = new PrimitiveData(bodyPosition, rotation, bodyScale, arrowData->Color); 50 | ConeResult[index] = new ConeData(arrowData->To, -normal, headLength, math.atan2(width * 0.5f, headLength), arrowData->Color); 51 | } 52 | } 53 | 54 | public readonly struct ArrowData 55 | { 56 | public readonly float3 From; 57 | public readonly float3 To; 58 | public readonly float HeadLength; 59 | public readonly float Width; 60 | public readonly Color Color; 61 | 62 | public ArrowData(float3 from, float3 to, Color color, float headLength, float width) 63 | { 64 | From = from; 65 | To = to; 66 | Color = color; 67 | HeadLength = headLength; 68 | Width = width; 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCapsule2dJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateWireCapsule2dJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public Capsule2dData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public PrimitiveData* WireSemicircleResult; 20 | 21 | [NativeDisableUnsafePtrRestriction] 22 | [WriteOnly] 23 | public LineData* LineResult; 24 | 25 | private static readonly float3 up = new float3(0f, 1f, 0f); 26 | private static readonly float3 right = new float3(1f, 0f, 0f); 27 | private static readonly quaternion correctionValue; 28 | 29 | private const int LineCount = 2; 30 | 31 | static CreateWireCapsule2dJob() 32 | { 33 | correctionValue = quaternion.AxisAngle(right, math.PI); 34 | } 35 | 36 | [BurstCompile] 37 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 38 | { 39 | Capsule2dData* capsuleData = GizmoDataPtr + index; 40 | 41 | float radius = capsuleData->Radius; 42 | float height = math.max(radius * 2f, capsuleData->Height); 43 | 44 | quaternion bottomRotation = math.mul(capsuleData->Rotation, correctionValue); 45 | 46 | float3 headNormal = math.rotate(capsuleData->Rotation, up); 47 | float3 rightNormal = math.rotate(capsuleData->Rotation, right); 48 | float3 offset = headNormal * (height * 0.5f - radius); 49 | 50 | float3 p1 = capsuleData->Center + offset + rightNormal * radius; 51 | float3 p2 = capsuleData->Center - offset + rightNormal * radius; 52 | float3 p3 = capsuleData->Center + offset - rightNormal * radius; 53 | float3 p4 = capsuleData->Center - offset - rightNormal * radius; 54 | 55 | LineResult[index * LineCount + 0] = new LineData(p1, p2, capsuleData->Color); 56 | LineResult[index * LineCount + 1] = new LineData(p3, p4, capsuleData->Color); 57 | 58 | float3 pos1 = capsuleData->Center + offset; 59 | float3 pos2 = capsuleData->Center - offset; 60 | 61 | WireSemicircleResult[index * 2 + 0] = new PrimitiveData(pos1, capsuleData->Rotation, new float3(radius), capsuleData->Color); 62 | WireSemicircleResult[index * 2 + 1] = new PrimitiveData(pos2, bottomRotation, new float3(radius), capsuleData->Color); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /src/UGizmo/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_DepthNormals: 17 | m_Mode: 1 18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 19 | m_MotionVectors: 20 | m_Mode: 1 21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 22 | m_LightHalo: 23 | m_Mode: 1 24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LensFlare: 26 | m_Mode: 1 27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 28 | m_VideoShadersIncludeMode: 2 29 | m_AlwaysIncludedShaders: 30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 37 | m_PreloadedShaders: [] 38 | m_PreloadShadersBatchTimeLimit: -1 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 11400000, guid: 7b7fd9122c28c4d15b667c7040e3b3fd, 42 | type: 2} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_BrgStripping: 2 52 | m_LightmapKeepPlain: 1 53 | m_LightmapKeepDirCombined: 1 54 | m_LightmapKeepDynamicPlain: 1 55 | m_LightmapKeepDynamicDirCombined: 1 56 | m_LightmapKeepShadowMask: 1 57 | m_LightmapKeepSubtractive: 1 58 | m_FogKeepLinear: 1 59 | m_FogKeepExp: 1 60 | m_FogKeepExp2: 1 61 | m_AlbedoSwatchInfos: [] 62 | m_LightsUseLinearIntensity: 1 63 | m_LightsUseColorTemperature: 1 64 | m_DefaultRenderingLayerMask: 1 65 | m_LogWhenShaderIsCompiled: 0 66 | m_SRPDefaultSettings: 67 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, 68 | type: 2} 69 | m_LightProbeOutsideHullStrategy: 0 70 | m_CameraRelativeLightCulling: 0 71 | m_CameraRelativeShadowCulling: 0 72 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCylinderJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateWireCylinderJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public CapsuleData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public PrimitiveData* WireCircleResult; 20 | 21 | [NativeDisableUnsafePtrRestriction] 22 | [WriteOnly] 23 | public LineData* LineResult; 24 | 25 | private static readonly float3 front = new float3(0f, 0f, 1f); 26 | private static readonly float3 right = new float3(1f, 0f, 0f); 27 | private const int LineCount = 4; 28 | 29 | [BurstCompile] 30 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 31 | { 32 | CapsuleData* capsuleData = GizmoDataPtr + index; 33 | 34 | float radius = capsuleData->Radius; 35 | float height = math.max(radius * 2f, capsuleData->Height); 36 | 37 | float cos = (1 + math.clamp(capsuleData->UpAxis.y, -1f, 1f)) * 0.5f; 38 | float3 axis = math.normalizesafe(new float3(capsuleData->UpAxis.z, 0f, -capsuleData->UpAxis.x), new float3(0f, 0f, 1f)); 39 | 40 | float4 value = new float4(axis * math.sqrt(1f - cos), math.sqrt(cos)); 41 | quaternion topRotation = new quaternion(value); 42 | 43 | float3 sphereOffset = capsuleData->UpAxis * (height - radius); 44 | float3 pos1 = capsuleData->Center + sphereOffset; 45 | float3 pos2 = capsuleData->Center - sphereOffset; 46 | 47 | WireCircleResult[index * 2 + 0] = new PrimitiveData(pos1, topRotation, new float3(radius), capsuleData->Color); 48 | WireCircleResult[index * 2 + 1] = new PrimitiveData(pos2, topRotation, new float3(radius), capsuleData->Color); 49 | 50 | float3 rotateFront = math.rotate(topRotation, front * radius); 51 | float3 rotateRight = math.rotate(topRotation, right * radius); 52 | 53 | float3 p1 = rotateFront + pos1; 54 | float3 p2 = rotateFront + pos2; 55 | LineResult[LineCount * index + 0] = new LineData(p1, p2, capsuleData->Color); 56 | 57 | float3 p3 = -rotateFront + pos1; 58 | float3 p4 = -rotateFront + pos2; 59 | LineResult[LineCount * index + 1] = new LineData(p3, p4, capsuleData->Color); 60 | 61 | float3 p5 = rotateRight + pos1; 62 | float3 p6 = rotateRight + pos2; 63 | LineResult[LineCount * index + 2] = new LineData(p5, p6, capsuleData->Color); 64 | 65 | float3 p7 = -rotateRight + pos1; 66 | float3 p8 = -rotateRight + pos2; 67 | LineResult[LineCount * index + 3] = new LineData(p7, p8, capsuleData->Color); 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateCapsule2dJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateCapsule2dJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public Capsule2dData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public PrimitiveData* SemicircleResult; 21 | 22 | [NativeDisableUnsafePtrRestriction] 23 | [WriteOnly] 24 | public PrimitiveData* PlaneResult; 25 | 26 | private static readonly quaternion correctionValue; 27 | private static readonly quaternion quadRotation; 28 | 29 | static CreateCapsule2dJob() 30 | { 31 | correctionValue = quaternion.AxisAngle(new float3(1f, 0f, 0f), math.PI); 32 | quadRotation = quaternion.Euler(math.PI / 2f, 0f, 0f); 33 | } 34 | 35 | [BurstCompile] 36 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 37 | { 38 | Capsule2dData* capsuleData = GizmoDataPtr + index; 39 | 40 | float radius = capsuleData->Radius; 41 | float height = math.max(radius * 2f, capsuleData->Height); 42 | 43 | quaternion bottomRotation = math.mul(capsuleData->Rotation, correctionValue); 44 | quaternion planeRotation = math.mul(capsuleData->Rotation, quadRotation); 45 | 46 | //Body Quad 47 | float3 scale = new float3(radius * 2f, 1f, height - radius * 2f); 48 | PlaneResult[index] = new PrimitiveData(capsuleData->Center, planeRotation, scale, capsuleData->Color); 49 | 50 | //Top and Bottom 51 | float3 headNormal = math.rotate(capsuleData->Rotation, new float3(0f, 1f, 0f)); 52 | float3 sphereOffset = headNormal * (height * 0.5f - radius); 53 | float3 pos1 = capsuleData->Center + sphereOffset; 54 | float3 pos2 = capsuleData->Center - sphereOffset; 55 | 56 | SemicircleResult[index * 2 + 0] = new PrimitiveData(pos1, capsuleData->Rotation, new float3(radius), capsuleData->Color); 57 | SemicircleResult[index * 2 + 1] = new PrimitiveData(pos2, bottomRotation, new float3(radius), capsuleData->Color); 58 | } 59 | } 60 | 61 | public readonly struct Capsule2dData 62 | { 63 | public readonly float3 Center; 64 | public readonly quaternion Rotation; 65 | public readonly float Height; 66 | public readonly float Radius; 67 | public readonly Color Color; 68 | 69 | public Capsule2dData(float3 center, quaternion rotation, float height, float radius, Color color) 70 | { 71 | Center = center; 72 | Rotation = rotation; 73 | Height = height; 74 | Radius = radius; 75 | Color = color; 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateCapsuleJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateCapsuleJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public CapsuleData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public PrimitiveData* HemisphereResult; 21 | 22 | [NativeDisableUnsafePtrRestriction] 23 | [WriteOnly] 24 | public PrimitiveData* TubeResult; 25 | 26 | private static readonly quaternion correctionValue; 27 | 28 | static CreateCapsuleJob() 29 | { 30 | correctionValue = quaternion.AxisAngle(new float3(1f, 0f, 0f), math.PI); 31 | } 32 | 33 | [BurstCompile] 34 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 35 | { 36 | CapsuleData* capsuleData = GizmoDataPtr + index; 37 | 38 | float radius = capsuleData->Radius; 39 | float height = math.max(radius * 2f, capsuleData->Height); 40 | 41 | float cos = (1 + math.clamp(capsuleData->UpAxis.y, -1f, 1f)) * 0.5f; 42 | float3 axis = math.normalizesafe(new float3(capsuleData->UpAxis.z, 0f, -capsuleData->UpAxis.x), new float3(0f, 0f, 1f)); 43 | 44 | float4 value = new float4(axis * math.sqrt(1f - cos), math.sqrt(cos)); 45 | quaternion topRotation = new quaternion(value); 46 | quaternion bottomRotation = math.mul(topRotation, correctionValue); 47 | 48 | //Body Quad 49 | float3 scale = new float3(radius, height - radius * 2f, radius); 50 | TubeResult[index] = new PrimitiveData(capsuleData->Center, topRotation, scale, capsuleData->Color); 51 | 52 | //Top and Bottom 53 | float3 sphereOffset = capsuleData->UpAxis * (height * 0.5f - radius); 54 | float3 pos1 = capsuleData->Center + sphereOffset; 55 | float3 pos2 = capsuleData->Center - sphereOffset; 56 | 57 | HemisphereResult[index * 2 + 0] = new PrimitiveData(pos1, topRotation, new float3(radius), capsuleData->Color); 58 | HemisphereResult[index * 2 + 1] = new PrimitiveData(pos2, bottomRotation, new float3(radius), capsuleData->Color); 59 | } 60 | } 61 | 62 | public readonly struct CapsuleData 63 | { 64 | public readonly float3 Center; 65 | public readonly float3 UpAxis; 66 | public readonly float Height; 67 | public readonly float Radius; 68 | public readonly Color Color; 69 | 70 | public CapsuleData(float3 center, float3 upAxis, float height, float radius, Color color) 71 | { 72 | Center = center; 73 | UpAxis = upAxis; 74 | Height = height; 75 | Radius = radius; 76 | Color = color; 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/SharedGizmoBuffer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Burst; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | 6 | namespace UGizmo.Internal 7 | { 8 | [BurstCompile] 9 | internal unsafe class SharedGizmoBuffer : IDisposable where TJobData : unmanaged 10 | { 11 | public ref UnsafeList JobBuffer => ref backJobBuffer.Ref; 12 | 13 | public ref UnsafeList DrawBuffer 14 | { 15 | get 16 | { 17 | drawBuffer.Resize(backJobBuffer.Ref.Length); 18 | return ref drawBuffer; 19 | } 20 | } 21 | 22 | private static SharedGizmoBuffer instance; 23 | 24 | public static SharedGizmoBuffer GetSharedBuffer() 25 | { 26 | return instance ??= new SharedGizmoBuffer(); 27 | } 28 | 29 | private const int InitialCapacity = 4192; 30 | private UnsafeListReference frontJobBuffer = new UnsafeListReference(InitialCapacity, Allocator.Persistent); 31 | private UnsafeListReference backJobBuffer = new UnsafeListReference(InitialCapacity, Allocator.Persistent); 32 | private UnsafeList drawBuffer = new UnsafeList(InitialCapacity, Allocator.Persistent); 33 | 34 | public int Add(in TJobData jobData) 35 | { 36 | int handle = backJobBuffer.Ref.Length; 37 | backJobBuffer.Ref.Add(jobData); 38 | return handle; 39 | } 40 | 41 | public (int start, int length) AddRange(TJobData* jobData, int count) 42 | { 43 | int length = backJobBuffer.Ref.Length; 44 | backJobBuffer.Ref.AddRange(jobData, count); 45 | return (length, count); 46 | } 47 | 48 | public (int start, int length) Reserve(int count, out TJobData* targetPtr) 49 | { 50 | int length = backJobBuffer.Ref.Length; 51 | backJobBuffer.Ref.Resize(length + count); 52 | targetPtr = backJobBuffer.Ref.Ptr + length; 53 | return (length, count); 54 | } 55 | 56 | public void SetRenderData(int* handles, DrawData* destination, int count) 57 | { 58 | SetRenderData_Burst(handles, drawBuffer.Ptr, destination, count); 59 | } 60 | 61 | [BurstCompile] 62 | private static void SetRenderData_Burst(int* handles, DrawData* origin, DrawData* destination, int count) 63 | { 64 | for (int i = 0; i < count; i++) 65 | { 66 | destination[i] = origin[handles[i]]; 67 | } 68 | } 69 | 70 | public void Swap() 71 | { 72 | (frontJobBuffer, backJobBuffer) = (backJobBuffer, frontJobBuffer); 73 | backJobBuffer.Ref.Clear(); 74 | } 75 | 76 | public void Clear() 77 | { 78 | backJobBuffer.Ref.Clear(); 79 | drawBuffer.Clear(); 80 | } 81 | 82 | public void Dispose() 83 | { 84 | frontJobBuffer.Dispose(); 85 | backJobBuffer.Dispose(); 86 | drawBuffer.Dispose(); 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireConeJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateWireConeJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public ConeData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public PrimitiveData* WireCircleResult; 21 | 22 | [NativeDisableUnsafePtrRestriction] 23 | [WriteOnly] 24 | public LineData* LineResult; 25 | 26 | private static readonly float3 front = new float3(0f, 0f, 1f); 27 | private static readonly float3 right = new float3(1f, 0f, 0f); 28 | private const int LineCount = 4; 29 | 30 | 31 | [BurstCompile] 32 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 33 | { 34 | ConeData* coneData = GizmoDataPtr + index; 35 | 36 | float3 position = coneData->Origin + coneData->Direction * coneData->Distance; 37 | float cos = (1 + math.clamp(coneData->Direction.y, -1f, 1f)) * 0.5f; 38 | float3 axis = math.normalizesafe(new float3(coneData->Direction.z, 0f, -coneData->Direction.x), new float3(0f, 0f, 1f)); 39 | 40 | float4 value = new float4(axis * math.sqrt(1f - cos), math.sqrt(cos)); 41 | quaternion rotation = new quaternion(value); 42 | float width = math.tan(coneData->Angle); 43 | 44 | WireCircleResult[index] = new PrimitiveData(position, rotation, new float3(width, 0f, width), coneData->Color); 45 | 46 | float3 rotateFront = math.rotate(rotation, front * width); 47 | float3 rotateRight = math.rotate(rotation, right * width); 48 | 49 | float3 p1 = coneData->Origin; 50 | float3 p2 = rotateFront + position; 51 | LineResult[LineCount * index + 0] = new LineData(p1, p2, coneData->Color); 52 | 53 | float3 p3 = coneData->Origin; 54 | float3 p4 = -rotateFront + position; 55 | LineResult[LineCount * index + 1] = new LineData(p3, p4, coneData->Color); 56 | 57 | float3 p5 = coneData->Origin; 58 | float3 p6 = rotateRight + position; 59 | LineResult[LineCount * index + 2] = new LineData(p5, p6, coneData->Color); 60 | 61 | float3 p7 = coneData->Origin; 62 | float3 p8 = -rotateRight + position; 63 | LineResult[LineCount * index + 3] = new LineData(p7, p8, coneData->Color); 64 | } 65 | } 66 | 67 | public readonly struct ConeData 68 | { 69 | public readonly float3 Origin; 70 | public readonly float3 Direction; 71 | public readonly float Distance; 72 | public readonly float Angle; 73 | public readonly Color Color; 74 | 75 | public ConeData(float3 origin, float3 direction, float distance, float angle, Color color) 76 | { 77 | Origin = origin; 78 | Direction = direction; 79 | Distance = distance; 80 | Angle = angle; 81 | Color = color; 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireCapsuleJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | 8 | namespace UGizmo.Internal.Extension.Jobs 9 | { 10 | [BurstCompile] 11 | internal unsafe struct CreateWireCapsuleJob : IJobParallelFor 12 | { 13 | [NativeDisableUnsafePtrRestriction] 14 | [ReadOnly] 15 | public CapsuleData* GizmoDataPtr; 16 | 17 | [NativeDisableUnsafePtrRestriction] 18 | [WriteOnly] 19 | public PrimitiveData* HemisphereResult; 20 | 21 | [NativeDisableUnsafePtrRestriction] 22 | [WriteOnly] 23 | public LineData* LineResult; 24 | 25 | private static readonly quaternion vertical; 26 | private static readonly float3 front = new float3(0f, 0f, 1f); 27 | private static readonly float3 right = new float3(1f, 0f, 0f); 28 | private const int LineCount = 4; 29 | 30 | static CreateWireCapsuleJob() 31 | { 32 | vertical = quaternion.AxisAngle(new float3(1f, 0f, 0f), math.PI); 33 | } 34 | 35 | [BurstCompile] 36 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 37 | { 38 | CapsuleData* capsuleData = GizmoDataPtr + index; 39 | 40 | float radius = capsuleData->Radius; 41 | float height = math.max(radius * 2f, capsuleData->Height); 42 | 43 | float cos = (1 + math.clamp(capsuleData->UpAxis.y, -1f, 1f)) * 0.5f; 44 | float3 axis = math.normalizesafe(new float3(capsuleData->UpAxis.z, 0f, -capsuleData->UpAxis.x), front); 45 | 46 | float4 value = new float4(axis * math.sqrt(1f - cos), math.sqrt(cos)); 47 | quaternion topRotation = new quaternion(value); 48 | quaternion bottomRotation = math.mul(topRotation, vertical); 49 | 50 | float3 sphereOffset = capsuleData->UpAxis * (height * 0.5f - radius); 51 | float3 pos1 = capsuleData->Center + sphereOffset; 52 | float3 pos2 = capsuleData->Center - sphereOffset; 53 | 54 | HemisphereResult[index * 2 + 0] = new PrimitiveData(pos1, topRotation, new float3(radius), capsuleData->Color); 55 | HemisphereResult[index * 2 + 1] = new PrimitiveData(pos2, bottomRotation, new float3(radius), capsuleData->Color); 56 | 57 | float3 rotateFront = math.rotate(topRotation, front * radius); 58 | float3 rotateRight = math.rotate(topRotation, right * radius); 59 | 60 | float3 p1 = rotateFront + pos1; 61 | float3 p2 = rotateFront + pos2; 62 | LineResult[LineCount * index + 0] = new LineData(p1, p2, capsuleData->Color); 63 | 64 | float3 p3 = -rotateFront + pos1; 65 | float3 p4 = -rotateFront + pos2; 66 | LineResult[LineCount * index + 1] = new LineData(p3, p4, capsuleData->Color); 67 | 68 | float3 p5 = rotateRight + pos1; 69 | float3 p6 = rotateRight + pos2; 70 | LineResult[LineCount * index + 2] = new LineData(p5, p6, capsuleData->Color); 71 | 72 | float3 p7 = -rotateRight + pos1; 73 | float3 p8 = -rotateRight + pos2; 74 | LineResult[LineCount * index + 3] = new LineData(p7, p8, capsuleData->Color); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/Extension/Jobs/CreateWireArrow2dJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Burst.CompilerServices; 3 | using Unity.Collections; 4 | using Unity.Collections.LowLevel.Unsafe; 5 | using Unity.Jobs; 6 | using Unity.Mathematics; 7 | using UnityEngine; 8 | 9 | namespace UGizmo.Internal.Extension.Jobs 10 | { 11 | [BurstCompile] 12 | internal unsafe struct CreateWireArrow2dJob : IJobParallelFor 13 | { 14 | [NativeDisableUnsafePtrRestriction] 15 | [ReadOnly] 16 | public WireArrow2dData* GizmoDataPtr; 17 | 18 | [NativeDisableUnsafePtrRestriction] 19 | [WriteOnly] 20 | public PrimitiveData* TriangleResult; 21 | 22 | [NativeDisableUnsafePtrRestriction] 23 | [WriteOnly] 24 | public LineData* LineResult; 25 | 26 | private const float FixMultiplier = 1.155f; 27 | private const int LineCount = 4; 28 | 29 | [BurstCompile] 30 | public void Execute([AssumeRange(0, int.MaxValue)] int index) 31 | { 32 | WireArrow2dData* arrowData = GizmoDataPtr + index; 33 | float3 diff = arrowData->To - arrowData->From; 34 | float length = math.length(diff); 35 | float3 headNormal = diff * (1f / length); 36 | 37 | float threshold = length / (arrowData->HeadLength * 2f); 38 | float headLength = threshold <= 1f ? length * 0.5f : arrowData->HeadLength; 39 | float3 borderPoint = headNormal * (length - headLength); 40 | float3 right = math.normalize(math.cross(headNormal, arrowData->Normal)); 41 | float3 normal = math.cross(right, headNormal); 42 | quaternion rotation = quaternion.LookRotation(-normal, headNormal); 43 | 44 | Color planeColor = arrowData->Color; 45 | planeColor.a = 0.2f; 46 | 47 | float extends = arrowData->HeadWidth * 0.5f; 48 | float3 p1 = arrowData->From; 49 | float3 p2 = arrowData->From + borderPoint; 50 | float3 p3 = arrowData->From + borderPoint + right * extends; 51 | float3 p4 = arrowData->From + borderPoint + right * -extends; 52 | float3 p5 = arrowData->To; 53 | 54 | float3 headPosition = (p3 + p4 + p5) / 3f; 55 | 56 | TriangleResult[index] = new PrimitiveData(headPosition, rotation, 57 | new float3(arrowData->HeadWidth, arrowData->HeadLength * FixMultiplier, 1f), 58 | planeColor); 59 | 60 | LineResult[LineCount * index + 0] = new LineData(p1, p2, arrowData->Color); 61 | LineResult[LineCount * index + 1] = new LineData(p3, p4, arrowData->Color); 62 | LineResult[LineCount * index + 2] = new LineData(p4, p5, arrowData->Color); 63 | LineResult[LineCount * index + 3] = new LineData(p3, p5, arrowData->Color); 64 | } 65 | } 66 | 67 | public readonly struct WireArrow2dData 68 | { 69 | public readonly float3 From; 70 | public readonly float3 To; 71 | public readonly float3 Normal; 72 | public readonly Color Color; 73 | public readonly float HeadLength; 74 | public readonly float HeadWidth; 75 | 76 | public WireArrow2dData(float3 from, float3 to, float3 normal, Color color, float headLength, float headWidth) 77 | { 78 | From = from; 79 | To = to; 80 | Normal = normal; 81 | Color = color; 82 | HeadLength = headLength; 83 | HeadWidth = headWidth; 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/GlobalNamespace.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/UnityEditor.ShortcutManagement.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Internal/ContinuousGizmoBuffer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace UGizmo.Internal 5 | { 6 | internal readonly struct ContinuousGizmoData where TJobData : unmanaged 7 | { 8 | public readonly DateTime EndTime; 9 | public readonly TJobData JobData; 10 | 11 | public ContinuousGizmoData(DateTime endTime, TJobData jobData) 12 | { 13 | EndTime = endTime; 14 | JobData = jobData; 15 | } 16 | } 17 | 18 | internal unsafe class ContinuousGizmoBuffer where TJobData : unmanaged 19 | { 20 | private int length = 0; 21 | private ContinuousGizmoData[] array; 22 | private Action enqueueData; 23 | 24 | private const int InitialCapacity = 1024; 25 | 26 | public ContinuousGizmoBuffer(Action enqueueData) 27 | { 28 | array = new ContinuousGizmoData[InitialCapacity]; 29 | this.enqueueData = enqueueData; 30 | } 31 | 32 | /// 33 | /// Add JobData with duration. 34 | /// 35 | /// 36 | /// 37 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 38 | public void Add(in TJobData jobData, float duration) 39 | { 40 | EnsureCapacity(1); 41 | 42 | array[length++] = new ContinuousGizmoData(DateTime.Now + TimeSpan.FromSeconds(duration), jobData); 43 | } 44 | 45 | /// 46 | /// Adds JobData for a given range with duration 47 | /// 48 | /// 49 | /// 50 | /// 51 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 52 | public void AddRange(TJobData* jobData, int count, float duration) 53 | { 54 | EnsureCapacity(count); 55 | 56 | int offset = length; 57 | length += count; 58 | 59 | for (int i = 0; i < count; i++) 60 | { 61 | array[offset + i] = new ContinuousGizmoData(DateTime.Now + TimeSpan.FromSeconds(duration), jobData[i]); 62 | } 63 | } 64 | 65 | private void EnsureCapacity(int offset) 66 | { 67 | if (length + offset > array.Length) 68 | { 69 | Array.Resize(ref array, Math.Max(length + offset, array.Length * 2)); 70 | } 71 | } 72 | 73 | /// 74 | /// Enqueue all data being retained. 75 | /// 76 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 77 | public void EnqueueAllJobData() 78 | { 79 | int index = 0; 80 | DateTime now = DateTime.Now; 81 | 82 | while (index < length) 83 | { 84 | ContinuousGizmoData data = array[index]; 85 | 86 | if (data.EndTime < now) 87 | { 88 | //Remove and Swap 89 | array[index] = array[--length]; 90 | continue; 91 | } 92 | 93 | enqueueData(data.JobData); 94 | index++; 95 | } 96 | } 97 | 98 | /// 99 | /// Clear buffer. 100 | /// 101 | public void Clear() 102 | { 103 | length = 0; 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Shader/UGizmoMeshCullOff.shader: -------------------------------------------------------------------------------- 1 | Shader "UGizmo/MeshCullOff" 2 | { 3 | SubShader 4 | { 5 | Tags 6 | { 7 | "RenderType" = "Transparent" "Queue" = "Transparent" 8 | } 9 | 10 | Pass 11 | { 12 | Cull Off 13 | ZTest LEqual 14 | ZWrite Off 15 | Blend SrcAlpha OneMinusSrcAlpha 16 | Offset -1, -1 17 | 18 | Lighting Off 19 | Fog 20 | { 21 | Mode Off 22 | } 23 | 24 | CGPROGRAM 25 | #pragma vertex vert 26 | #pragma fragment frag 27 | #pragma multi_compile_instancing 28 | #include "UnityCG.cginc" 29 | 30 | struct DrawData 31 | { 32 | float4x4 mat; 33 | float4 color; 34 | }; 35 | 36 | StructuredBuffer _DrawBuffer; 37 | 38 | struct Attributes 39 | { 40 | float4 positionOS : POSITION; 41 | float3 Normal : NORMAL; 42 | }; 43 | 44 | struct Varyings 45 | { 46 | float4 positionHCS : SV_POSITION; 47 | float4 color : COLOR; 48 | }; 49 | 50 | Varyings vert(Attributes IN, uint instanceID : SV_InstanceID) 51 | { 52 | Varyings o; 53 | DrawData drawData = _DrawBuffer[instanceID]; 54 | 55 | float4 pos = mul(drawData.mat, IN.positionOS); 56 | o.positionHCS = UnityObjectToClipPos(pos.xyz); 57 | o.color = drawData.color; 58 | 59 | return o; 60 | } 61 | 62 | half4 frag(Varyings v) : SV_Target 63 | { 64 | return v.color; 65 | } 66 | ENDCG 67 | } 68 | 69 | Pass 70 | { 71 | Cull Off 72 | ZTest Greater 73 | ZWrite Off 74 | Blend SrcAlpha OneMinusSrcAlpha 75 | Offset -1, -1 76 | 77 | Lighting Off 78 | Fog 79 | { 80 | Mode Off 81 | } 82 | 83 | CGPROGRAM 84 | #pragma vertex vert 85 | #pragma fragment frag 86 | #pragma multi_compile_instancing 87 | #include "UnityCG.cginc" 88 | 89 | struct DrawData 90 | { 91 | float4x4 mat; 92 | float4 color; 93 | }; 94 | 95 | StructuredBuffer _DrawBuffer; 96 | 97 | struct Attributes 98 | { 99 | float4 positionOS : POSITION; 100 | }; 101 | 102 | struct Varyings 103 | { 104 | float4 positionHCS : SV_POSITION; 105 | float4 color : COLOR; 106 | }; 107 | 108 | Varyings vert(Attributes IN, uint instanceID : SV_InstanceID) 109 | { 110 | Varyings o; 111 | DrawData drawData = _DrawBuffer[instanceID]; 112 | 113 | float4 pos = mul(drawData.mat, IN.positionOS); 114 | o.positionHCS = UnityObjectToClipPos(pos.xyz); 115 | o.color = drawData.color; 116 | o.color.a *= 0.4; 117 | 118 | return o; 119 | } 120 | 121 | half4 frag(Varyings v) : SV_Target 122 | { 123 | return v.color; 124 | } 125 | ENDCG 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_HDRP/Scripts/DrawPrimitives.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace UGizmo.Samples.HDRP 4 | { 5 | public class DrawPrimitives : MonoBehaviour 6 | { 7 | [SerializeField] private Color color; 8 | [SerializeField] private Transform cube; 9 | [SerializeField] private Transform wireCube; 10 | [SerializeField] private Transform sphere; 11 | [SerializeField] private Transform wireSphere; 12 | [SerializeField] private Transform capsule; 13 | [SerializeField] private Transform wireCapsule; 14 | [SerializeField] private Transform cylinder; 15 | [SerializeField] private Transform wireCylinder; 16 | [SerializeField] private Transform cone; 17 | [SerializeField] private Transform wireCone; 18 | [SerializeField] private Transform plane; 19 | [SerializeField] private Transform wirePlane; 20 | 21 | private void OnDrawGizmos() 22 | { 23 | UGizmos.DrawCube(cube.position, cube.rotation, cube.localScale, color); 24 | UGizmos.DrawWireCube(wireCube.position, wireCube.rotation, wireCube.localScale, color); 25 | 26 | UGizmos.DrawSphere(sphere.position, 0.5f, color); 27 | UGizmos.DrawWireSphere(wireSphere.position, 0.5f, color); 28 | 29 | UGizmos.DrawCapsule(capsule.position, capsule.up, 2f, 0.5f, color); 30 | UGizmos.DrawWireCapsule(wireCapsule.position, wireCapsule.up, 2f, 0.5f, color); 31 | 32 | UGizmos.DrawCylinder(cylinder.position, cylinder.rotation, cylinder.localScale, color); 33 | UGizmos.DrawWireCylinder(wireCylinder.position, wireCylinder.rotation, new Vector3(0.5f, 1f, 0.5f), color); 34 | 35 | UGizmos.DrawCone(cone.position, cone.rotation, cone.localScale, color); 36 | UGizmos.DrawWireCone(wireCone.position, wireCone.rotation, wireCone.localScale, color); 37 | 38 | Vector2 scale = new Vector2(plane.localScale.x, plane.localScale.z); 39 | UGizmos.DrawPlane(plane.position, plane.rotation, scale, color); 40 | 41 | scale = new Vector2(wirePlane.localScale.x, wirePlane.localScale.z); 42 | UGizmos.DrawWirePlane(wirePlane.position, wirePlane.rotation, scale, color); 43 | } 44 | 45 | 46 | #if !UNITY_EDITOR 47 | private void Update() 48 | { 49 | UGizmos.DrawCube(cube.position, cube.rotation, cube.localScale, color); 50 | UGizmos.DrawWireCube(wireCube.position, wireCube.rotation, wireCube.localScale, color); 51 | 52 | UGizmos.DrawSphere(sphere.position, 0.5f, color); 53 | UGizmos.DrawWireSphere(wireSphere.position, 0.5f, color); 54 | 55 | UGizmos.DrawCapsule(capsule.position, capsule.up, 2f, 0.5f, color); 56 | UGizmos.DrawWireCapsule(wireCapsule.position, wireCapsule.up, 2f, 0.5f, color); 57 | 58 | UGizmos.DrawCylinder(cylinder.position, cylinder.rotation, cylinder.localScale, color); 59 | UGizmos.DrawWireCylinder(wireCylinder.position, wireCylinder.rotation, new Vector3(0.5f, 1f, 0.5f), color); 60 | 61 | UGizmos.DrawCone(cone.position, cone.rotation, cone.localScale, color); 62 | UGizmos.DrawWireCone(wireCone.position, wireCone.rotation, wireCone.localScale, color); 63 | 64 | Vector2 scale = new Vector2(plane.localScale.x, plane.localScale.z); 65 | UGizmos.DrawPlane(plane.position, plane.rotation, scale, color); 66 | 67 | scale = new Vector2(wirePlane.localScale.x, wirePlane.localScale.z); 68 | UGizmos.DrawWirePlane(wirePlane.position, wirePlane.rotation, scale, color); 69 | } 70 | #endif 71 | } 72 | } -------------------------------------------------------------------------------- /src/UGizmo/UIElementsSchema/Unity.Entities.UI.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/UGizmo/Assets/UGizmo/Samples~/UGizmoSamples_URP/Scripts/DrawPrimitives.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace UGizmo.Samples.URP 5 | { 6 | public class DrawPrimitives : MonoBehaviour 7 | { 8 | [SerializeField] private Color color; 9 | [SerializeField] private Transform cube; 10 | [SerializeField] private Transform wireCube; 11 | [SerializeField] private Transform sphere; 12 | [SerializeField] private Transform wireSphere; 13 | [SerializeField] private Transform capsule; 14 | [SerializeField] private Transform wireCapsule; 15 | [SerializeField] private Transform cylinder; 16 | [SerializeField] private Transform wireCylinder; 17 | [SerializeField] private Transform cone; 18 | [SerializeField] private Transform wireCone; 19 | [SerializeField] private Transform plane; 20 | [SerializeField] private Transform wirePlane; 21 | 22 | private void OnDrawGizmos() 23 | { 24 | UGizmos.DrawCube(cube.position, cube.rotation, cube.localScale, color); 25 | UGizmos.DrawWireCube(wireCube.position, wireCube.rotation, wireCube.localScale, color); 26 | 27 | UGizmos.DrawSphere(sphere.position, 0.5f, color); 28 | UGizmos.DrawWireSphere(wireSphere.position, 0.5f, color); 29 | 30 | UGizmos.DrawCapsule(capsule.position, capsule.up, 2f, 0.5f, color); 31 | UGizmos.DrawWireCapsule(wireCapsule.position, wireCapsule.up, 2f, 0.5f, color); 32 | 33 | UGizmos.DrawCylinder(cylinder.position, cylinder.rotation, cylinder.localScale, color); 34 | UGizmos.DrawWireCylinder(wireCylinder.position, wireCylinder.rotation, new Vector3(0.5f, 1f, 0.5f), color); 35 | 36 | UGizmos.DrawCone(cone.position, cone.rotation, cone.localScale, color); 37 | UGizmos.DrawWireCone(wireCone.position, wireCone.rotation, wireCone.localScale, color); 38 | 39 | Vector2 scale = new Vector2(plane.localScale.x, plane.localScale.z); 40 | UGizmos.DrawPlane(plane.position, plane.rotation, scale, color); 41 | 42 | scale = new Vector2(wirePlane.localScale.x, wirePlane.localScale.z); 43 | UGizmos.DrawWirePlane(wirePlane.position, wirePlane.rotation, scale, color); 44 | } 45 | 46 | #if !UNITY_EDITOR 47 | private void Update() 48 | { 49 | UGizmos.DrawCube(cube.position, cube.rotation, cube.localScale, color); 50 | UGizmos.DrawWireCube(wireCube.position, wireCube.rotation, wireCube.localScale, color); 51 | 52 | UGizmos.DrawSphere(sphere.position, 0.5f, color); 53 | UGizmos.DrawWireSphere(wireSphere.position, 0.5f, color); 54 | 55 | UGizmos.DrawCapsule(capsule.position, capsule.up, 2f, 0.5f, color); 56 | UGizmos.DrawWireCapsule(wireCapsule.position, wireCapsule.up, 2f, 0.5f, color); 57 | 58 | UGizmos.DrawCylinder(cylinder.position, cylinder.rotation, cylinder.localScale, color); 59 | UGizmos.DrawWireCylinder(wireCylinder.position, wireCylinder.rotation, new Vector3(0.5f, 1f, 0.5f), color); 60 | 61 | UGizmos.DrawCone(cone.position, cone.rotation, cone.localScale, color); 62 | UGizmos.DrawWireCone(wireCone.position, wireCone.rotation, wireCone.localScale, color); 63 | 64 | Vector2 scale = new Vector2(plane.localScale.x, plane.localScale.z); 65 | UGizmos.DrawPlane(plane.position, plane.rotation, scale, color); 66 | 67 | scale = new Vector2(wirePlane.localScale.x, wirePlane.localScale.z); 68 | UGizmos.DrawWirePlane(wirePlane.position, wirePlane.rotation, scale, color); 69 | } 70 | #endif 71 | } 72 | } --------------------------------------------------------------------------------