Last updated: Sep 11, 2022

Introduction

The Service Locator class helps us keep track of all the IGameServices that we currently have running in the game. It also allows us to register, get or unregister any of them at any time, though all the registering is usually done by the Bootstraper when the application loads.

You can find the Service Locator script ****at this path: Assets\Infima Games\Low Poly Animated - Modern Guns\Demo\Code\Services\ServiceLocator.cs

Fields

Services. Dictionary containing all of the services currently registered in the game.

Methods

Initialize. Initializes the ServiceLocator Singleton.

Register. Registers a IGameService.

Unregister. Unregisters a IGameService.

Functions

Get. Gets the service instance of the given type.