Changelog

  • 1.7.4 (2024-02-13)

    • Fixed compatibility with HDRP render pipeline.

    • Improved performance when there are many cameras rendered during the same frame.

  • 1.7.3 (2024-02-07)

    • Improved performance when there are lots of components inheriting from MonoBehaviourGizmos, but they do not actually override the DrawGizmos method.

    • Fixed compatibility with Universal Render Pipeline package version 15 and 16 (regression in 1.7.2).

  • 1.7.2 (2024-02-06)

    • Improved performance of Draw.WireCylinder and Draw.WireCapsule.

    • Fixed a memory leak that could happen if you used a lot of custom command builders.

    • Added an option to the project settings to increase or decrease the resolution of circles.

    • Improved compatibility with Universal Render Pipeline package version 17.

  • 1.7.1 (2023-11-14)

    • Removed "com.unity.jobs" as a dependency, since it has been replaced by the collections package.

    • Added support for rendering gizmos while the scene view is in wireframe mode. This is supported in Unity 2023.1 and up.

    • Added CommandBuilder.DashedLine.

    • Added CommandBuilder.DashedPolyline.

  • 1.7.0 (2023-10-17)

    • Added a much more ergonomic way to draw using 2D coordinates. Take a look at Drawing in 2D for more info.

    • Deprecated several methods like Draw.CircleXY and Draw.CircleXZ to instead use the new 2D methods (Draw.xy.Circle and Draw.xz.Circle). The old ones will continue to work for the time being, but they will be removed in a future update.

    • Removed some shader code which was not supported on WebGL.

    • Added CommandBuilder2D.WirePill

    • Added CommandBuilder.SolidTriangle

    • Added an overload of Draw.Polyline which takes an IReadOnlyList<T>.

    • Added CommandBuilder.PolylineWithSymbol

    • Added an overload of CommandBuilder.WireMesh that takes a NativeArray with vertices, and one with triangles.

    • Improved look of Draw.ArrowheadArc when using a line width greater than 1.

    • Improved performance when there are lots of objects in the scene inheriting from MonoBehaviourGizmos.

    • Significantly reduced main-thread load when drawing in many situations by improving the Color to Color32 conversion performance. Turns out Unity's built-in one is not the fastest. In Burst I've cranked it up even more by using a SIMDed conversion function. Common improvements are around 10% faster, but in tight loops it can be up to 50% faster.

    • Improved performance of Draw.WireBox.

    • Improved performance of drawing circles and arcs.

    • Fixed name collision when both the A* Pathfinding Project and ALINE were installed in a project. This could cause the warning "There are 2 settings providers with the same name Project/ALINE." to be logged to the console.

    • Fixed Draw.WireBox reserving the wrong amount of memory, which could lead to an exception being thrown.

    • Fixed lines would be drawn slightly incorrectly at very shallow camera angles.

    • Fixed a memory leak which could happen if the game was not running, and the scene view was not being re-rendered, and a script was queuing drawing commands from an editor script repeatedly. Drawing commands will now get discarded after 10 seconds if no rendering happens to avoid leaking memory indefinitely.

    • Fixed a memory leak which could happen if the game was not running in the editor, and no cameras were being rendered (e.g. on a server).

    • Fixed shader compilation errors when deploying for PlayStation 5.

    • Fixed circles with a normal of exactly (0,-1,0) would not be rendered.

    • Changed RedrawScope to continue drawing items until it is disposed, instead of requiring one to call the scope.Draw method every frame.

    • Allow a RedrawScope to be stored in unmanaged ECS components and systems.

    • Fixed Draw.Arrow would draw a slightly narrower arrow head when the line was pointed in certain directions.

    • Added an overload for 3x3 matrices: Draw.WithMatrix(float3x3).

    • Changed the behaviour for RedrawScopes. Previously they would continue drawing as long as you called RedrawScope.Draw every frame. Now they will continue drawing until you dispose them. This makes them just nicer to use for most cases. This is a breaking change, but since RedrawSopes have so far been a completely undocumented feature, I expect that no, or very few people, use them.

    • Fixed compatibility with XBox.

    • Fixed only the base camera in a camera stack would render gizmos.

  • 1.6.4 (2022-09-17)

    • CommandBuilder.DisposeAfter will now block on the given dependency before rendering the current frame by default. This reduces the risk of flickering when using ECS systems as they may otherwise not have completed their work before the frame is rendered. You can pass AllowedDelay.Infinite to disable this behavior for long-running jobs.

    • Fixed recent regression causing drawing to fail in standalone builds.

  • 1.6.3 (2022-09-15)

  • 1.6.2 (2022-09-05)

    • Fix typo causing prefabs to always be drawn in the scene view in Unity versions earlier than 2022.1, even if they were not even added to the scene.

  • 1.6.1 (2022-08-31)

    • Fix vertex buffers not getting resized correctly. This could cause exceptions to be logged sometimes. Regression in 1.6.

  • 1.6 (2022-08-27)

    • Fixed documentation and changelog URLs in the package manager.

    • Fixed dragging a prefab into the scene view would instantiate it, but gizmos for scripts attached to it would not work.

    • Fixed some edge cases in Draw.WireCapsule and Draw.WireCapsule which could cause NaNs and other subtle errors.

    • Improved compatibility with WebGL as well as Intel GPUs on Mac.

    • Added warning when using HDRP and custom passes are disabled.

    • Improved performance of watching for destroyed objects.

    • Reduced overhead when having lots of objects inheriting from MonoBehaviourGizmos.

    • It's now possible to enable/disable gizmos for component types via the Unity Scene View Gizmos menu when using render pipelines in Unity 2022.1+. In earlier versions of Unity, a limited API made this impossible.

    • Made it possible to adjust the global opacity of gizmos in the Unity Project Settings.

  • 1.5.3 (2022-05-14)

    • Breaking changes

      • The minimum supported Unity version is now 2020.3.

    • The URP 2D renderer now has support for all features required by ALINE. So the warning about it not being supported has been removed.

    • Fixed windows newlines (\n\r) would show up as a newline and a question mark instead of just a newline.

    • Fixed compilation errors when using the Unity.Collections package between version 0.8 and 0.11.

    • Improved performance in some edge cases.

    • Fixed Draw.SolidMesh with a non-white color could affect the color of unrelated rendered lines. Thanks Chris for finding and reporting the bug.

    • Fixed an exception could be logged when drawing circles with a zero or negative line width.

    • Fixed various compilation errors that could show up when using newer versions of the burst package.

  • 1.5.2 (2021-11-09)

    • Fix gizmos would not show up until you selected the camera if you had just switched to the universal render pipeline.

    • Improved performance of drawing lines by more efficiently sending the data to the shader. This has the downside that shader target 4.5 is now required. I don't think this should be a big deal nowadays, but let me know if things don't work on your platform. This was originally introduced in 1.5.0, but reverted in 1.5.1 due to some compatibility issues causing rendering to fail for some project configurations. I think those issues should be resolved now.

  • 1.5.1 (2021-10-28)

    • Reverted "Improved performance of drawing lines by more efficiently sending the data to the shader." from 1.5.0. It turns out this caused issues for some users and could result in gizmos not showing at all. I'll try to figure out a solution and bring the performance improvements back.

  • 1.5 (2021-10-27)

    • Added support FixedStrings in Draw.Label2D(float3,FixedString32Bytes,float), which means it can be used inside burst jobs (C# managed strings cannot be used in burst jobs).

    • Fixed a 'NativeArray has not been disposed' error message that could show up if the whole project's assets were re-imported.

    • Added Draw.SolidCircle.

    • Added Draw.SolidCircleXZ.

    • Added Draw.SolidArc.

    • Added Draw.Label3D

    • Improved performance of Draw.WirePlane and Draw.WireRectangle by making them primitives instead of just calling Draw.Line 4 times.

    • Improved performance in general by more efficiently re-using existing vertex buffers.

    • Fixed some warnings related to ENABLE_UNITY_COLLECTIONS_CHECKS which burst would log when building a standalone player.

    • Changed more functions in the Draw class to take a Unity.Mathematics.quaternion instead of a UnityEngine.Quaternion. Implicit conversions exist in both directions, so there is no need to change your code.

  • 1.4.3 (2021-09-04)

    • Fixed some debug printout had been included by mistake. A "Disposing" message could sometimes show up in the console.

  • 1.4.2 (2021-08-22)

  • 1.4.1 (2021-02-28)

    • Added CommandBuilder.DisposeAfter to dispose a command builder after a job has completed.

    • Fixed gizmos would be rendered for other objects when the scene view was in prefab isolation mode. Now they will be hidden, which matches what Unity does.

    • Fixed a deprecation warning when unity the HDRP package version 9.0 or higher.

    • Improved docs for RedrawScope.

    • Fixed documentation for scopes (e.g. Draw.WithColor) would show up as missing in the online documentation.

  • 1.4 (2021-01-27)

    • Breaking changes

      • Draw.WireCapsule(float3,float3,float) with the bottom/top parameterization was incorrect and the behavior did not match the documentation for it. This method has been changed so that it now matches the documentation as this was the intended behavior all along. The documentation and parameter names have also been clarified.

    • Added Draw.SolidRectangle(Rect).

    • Fixed Draw.SolidBox(float3,quaternion,float3) and Draw.WireBox(float3,quaternion,float3) rendered a box that was offset by 0.5 times the size of the box. This bug only applied to the overload with a rotation, not for example to Draw.SolidBox(float3,float3).

    • Fixed Draw.SolidMesh would always be rendered at the world origin with a white color. Now it picks up matrices and colors properly.

    • Fixed a bug which could cause a greyed out object called 'RetainedGizmos' to appear in the scene hierarchy.

    • Fixed some overloads of WireCylinder, WireCapsule, WireBox and SolidBox throwing errors when you tried to use them in a Burst job.

    • Improved compatibility with some older versions of the Universal Render Pipeline.

  • 1.3.1 (2020-10-10)

    • Improved performance in standalone builds by more aggressively compiling out drawing commands that would never render anything anyway.

    • Reduced overhead in some cases, in particular when nothing is being rendered.

  • 1.3 (2020-09-12)

    • Added support for line widths. See Draw.WithLineWidth.

    • Added warning message when using the Experimental URP 2D Renderer. The URP 2D renderer unfortunately does not have enough features yet to be able to support ALINE. It doesn't have an extensible post processing system. The 2D renderer will be supported as soon as it is technically possible.

    • Fixed Draw.SolidPlane(float3,float3,float2) and Draw.WirePlane(float3,float3,float2) not working for all normals.

    • Fixed the culling bounding box for text and lines could be calculated incorrectly if text labels were used. This could result in text and lines randomly disappearing when the camera was looking in particular directions.

    • Renamed Draw.PushPersist and Draw.PopPersist to Draw.PushDuration and Draw.PopDuration for consistency with the Draw.WithDuration scope. The previous names will still work, but they are marked as deprecated.

    • Known bugs

      • Draw.SolidMesh(Mesh) does not respect matrices and will always be drawn with the pivot at the world origin.

  • 1.2.3 (2020-07-26)

    • Fixed solid drawing not working when using VR rendering.

    • Fixed nothing was visible when using the Universal Render Pipeline and post processing was enabled. Note that ALINE will render before post processing effects when using the URP. This is because as far as I can tell the Universal Render Pipeline does not expose any way to render objects after post processing effects because it renders to hidden textures that custom passes cannot access.

    • Fixed drawing sometimes not working when using the High Definition Render Pipeline. In contrast to the URP, ALINE can actually render after post processing effects with the HDRP since it has a nicer API. So it does that.

    • Known bugs

      • Draw.SolidMesh(Mesh) does not respect matrices and will always be drawn with the pivot at the world origin.

  • 1.2.2 (2020-07-11)

    • Added Draw.Arc(float3,float3,float3).

    • Fixed drawing sometimes not working when using the Universal Render Pipeline, in particular when either HDR or anti-aliasing was enabled.

    • Fixed drawing not working when using VR rendering.

    • Hopefully fixed the issue that could sometimes cause "The ALINE package installation seems to be corrupt. Try reinstalling the package." to be logged when first installing the package (even though the package wasn't corrupt at all).

    • Incremented required burst package version from 1.3.0-preview.7 to 1.3.0.

    • Fixed the offline documentation showing the wrong page instead of the get started guide.

  • 1.2.1 (2020-06-21)

    • Breaking changes

      • Changed the size parameter of Draw.WireRect to be a float2 instead of a float3. It made no sense for it to be a float3 since a rectangle is two-dimensional. The y coordinate of the parameter was never used.

    • Added Draw.WirePlane.

    • Added Draw.SolidPlane.

    • Added Draw.PlaneWithNormal.

    • Fixed Drawing.DrawingUtilities class missed an access modifier. Now all methods are properly public and can be accessed without any issues.

    • Fixed an error could be logged after using the WireMesh method and then exiting/entering play mode.

    • Fixed Draw.Arrow not drawing the arrowhead properly when the arrow's direction was a multiple of (0,1,0).

  • 1.2 (2020-05-22)

    • Added page showing some advanced usages: Advanced usage.

    • Added Draw.WireMesh.

    • Added CommandBuilder.cameraTargets.

    • The WithDuration scope can now be used even outside of play mode. Outside of play mode it will use Time.realtimeSinceStartup to measure the duration.

    • The WithDuration scope can now be used inside burst jobs and on different threads.

    • Fixed WireCylinder and WireCapsule logging a warning if the normalized direction from the start to the end was exactly (1,1,1).normalized. Thanks Billy Attaway for reporting this.

    • Fixed the documentation showing the wrong namespace for classes. It listed Pathfinding.Drawing but the correct namespace is just Drawing.

  • 1.1.1 (2020-05-04)

    • Breaking changes

      • The vertical alignment of Label2D has changed slightly. Previously the Top and Center alignments were a bit off from the actual top/center.

    • Fixed conflicting assembly names when used in a project that also has the A* Pathfinding Project package installed.

    • Fixed a crash when running on iOS.

    • Improved alignment of Draw.Label2D when using the Top or Center alignment.

  • 1.1 (2020-04-20)

    • Added Draw.Label2D which allows you to easily render text from your code. It uses a signed distance field font renderer which allows you to render crisp text even at high resolution. At very small font sizes it falls back to a regular font texture.

    • Improved performance of drawing lines by about 5%.

    • Fixed a potential crash after calling the Draw.Line(Vector3,Vector3,Color) method.

  • 1.0.2 (2020-04-09)

    • Breaking changes

      • A few breaking changes may be done as the package matures. I strive to keep these to as few as possible, while still not sacrificing good API design.

      • Changed the behaviour of Draw.Arrow to use an absolute size head. This behaviour is probably the desired one more often when one wants to explicitly set the size. The default Draw.Arrow(float3,float3) function which does not take a size parameter continues to use a relative head size of 20% of the length of the arrow.

    • Added Draw.ArrowRelativeSizeHead which uses a relative size head.

    • Added DrawingManager.GetBuilder instead of the unnecessarily convoluted DrawingManager.instance.gizmos.GetBuilder.

    • Added Draw.CatmullRom for drawing a smooth curve through a list of points.

    • Made it easier to draw things that are visible in standalone games. You can now use for example Draw.ingame.WireBox(Vector3.zero, Vector3.one) instead of having to create a custom command builder. See Drawing in a game for more details.

  • 1.0.1 (2020-04-06)

    • Fix burst example scene not having using burst enabled (so it was much slower than it should have been).

    • Fix text color in the SceneEditor example scene was so dark it was hard to read.

    • Various minor documentation fixes.

  • 1.0 (2020-04-05)

    • Initial release