Skip to content

PhysicsServiceCollectionExtensions.AddPhysicsCore(this IServiceCollection) Method

Definition

Namespace: Brine2D.Physics

Registers Box2D physics services unconditionally so PhysicsWorld and the default Box2DPhysicsSystem are always resolvable, even when AddPhysics\(this IServiceCollection, Action<PhysicsOptions>\) is never called. Box2D ships as part of core Brine2D \(not a separate optional assembly\), so gating registration behind an opt-in call only protected against nothing while causing a DI-resolution crash the first time a scene's default systems tried to construct Box2DPhysicsSystem. Called unconditionally from AddBrine2D.

C#
internal static void AddPhysicsCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services Microsoft.Extensions.DependencyInjection.IServiceCollection