Skip to content

Releases: gustavopsantos/Reflex

8.1.0

07 Apr 22:45
Compare
Choose a tag to compare
  • Add support for multiple ProjectScope definitions
  • Add support to skip project scope by deactivating it

8.0.1

29 Mar 13:58
Compare
Choose a tag to compare
  • Adds missing namespace to Styles class, this class could easily conflict with other styles classes from other imported packages, solves #49

8.0.0

21 Mar 00:23
Compare
Choose a tag to compare
  • 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

03 Mar 15:36
9863390
Compare
Choose a tag to compare
  • Add public scene extension to get scene scope container to allow the following:
var foo = gameObject.scene.GetSceneContainer().Resolve<IFoo>();

7.0.0

08 Jan 11:40
Compare
Choose a tag to compare
  • 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, 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

06 Dec 13:08
Compare
Choose a tag to compare
  • 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

28 Sep 12:42
Compare
Choose a tag to compare
  • 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

12 Sep 11:58
Compare
Choose a tag to compare
  • Adds reflex debug symbol
  • Adds binding assignment call stack to debugger window

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

4.4.1

08 Aug 12:49
Compare
Choose a tag to compare
  • Exposes UnknownContractException

4.4.0

19 Jul 15:11
Compare
Choose a tag to compare
  • Removes unnecessary IInstaller::OnContainerBuilt callback

IInstaller::InstallBindings(ContainerDescriptor descriptor) already receives a ContainerDescriptor instance, you can just rely on that descriptor OnContainerBuilt event