The tool also enables the user to quickly select GameObjects that own the collision geometry, for further inspection or changes. It can also highlight simulating Rigidbodies for debugging physics performance issues.
Please give this Editor build a try, explore your scenes and let us know what you find useful and what needs improving. The build is based on Unity 5.3.4p4, so it should be stable for most users. We don’t know yet when it will be a part of an official Unity release, but once ready, we think we have a good chance of backporting it to older Unity versions as well.
The view mode can be considered light version of the PhysX Visual Debugger (PVD) with added advantage of being able to select GameObjects and Assets directly inside Unity. Ease-of-use was our primary motivation for making the view mode. PVD can be tricky to work with because it is a separate application with different UI/UX conventions. Some versions of PVD also has performance issues with large terrains, which prohibits responsive navigation.
public class PhysicsVisualizationSettings { public static void Reset (); // properties public static bool showCollisionGeometry; public static bool enableMouseSelect; public static bool useSceneCam; public static float viewDistance; public static int terrainTilesMax; public static bool forceOverdraw; public static bool showStaticColliders; public static bool showTriggers; public static bool showRigidbodies; public static Color staticColor; public static Color rigidbodyColor; public static Color kinematicColor; public static float baseAlpha; // (1 - transparency) public static bool devOptions; public static int dirtyCount; public static bool GetShowCollisionLayer (int layer); public static void SetShowCollisionLayer (int layer, bool show); public static void UpdateMouseHighlight (Vector2 pos); public static void ClearMouseHighlight (); public static bool HasMouseHighlight (); } |