All Projects → vertxxyz → Vertx.Debugging

vertxxyz / Vertx.Debugging

Licence: MIT license
Debugging Utilities for Unity

Programming Languages

C#
18002 projects
HLSL
714 projects
ShaderLab
938 projects

Projects that are alternatives of or similar to Vertx.Debugging

yii-debug
Yii debug panel extension
Stars: ✭ 23 (-86.06%)
Mutual labels:  debug
krumo
Krumo: Structured information display solution for PHP
Stars: ✭ 74 (-55.15%)
Mutual labels:  debug
bugsnag-vue
[DEPRECATED] This package now lives within the monorepo for our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 26 (-84.24%)
Mutual labels:  debug
flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+986.06%)
Mutual labels:  debug
SanSessionToolbar
⚡ Session Toolbar that can be applied into Zend/Laminas DeveloperTools
Stars: ✭ 39 (-76.36%)
Mutual labels:  debug
CVIP
C/C++/Golang/Linux...知识整理
Stars: ✭ 62 (-62.42%)
Mutual labels:  debug
ifto
A simple debugging module for AWS Lambda (λ) timeout
Stars: ✭ 72 (-56.36%)
Mutual labels:  debug
dwarf import
This loads DWARF info from an open binary and propagates function names, arguments, and type info
Stars: ✭ 18 (-89.09%)
Mutual labels:  debug
exe2hex
Inline file transfer using in-built Windows tools (DEBUG.exe or PowerShell).
Stars: ✭ 284 (+72.12%)
Mutual labels:  debug
RailLink
Compact isolated version of J-Link v9.
Stars: ✭ 69 (-58.18%)
Mutual labels:  debug
vudu
GUI based in-game debugging system for LÖVE
Stars: ✭ 21 (-87.27%)
Mutual labels:  debug
godump
Dumps information about a variable Like var_dump() in php.
Stars: ✭ 54 (-67.27%)
Mutual labels:  debug
debug
A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers
Stars: ✭ 10,554 (+6296.36%)
Mutual labels:  debug
Debuggery
A small plugin designed to expose API values at runtime.
Stars: ✭ 36 (-78.18%)
Mutual labels:  debug
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (-46.67%)
Mutual labels:  debug
eruda-webpack-plugin
A webpack plugin of eruda to help you develop mobile app
Stars: ✭ 56 (-66.06%)
Mutual labels:  debug
hilda
LLDB wrapped and empowered by iPython's features
Stars: ✭ 99 (-40%)
Mutual labels:  debug
finch
🖥 Debug menu library for Android apps with supports network activity logging and many other useful features.
Stars: ✭ 42 (-74.55%)
Mutual labels:  debug
DebugWindow
一个在真机上测试时方便查看输出日志的小工具。(A debug tool which helps you view the console logs on the device when you test you APP.)
Stars: ✭ 36 (-78.18%)
Mutual labels:  debug
bugsnag-java
Bugsnag error reporting for Java.
Stars: ✭ 51 (-69.09%)
Mutual labels:  debug

Fast editor debugging and gizmo utilities for Unity.
Uses instanced rendering to draw shapes efficiently.

Note
Unity 2019.4+
Should support all render pipelines.
Debugging from jobs and builds is not supported, I recommend Aline if you need that functionality.

vertx_debugging.mp4

Usage

Shape drawing

Example

// Draw a sphere with the specified color.
D.raw(new Shape.Sphere(position, radius), color, duration);

// Draw green sphere if nothing was hit,
// or draw a red sphere if something was.
D.raw(new Shape.Sphere(position, radius), hit, duration);

// Casts draw in green, with red where hits were detected if no color is provided.
// Cast color and hit color can be overrided manually.
D.raw(new Shape.SphereCastAll(position, direction, radius, hits, hitCount, 10), duration);

You can call these methods from most places, Update, LateUpdate, FixedUpdate, OnDrawGizmos, and with ExecuteAlways/ExecuteInEditMode.
If drawn from a gizmo context, duration parameters will be ignored. Gizmos.matrix works, Gizmos.color is unsupported. Gizmos are not pickable.

Code stripping

Calls to these methods are stripped when building. You do not have to remove code or use defines.
If your code spans many statements, only the method call will be stripped.


Drawing Physics and Physics2D operations

Example

You can replace calls to Physics and Physics2D methods with DrawPhysics and DrawPhysics2D to simply draw the results of a physics operation.

int count = DrawPhysics.RaycastNonAlloc(r, results, distance);

Code stripping

The drawing within these methods will be stripped, and the original method is attempted to be inlined, but this is not consistent.
A single method call doesn't matter when compared to a physics operation, but you can completely strip these calls by instead declaring:

#if UNITY_EDITOR
using Physics = Vertx.Debugging.DrawPhysics;
#endif

Note
If you find you have rendering issues like upside-down depth testing, or artifacts in the game view: This is a Unity bug.
You can disable Depth Write and Depth Test in the problematic view using the settings in Project Settings > Vertx > Debugging.
If you're on a version of Unity where the settings UI doesn't work, it's another Unity bug, thanks Unity!

Shapes

Drawable shapes and casts are contained within the Shape class. Statically import the class if you use them often:

using static Vertx.Debugging.Shape;
Shape list

General

Name Description
Text A label in the scene at the provided position. (Text respects 3D gizmo fade distance)
ScreenText A label in the top left of the view.
Draws using an Overlay in the Scene view when available.

3D

Shapes

Name Description
Sphere
Hemisphere
Box
Capsule
Cylinder
3D shapes.
Arc An arc (using Angle1 to define its length).
SurfacePoint A ray with a circle to indicate the surface.
Point A point without a specified direction.
Axis An XYZ direction gizmo.
Arrow
ArrowStrip
An arrow vector, or a collection of points forming an arrow.
Line
LineStrip
A line, or a collection of points that make up a line.
DashedLine A dashed line.
HalfArrow An arrow with only one side of its head. Commonly used to represent the HalfEdge data structure.
Arrow2DFromNormal An 2D arrow aligned in 3D space using a normal vector perpendicular to the direction.
MeshNormals The normals of a mesh.
Ray A line from a position and a direction vector.
Ray (Built-in) Fallback to Ray.
Vector3 (Built-in) Fallback to Point.
RaycastHit (Built-in) Fallback to SurfacePoint.
Bounds (Built-in) Fallback to Box.
Collider (Built-in) Fallback to the correct shape matching the collider type (primitive colliders only).

Casts

Name Description
Raycast
Linecast
SphereCast
BoxCast
CapsuleCast
Using similar parameters as
Physics.Raycast
Physics.Linecast
Physics.SphereCast
Physics.BoxCast
Physics.CapsuleCast
with an optional RaycastHit result.

RaycastAll
SphereCastAll
BoxCastAll
CapsuleCastAll
RaycastHit[] results using similar parameters as
Physics.RaycastAll
Physics.SphereCastAll
Physics.BoxCastAll
Physics.CapsuleCastAll

2D

Shapes

Name Description
Circle2D
Box2D
Area2D
Capsule2D
Rect
2D shapes.
Arc2D An arc (using Angle1 to define its length).
Point2D A point without a specified direction.
Axis2D An XY direction gizmo.
Arrow2D
ArrowStrip2D
An arrow vector, or a collection of points forming an arrow.
Ray2D A line from a position and a direction vector.
Spiral2D A spiral, useful for visualising rotation on wheels.
Vector2 (Built-in) Fallback to Point2D.
RaycastHit2D (Built-in) Fallback to Ray.
Rect (Built-in) Fallback to Box2D.

Casts

Name Description
Raycast2D
Linecast2D
CircleCast2D
BoxCast2D
CapsuleCast2D
Using similar parameters as
Physics2D.Raycast
Physics2D.Linecast
Physics2D.SphereCast
Physics2D.BoxCast
Physics2D.CapsuleCast
with an optional RaycastHit2D result.

RaycastAll2D
CircleCastAll2D
BoxCastAll2D
CapsuleCastAll2D
RaycastHit2D[] results using similar parameters as
Physics2D.RaycastAll
Physics2D.SphereCastAll
Physics2D.BoxCastAll
Physics2D.CapsuleCastAll

Authoring new shapes

Extensions

The Shape class is partial. You can add IDrawable and IDrawableCast structs to the class, which will be compatible with D.raw<T>(T shape).
Use the CommandBuilder Append functions to create your own shapes, or combine other shapes by calling their Draw functions.


Components

Components to draw physics events and common object attributes.

Component list
Name Description
Debug Transform Draws up, right, forward axes of a Transform.
Debug Renderer Bounds Draws the bounds of a Renderer.
Debug Collider Bounds Draws the bounds of a Collider or Collider2D.
Debug Collision Events Draws OnCollisionEnter, Stay and Exit events.
Debug Trigger Events Draws OnTriggerEnter, Stay and Exit events.
Debug Mesh Normals Draws normals for a (read/write) Mesh.

Installation

openupm

Add the OpenUPM registry

  1. Open Edit/Project Settings/Package Manager
  2. Add a new Scoped Registry (or edit the existing OpenUPM entry):
    Name: OpenUPM
    URL:  https://package.openupm.com/
    Scope(s): com.vertx
    
  3. Save

Add the package

  1. Open the Package Manager via Window/Package Manager.
  2. Select the + from the top left of the window.
  3. Select Add package by Name or Add package from Git URL.
  4. Enter com.vertx.debugging.
  5. Select Add.

Note
This package will benefit from Burst, though it's an optional dependency.

ko-fi

Footnotes

  1. The helper class Angle is used to define angles, author it with the static methods like Angle.FromDegrees. 2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].