All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Minimum Unity version is 2022.3.
- Added dependencies on
com.unity.burst
andcom.unity.mathematics
. - Only the API surface is now public. If you want to extend the package use Assembly References.
- Shapes are now pre-allocated. Change the number of allocations via the Project Settings.
- Axis colors are now in Preferences.
DashedLine
is now backed byLine
instead of two Vector3s.
- Added support for drawing from Jobs and Burst-compiled functions.
- Added
[ExecuteAlways]
to Debug Collision/Trigger Events to support visualising duringPhysics.Simulate
. - Added
RaycastHit
andRaycastHit2D
constructors toShape.Ray
. - Added
DrawPhysicsUtility.GetFixedFrameJobDuration
for getting a corrected duration for jobs started fromFixedUpdate
orFixedStepSimulationSystemGroup
. - Added
Shape.Catenary
. - Added arrowhead scale parameter to arrow functions.
- Added overloads to
Arc
andAnnulus
that take a From and To angle.
- Fixed
D.raw(MeshCollider)
not respectingcolor
andduration
.
- Removed the internal
CircleCache
class. If your extensions relied on it, sorry, it was removed for burst compatibility.
- Added
Shape.FieldOfView
. - Added a
Flip
function toShape.Cone
andPyramid
.
- Added missing axis support for CapsuleCollider drawing.
- Fixed incorrect calculations for Horizontal CapsuleCollider2D drawing.
- Added PolygonCollider2D support to Shape drawing.
- Added
Shape.Cone
. - Added
Shape.Frustum
. - Added
Shape.Pyramid
.
- Box Matrix4x4 constructor is now public.
- Added
Shape.Annulus
.
- Fixed rare introduction of NaN into Capsule2D code paths.
- Improved handling of NaN in Arc code paths. This will set reasonable defaults when invalid values are passed.
- Removed NaNs from certain code paths when zero is used as a direction.
- Scale parameter for Axis2D.
- Null reference exceptions present in Physics2D cast drawing.
- Added
Shape.Plane
. - Added
BoundsInt
,RectInt
, andRay2D
overloads. - Added
DrawPhysicsSettings.ResetDuration
.
- DrawPhysics2D being undefined for versions below 2022.1
- Attempted fix for OpenUPM gitignore discrepancy that has caused a meta file ignore disconnect between git and the package repo.
This file is tracked in git, but is not present in the package repo for unknown reasons.
- If you are seeing an error about a folder not having a meta file, right-click on the Debugging folder, open it in Explorer and delete the Assets folder.
The folder should be empty. (Project\Library\PackageCache\com.vertx.debugging@version\Assets) if Unity has also generated a meta file, delete that too.
- Added missing autoTiling, edgeRadius, and offset support to BoxCollider2D drawing.
- Fixed Z offset issues with nested rotations and scales and 2D Collider drawing.
- Native collection disposal in certain scenarios where no shapes are being drawn.
- Removed stray meta file.
- Added
DrawPhysicsSettings.Duration
andDrawPhysicsSettings.SetDuration
to override the length of time the casts draw for. You will need to reset this value manually. Calls toDuration
cannot be stripped, I would recommend usingSetDuration
if this is important to you.
- Fixed UnityException when using Shape colors from field initialisers, like DebugCollisionEvents does.
- Removed obsolete calls 2023+ projects that use Physics2D.
- Added Arc overload that takes a chord, arc length, and aiming vector.
- DebugMeshNormals doesn't rely on ReadWrite meshes for 2020+
- Fixed issue where lines would fail to render if they were the only type of shape rendering.
- Fixed shape drawing from
Awake
orStart
failing to register with duration. - Added missing duration-only overload to
D.raw
.
- Fixed compatibility issues with 2022.1.
- Fixed compatibility issues with projects not using 2D Physics.
- Order of arguments in Shape.SphereCast and SphereCastAll is now consistent with Physics.SphereCast.
- Order of arguments in Shape.CircleCast and CircleCastAll is now consistent with Physics2D.CircleCast.
- 2D casts now support minDepth and maxDepth instead of one optional depth.
- Added
DrawPhysics
, identical toPhysics
but implements the appropriateD.raw
call for each operation. - Added
DrawPhysics2D
, identical toPhysics2D
but implements the appropriateD.raw
call for each operation. - Added Linecast and Linecast2D.
- Added DashedLine.
- Added primitive Collider and Collider2D drawing.
- Capsule outlines no longer break when drawing around the origin.
- See 2.0.0-pre.1
- Complete API overhaul, nothing is as it was previously! See README for more information.
- The core drawing function is
D.raw(shape, color = Color.white, duration = 0)
- All drawable shapes are structs inside the
Shape
class.
- The core drawing function is
- Greatly improved drawing performance.
- Drawing no longer uses Debug.DrawLine or Gizmos.DrawLine internally.
- Everything except text is now using instanced rendering.
- Improved drawing of basic shapes.
- Spheres and capsules have a proper outline.
- The interior of shapes is faded to better show 3D.
- Casts have accurate outlines and better terminations.
- Text now supports background and foreground colors.
- Text now responds to Gizmos' "3D Icons" setting (only interpreted as distance fade).
- 3D Text is now depth sorted.
- Added Arc and Arc2D.
- Added Hemisphere.
- Added ScreenText, draws text in the top left of the view, uses an Overlay in the scene view. It's optional, you can also dock it if it's distracting.
- Added more debug components. Find them in Add Component > Debugging.
- Removed complex shape parameters.
- Specifying segment count is no longer available. If you need this, please let me know.
- Removed GizmosScope. This should be automatically detected.
- Shape outlines become inaccurate at small sizes.
The two issues below can be remedied by playing with the Depth settings in Project Settings>Vertx>Debugging:
- 2022.2 URP versions may have a depth buffer flipped in Y in the Game view. This is a Unity bug that will also affect built-in gizmos.
- Some versions of Unity will not depth test in the Game view. This seems to be consistent with built-in Debug and Gizmo drawing. Fixes welcome if anyone has them!
- Added IList/IEnumerable support for DrawLine2D and DrawArrowLine2D.
- Minor performance improvements to circle drawing.
- Fixed incomplete DebugCollisionEvents.
- Removed Vertx from debug component menu.
- Added more debug components:
- Debug Collision Events
- Debug Trigger Events
- Fixed 2022-only API being present in earlier versions.
- Added IList/IEnumerable support for DrawLine and DrawArrowLine.
- Added DrawMeshNormals.
- Added Debug components:
- Debug Mesh Normals.
- Debug Renderer Bounds.
- Debug Transform.
- Changed DrawAxis to take an Axes enum that defines which axes are drawn.
- Fix for gizmos scope failing to initialise properly.
- Physics2D module is now optional.
- Added duration parameter to most remaining methods.
- Added DrawHit variant of methods for casts with only one result.
- Renamed DrawSpiral to DrawSpiral2D.
- Reduced allocations.
- Fixed alignment issue with DrawText on systems with scaling or retina displays.
- DrawText uses a monospaced font.
- DrawText properly respects gizmo settings in all windows.
- Changed a constructor for Capsule to handle height consistent with a CapsuleCollider.
- Added missing duration to DrawArrow.
- Added DrawArrowLine.
- Added DrawArc.
- Fixed exception when drawing Text while the game view is not open or hidden by a maximised scene view.
- Added duration to many 2D debugging methods.
- Added DrawSpiral (helpful for debugging fast rotating objects).
- Added DrawCircle.
- Added DrawGizmosScope for use with OnDrawGizmos.
- Added DrawBounds.
- Added DrawRect.
- Added Ray only overload for DrawRaycast
- Added duration parameters to a few methods.
- Added a scale parameter to DrawAxis.
- Added Game-View support for DrawText.
- Added Editor-only conditional attribute to all debug functions.
- Added DrawArrow.
- Added DrawRaycast.
- Added raw shape drawing.
- Previous detailed shape drawing has been made internal in favour of the new functions.
- Added combination DrawRaycast and DrawRaycast2D functions.
- Added DrawRaycastHits2D.
- Added more Color-based overloads.
- Fixed naming issue with "Draw"BoxCast2D.
- Added code generation to add automatic Color-free method overloads.
- Added cast lines for 2D Draw functions.
- Added simple variants for all Draw functions that combine drawing the cast and hits.
- Added 2D variants of the DebugUtils.Draw functions.
- Added DebugUtils.DrawCapsuleCast and DrawCapsuleCastHits.
- Added some variants for DrawSphereCast functions.
- Initial release.