Services Component The Services component can be used to register asset and scene based services. To do so, first attach the Services component to a GameObject and add a new entry to its Provides Services list. Then drag the Object you want to register as a Service into the empty slot in the list. If ..
Category : 5. Services
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 ..
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 ..
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 ..