Interface IServerComponent<TNetworkManager, TServerManager, TConnection, TServerComponent>
Generic interface for server components that require initialization and lifecycle management. This is the base interface for all server components including behaviours and data containers.
public interface IServerComponent<TNetworkManager, TServerManager, TConnection, TServerComponent> : IServerComponent where TServerComponent : IServerComponent
Type Parameters
TNetworkManagerThe concrete network manager or wrapper type exposed by the server.
TServerManagerThe concrete server manager type exposed by the server.
TConnectionThe transport's connection representation.
TServerComponentThe concrete server component type (for type safety).
Properties
Initialized
Indicates whether this component has been initialized by the server runtime.
bool Initialized { get; }
Property Value
Server
Reference to the server instance associated with this component.
IServer<TNetworkManager, TConnection, TServerComponent> Server { get; }
Property Value
- IServer<TNetworkManager, TConnection, TServerComponent>
ServerManager
Reference to the server manager instance associated with this component.
TServerManager ServerManager { get; }
Property Value
- TServerManager
Methods
Deinitialize()
Called when the component is being deinitialized. Implementers should release resources and unregister any external callbacks here.
void Deinitialize()
InitializeOnce()
Called once by the server runtime to initialize the component. Implementers should perform one-time setup here. This method is guaranteed to be invoked at most once per component instance.
ServerComponentInitializationStatus InitializeOnce()