Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ Get< TService >()

static TService Sisus.Init.Service.Get< TService > ( )
static

Gets service of type TService for any client.

The service can be retrieved from Services components in the active scenes, or failing that, from the globally shared Service<TService>.Instance.

This method can only be called from the main thread.

Template Parameters
TServiceThe defining type of the service.
Returns
Service of type TService .
Exceptions
NullReferenceExceptionThrown if no service of type TService is found that is globally accessible to any client.