Category : 5. Services

Services Component Another way to define scene services is through using the Services component. Start by adding the Services component to a GameObject in the scene and adding a new entry to its Provides Services list. Then drag the component you want to define as a Service to this list. If you drag a GameObject ..

Read more

Defining a Local Service In addition to global services – which are guaranteed to be available to all clients for the entire lifetime of the application – Init(args) also supports defining local services using the Service Tag feature. Local services live as part of scene and prefab assets, and can have a more limited lifespan ..

Read more

Opening The Service Debugger Window You can open the Service Debugger Window using the main menu item Window > Analysis > Service Debugger. Using The Service Debugger Window The window lists all currently active services, which have been registered via ServiceAttributes, Service Tags and Services Components. The first name shown in the list is the ..

Read more

Defining a Global Service You can define a global service in Init(args) by simply adding the [Service] attribute to any class: [Service] class GameManager { } This will instruct Init(args) to automatically create and cache a single instance of the the class when the project starts. Ready-To-Use Before Scene Load All global services are constructed ..

Read more