Extensions

Extension methods for the Paragon Objects system. Provides convenience methods that delegate to the ParagonSubsystem API, allowing game code to call component operations directly on the behaviour without manually accessing the .Subsystem property.

Classes

Class
Description

Static extension methods for IParagonSubsystem<TBehaviour> — add, get, remove, and query components

Purpose

Without extensions:

behaviour.Subsystem.AddComponent(component);
behaviour.Subsystem.GetComponent<HealthComponent>();
behaviour.Subsystem.Initialize();

With extensions:

behaviour.AddSubcomponent(component);
behaviour.GetSubcomponent<Enemy, HealthComponent>();
behaviour.InitializeSubsystem();

The extensions use the prefix Subcomponent (rather than Component) to avoid collision with Unity's GetComponent<T>().

See Also

Last updated