Box3D-powered rigid body physics for Unity. Works with plain GameObjects and with DOTS, allocates zero GC per step and steps 5,000 boxes in 1.63 ms against 4.82 ms for PhysX.Anvil renders nothing: no shaders, no materials, no render pipeline references in the runtime code. Built-in, URP and HDRP were all run with the shipped package, and sample materials pick the matching Lit shader by themselves. Only the DOTS sample scene needs more: Entities, Entities Graphics (URP or HDRP) and the Input System.Anvil Physics brings the Box3D solver to Unity as a first-class citizen: one native core, two APIs, and the same deterministic result on every run.Use it the way your project is built. Drop AnvilBody onto a GameObject and it behaves like a rigid body you already know. Or go wide with DOTS and drive tens of thousands of bodies from Burst-compiled systems. Both paths share the same solver, the same settings asset and the same debugging tools, so a prototype built on GameObjects does not have to be rewritten when it grows into an ECS project.WHY IT IS FASTThe solver is native C, stepped through Unity's job system with a worker count that matches your machine. Nothing is allocated on the managed heap during a step, so there is no garbage collection spike in the middle of gameplay. Bodies that stop moving go to sleep and stop costing anything at all.Measured on a Ryzen 7 7700X (16 cores), Unity 6000.5.2f1, 600 steps after 60 warm-up steps, identical seed, identical 1/60 time step, 4 sub-steps, rendering disabled:5,000 falling boxes, median step timeAnvil (DOTS): 1.63 msAnvil (GameObjects): 1.97 msUnity Physics: 4.59 msBuilt-in PhysX: 4.82 ms1,000 falling boxes, median step timeAnvil (DOTS): 0.53 msAnvil (GameObjects): 0.60 msBuilt-in PhysX: 0.78 msUnity Physics: 1.22 msManaged allocations per step: 0 bytes for every engine above.These are medians, and that choice matters. Anvil puts a settled pile to sleep, so a third of the samples in a 600-step run cost almost nothing; averaging them would flatter us. On the same runs the mean for Anvil is 1.22 ms where the median is 1.63 ms, while for Unity Physics the two barely differ. Quoting the mean would buy us a "4x faster" headline that your own measurement would not reproduce.By the median, at 5,000 boxes the DOTS path is 2.9x faster than built-in PhysX and 2.8x faster than Unity Physics; the GameObject path is 2.5x and 2.3x. Sleeping is then a separate win on top of the raw speed: after 394 steps the Anvil pile costs nothing at all, while Unity Physics was still simulating every box and PhysX still had 4,823 of them awake.At 20,000 boxes the same test gives 7.99 ms on the DOTS path and 9.73 ms on GameObjects, against 17.75 ms for Unity Physics and 23.40 ms for built-in PhysX.The benchmark that produced these numbers ships with the package, so you can reproduce them on your own hardware instead of taking our word for it. Run Tools > Anvil > Benchmarks, pick the engines and body counts, and the results land in a CSV and a JSON file with your CPU, GPU and Unity version recorded in the header, alongside the seed, the fixed step and the sub-step count, so a run can be compared against another.WHAT YOU GETRigid bodies with box, sphere, capsule, convex hull, mesh and height-field shapes. Joints. Sensors and trigger events. Ray, shape and overlap queries callable from Burst jobs. Contact events carrying impulse and normal, so hit reactions and audio can respond to how hard something actually landed. Debris helpers and explosion impulses for destruction. A collision layer matrix that reads like Unity's own. Wind: one wind velocity on the world, and only the bodies you opt in feel it, so leaves and debris move in a storm while crates and dropped loot stay exactly where they are.COMING FROM PHYSX AND UNITY PHYSICSTwo converters, one for each engine you might be leaving. Window > Anvil > Convert PhysX to Anvil scans a scene or a selection, lists every body it can convert, and replaces it with an Anvil body in one undoable step. Motion type, mass, gravity, both damping values, constraints, interpolation, collision layer, trigger flag and physics material are carried over. Anything it cannot convert is listed with the reason instead of being silently skipped, so a compound collider or a joint never turns into a half-migrated body you find out about at runtime.Window > Anvil > Convert Unity Physics to Anvil does the same for DOTS projects built on PhysicsBodyAuthoring and PhysicsShapeAuthoring, carrying over motion type, mass, gravity factor, both damping values, smoothing, friction and restitution (including values inherited from a material template), the collision-response flag and the belongs-to layer. Shapes it cannot represent, a capsule that does not run along Y, a compound, a body another joint depends on, are refused by name rather than half-converted.Mass survives the trip exactly in both converters, boxes, spheres, capsules and convex hulls alike: density is fitted to the shape, and the resulting body mass is then pinned to the source value, so a 7.5 kg crate is still 7.5 kg after conversion. Density continues to drive how the inertia is distributed, which is what you want when the hull the solver cooks is not the mesh you handed it.DETERMINISMSame input, same result, on the same build and the same platform. The recording API captures a session and replays it, which turns a physics bug from an anecdote into something you can step through.SUPPORTQuestions and bug reports go to our Discord, where fixes are discussed in the open and ship in the next version on the Asset Store. The package tells you in the editor when a newer version is available. Buyers who verify their invoice number on the Discord server get a channel where fixes are discussed and tested before they are published; the package itself never checks a licence, never phones home for permission to run, and works fully offline.The manual and the twelve guides are in English, Simplified Chinese, Japanese and Korean, both inside the package and on the documentation site. The generated API reference, the editor UI and support are in English.CREDITSThe solver is Box3D by Erin Catto, the author of Box2D, used under the MIT licence and redistributed in binary form inside the native plugin: https://github.com/erincatto/box3dAnvil is the Unity side of it - the C# facade, the GameObject and DOTS APIs, baking, editor tooling, converters, tests and documentation. Full notices ship in THIRD PARTY NOTICES.md.REQUIREMENTSUnity 6000.5 or newer (developed and tested on 6000.5.2f1)Windows 64-bit and Linux 64-bit in the editor and in players; Android arm64-v8a and WebGL in playersMono and IL2CPP scripting backends, both verified on Windows (IL2CPP tested with MSVC 14.51)The DOTS path additionally needs com.unity.entities 1.x. The GameObject path needs no extra packages.The DOTS sample scene also needs Entities Graphics, the Input System and URP; without them the sample compiles out on its own and the rest of the package is unaffected.WHAT IS IN THE PACKAGENative Box3D solver, prebuilt for Windows x64, Linux x86_64, Android arm64-v8a and WebGLGameObject API: AnvilPhysicsWorld, AnvilBody, shapes, joints, sensors, contact and sensor events, raycast and overlap that hand you back the component you hitDOTS API: baking, world lifecycle, Burst-compiled stepping, singleton access to world and shape lookupQueries: raycast, shape cast, overlap, with layer filtering, callable from Burst jobsBody state as components, so velocity, sleep state, mass and centre of mass can be read from a Burst-compiled job without calling into the native libraryDriving bodies from components: continuous forces and torque, impulses, kinematic targets that carry what stands on them, axis locks, enable and wake commands, mass overrides, radial explosionsContact and trigger events with impulse and normal dataWind: a single wind velocity on the world plus an opt-in response component per body, with its own drag, lift, speed cap and per-body scale. Bodies that do not opt in are never touched by wind.Several shapes on one body, each with its own offset, rotation and material, so a concave moving object is one rigid body instead of several tied by jointsSeven joint types with limits, springs, motors and break thresholds, readable joint angle and loadCharacter controller with step handling, depenetration and moving-platform supportPhysX and Unity Physics conversion windows, settings asset, layer matrix editor, debug drawing, world inspectorRecording and replay API for reproducible sessionsBenchmark suite with CSV and JSON reports (Tools > Anvil > Benchmarks)358 EditMode tests and 8 PlayMode tests covering solver bindings, baking, joints, sensors, queries, multi-shape bodies, wind, the geometry cache, Burst compatibility and both converters. The 34 Unity Physics converter tests skip themselves unless the Custom Physics Authoring sample is installed, so they never fail on a project that does not use Unity Physics.Full C# source for the managed layer. The Box3D core ships as a prebuilt native library.Documentation for everything above, inside the package: a manual as HTML and PDF, twelve guides (getting started, shapes, joints, events, performance, platforms, debugging, samples, migration, updates, FAQ and a generated API reference) covering every public declaration in the managed layer. Nothing is documented online only.The manual and all twelve guides in Simplified Chinese, Japanese and Korean as well as English, in the package and on the documentation site. The API reference is generated from the source signatures and stays in English, as do the editor UI and support.PERFORMANCEZero managed allocations per simulation step on both pathsWorker count follows Unity's job worker count by default; can be pinned or forced single-threadedSleeping is on by default, so a settled pile costs nothingSub-step count, contact stiffness, damping and restitution threshold are exposed in the settings assetLIMITATIONSThis is a rigid body solver. Soft bodies, cloth and fluids are out of scope, and Unity's own Cloth component keeps working next to it.Triangle meshes and height fields collide as static geometry, the same rule Unity applies to a MeshCollider without Convex ticked. Moving bodies use convex hulls, and a concave moving object is built from several shapes on one body.Determinism holds for the same build on the same platform, not across CPU architecturesmacOS, iOS and console platforms are not supported. Android ships arm64-v8a only: Unity 6000.5 removed the x86_64 Android target and ARMv7 is not built. WebGL runs on a single worker, because a stock Unity WebGL build has no worker threads.Wind costs about 0.29 microseconds per awake responder per step, so it is the one feature whose bill grows with the number of bodies using it. A sleeping responder is free, and a sphere or capsule costs roughly a fifth of a box.AI assistance was used in three clearly separated places, and in none of them does it end up inside the shipped runtime.Code and documentation. An AI coding assistant (Claude) was used as a pair-programming tool while writing the managed C# layer, the editor tooling and the tests, and while drafting the written documentation. Every line was read, edited and accepted by a human before it shipped. The package is covered by 358 automated EditMode tests that run against the real native solver, so the behaviour is verified by execution rather than by trust. The Simplified Chinese, Japanese and Korean versions of the manual and the guides were produced by the same assistant from the English source and reviewed before publication. The English text is the original and remains the reference; type and member names, Unity terms and code samples are identical in every language.Store presentation images. The cover and card art were composed with the help of a locally run image generation model. Every gameplay screenshot, GIF and the trailer are direct captures of the sample scenes running in Unity - no generated imagery, no reconstructed UI, no upscaled fakes.Nothing else. The physics solver is Box3D by Erin Catto (MIT), human-written C. No AI/ML model is embedded in the package, none is called at runtime or at import time, and the package makes no network requests other than an optional, opt-in version check the user can disable.




