IParagonBehaviour
Core interface for all Paragon framework MonoBehaviours. Extends Unity's IMonoBehaviour with subsystem access and IDebugObject with debug toggling. This is the base contract that all Paragon behaviours implement, providing a uniform API for subsystem queries and debug infrastructure.
Definition
Namespace: Paragon Assembly: Paragon.dll
public interface IParagonBehaviour : IMonoBehaviour, IDebugObjectExtends:
IMonoBehaviour— Unity MonoBehaviour interface (coroutines, invoke, lifecycle)IDebugObject— Debug infrastructure (DebugEnabled,OnDebug())
Remarks
IParagonBehaviour sits at the root of the Paragon object model. Every concrete Paragon MonoBehaviour (via ParagonBehaviour) implements this interface, which provides two capabilities:
Subsystem access — The
Subsystemproperty exposes the behaviour's optional ParagonSubsystem container, which holds modular IParagonComponent instances. TheHasSubsystemproperty allows null-checking without accessing the subsystem directly.Debug infrastructure — Inherited from
IDebugObject, providing aDebugEnabledtoggle andOnDebug()callback used by the Paragon debug system.
Subsystem Ownership
The subsystem is optional — not all behaviours need modular components. HasSubsystem returns false when no subsystem has been created. Behaviours that use the component system should also implement IParagonSubsystem<TBehaviour> for type-safe access.
Quick Lookup
Check if behaviour has a subsystem
behaviour.HasSubsystem
Access the subsystem
behaviour.Subsystem
Check if debug is enabled
behaviour.DebugEnabled
Type-safe subsystem access
Cast to IParagonSubsystem<T> or use extension methods
Properties
Subsystem
The behaviour's ParagonSubsystem container, or null if none has been created.
HasSubsystem
Returns true if the behaviour has an initialized subsystem.
Implementation Requirements
When implementing IParagonBehaviour, you MUST:
Satisfy all
IMonoBehaviourrequirements (Unity MonoBehaviour members)Satisfy all
IDebugObjectrequirements (DebugEnabled,OnDebug())Provide a
Subsystemproperty (may returnnullif the behaviour does not use components)
In practice, always subclass ParagonBehaviour rather than implementing this interface directly. It provides the serialized subsystem field, debug registration, and Odin serialization support.
See Also
ParagonBehaviour — primary concrete implementation
IParagonSubsystem<TBehaviour> — extended interface for behaviours with type-safe subsystem access
IParagonComponent — components that attach to behaviours via the subsystem
ParagonSubsystem — the component container
Interfaces Overview — interface hierarchy overview
Last updated