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

◆ ExistsFor< TService >() [2/3]

static bool Sisus.Init.Service.ExistsFor< TService > ( [DisallowNull] Component client)
static

Gets a value indicating whether service of type TService is available for the client .

The service can be a local service registered using a ServiceTag or a Services component in an active scene, or a global service registered using a ServiceAttribute or manually.

This method can only be called from the main thread.

Template Parameters
TServiceThe defining type of the service.
Parameters
clientThe client that needs the service.
Returns
true if service is available for the client; otherwise, false.