Local Services

  8. Reference No Comments

Services that can be registered for clients in Init(args) can be split into two categories: local and global services.

A local service, is a service that is only available to select clients, depending on their location in scene hierarchies relative to the service.

Local services can be registered in the following ways:

  1. By attaching the Service Tag to a component and setting Availability to something besides Everywhere.
  2. By dragging a component or a scriptable object into a Services component and setting For Clients to something besides Everywhere.

Plain old C# objects (non-components) can be registered as local services in the following ways:

  1. By attaching the Service Tag to a Wrapper that wraps the object and setting Availability to something besides Everywhere.
  2. By dragging a Value Provider that returns the object into a Services component and setting For Clients to something besides Everywhere.

Leave a Reply

Your email address will not be published. Required fields are marked *