Skip to content

rossogames/Rossoforge-Services

Repository files navigation

Rosso Games

Rossoforge

Rossoforge-Service

Rossoforge-Service is a lightweight and thread-safe Service Locator designed for Unity.
It provides a centralized way to register, retrieve, and manage services at runtime without relying on static singletons.

Version: Unity 6 or higher

Tutorial: https://youtu.be/iMHBhLSjnYc (Spanish)

Dependencies:

With this package, you can:

  • Register and retrieve services by interface using a clean API.
  • Automatically initialize services that implement IInitializable.
  • Dispose of services gracefully when unregistered.
  • Use a thread-safe DefaultServiceLocator implementation.

// Setup
var locator = new DefaultServiceLocator();
locator.Register<IMyService>(new MyService());
locator.Initialize();
ServiceLocator.SetLocator(locator);

// Anywhere in your code
var myService = ServiceLocator.Get<IMyService>();

This package is part of the Rossoforge suite, designed to streamline and enhance Unity development workflows.

Developed by Agustin Rosso https://www.linkedin.com/in/rossoagustin/

About

A lightweight and thread-safe Service Locator designed for Unity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages