Gustavopsantos Reflex Versions Save

Minimal dependency injection framework for Unity

8.1.1

2 weeks ago

8.1.0

1 month ago
  • Add support for multiple ProjectScope definitions
  • Add support to skip project scope by deactivating it

8.0.1

1 month ago

8.0.0

1 month ago
  • Changes unity injection strategy to inject dependencies before Awake, OnEnable and Start
  • Ensure circular dependencies throws StackOverflow in all resolve kind APIs

Make sure to read Reflex 8 Injection Strategy AND Reflex 8 Execution Order when upgrading from v7 to v8

7.1.0

2 months ago
  • Add public scene extension to get scene scope container to allow the following:
var foo = gameObject.scene.GetSceneContainer().Resolve<IFoo>();

7.0.0

4 months ago
  • Optmizes SceneInjector, SceneInjector::Inject is now 27% faster + no more generates garbage
  • Optmizes ProjectScope and SceneScope, no more generates garbage
  • Display readable generic names on ReflexDebuggerWindow object instances
  • Rename ResolverDescriptor to Binding (ResolverDescriptor was a bad name as it was not describing a resolver, but pairing a resolver to its contracts)
  • Rename ContainerDescriptor to ContainerBuilder
  • Moves container callsite registration to its ctor (clearer stack traces at debugger window)
  • Removes unnecessary clear references at ContainerBuilder::Build
  • Removes Container::Instantiate<T>, now you should instantiate using unity methods (it also works with addressables now) then, use GameObjectInjector methods to inject your newly instantiated unity object
  • ContainerBuilder::Scope no longer requires a name, you can opt-in to set a name using ContainerBuilder::SetName (however, highly recommended, helps a lot when debugging is required)
  • Add ContainerBuilder::SetName
  • Add ContainerBuilder::SetParent
  • Exposes ContainerBuilder::Parent getter
  • Exposes ContainerBuilder::Bindings list
  • Builtin Decoration support removed, it can be added later as a opt-in plugin
  • IStartable interface removed, eager services can be eagerly instantiated using containerBuilder.OnContainerBuilt, it can be added later as a opt-in plugin
  • Improved GarbageCollectorTests making it also work when incremental GC is enabled

6.0.0

5 months ago
  • Fix missing TestRunnerExtensions callback unsubscription
  • Fix log level not updating after changes in Editor
  • Standardized GarbageCollectionTests methodology
  • Transforms AddInstance to an AddSingleton overload (Both APIs has the same lifecycle, and AddInstance name was confusing as at first glance looks like its a transient)
  • Add AddSingleton overload that accepts a factory
  • Add AddTransient overload that accepts a factory
  • Add AddTransient overload that accepts a value
  • Add contract decoration support
  • Add Container build callstack and object creation callstack

Decoration support was inspired by https://github.com/khellang/Scrutor

5.0.0

7 months ago
  • Update ReflexDebuggerWindow refresh hooks
    • added auto refresh on SceneManager.sceneLoaded
    • added auto refresh on SceneManager.sceneUnloaded
  • Removed ReflexSceneManager::LoadScene API
  • Added new API ReflexSceneManager::PreInstallScene for pre installing scenes (Now it works for both scene loading kinds, legacy and addressables)

Pre Installing Legacy Scenes Deprecated/Removed

ReflexSceneManager.LoadScene("Session", LoadSceneMode.Single, descriptor => descriptor.AddInstance(42));

Pre Installing Legacy Scenes New Way

var scene = SceneManager.LoadScene("Session", new LoadSceneParameters(LoadSceneMode.Single));
ReflexSceneManager.PreInstallScene(scene, descriptor => descriptor.AddInstance(42));

Pre Installing Addressables Scenes

Addressables.LoadSceneAsync("Session", activateOnLoad: false).Completed += handle =>
{
	ReflexSceneManager.PreInstallScene(handle.Result.Scene, descriptor => descriptor.AddInstance(42));
	handle.Result.ActivateAsync();
};

4.5.0

8 months ago
  • Adds reflex debug symbol
  • Adds binding assignment call stack to debugger window

See https://github.com/gustavopsantos/Reflex#-debugger

4.4.1

9 months ago
  • Exposes UnknownContractException