Releases: druhasu/UnrealDI
Version 3.2.5
Version 3.2.4
Summary
- Fixed incorrect Outer for new Object if it was registered in Parent container, but resolved from Nested
Version 3.2.3
Summary
- Added support for Unreal 5.5
- Fixed redundant code regeneration when any header changed (even unrelated)
Version 3.2.2
Summary
- Fixed compilation error in generated code due to includes from modules with Public/Private layout
Version 3.2.1
Summary
- Fixed rare crash due to "use after free" of UObjectContainer::Registrations memory
- Fixed possible compilation error
Version 3.2.0
Summary
- Added option to customize which Outer is used for new Objects created by Container
- Changed how Name is chosen for new Objects
Set Outer for new Objects
Prior to this version Outer for all objects was either GameInstance or World owning the Container. Although this works in most cases, sometimes you may need different Outer. For example, you may want to create some services for each Player in multiplayer game. So PlayerController would be a better pick for their Outer.
Now you can manually specify which Outer to use when building Container:
FObjectContainerBuilder Builder;
Builder.SetOuterForNewObjects(SomeOuter);
// ... rest of configuration
UObjectContainer* Container = Builder.Build(); // or Builder.BuildNested()
Changes in naming of created objects
First object of each class created by Container will have the same name as its Class. This makes names of SingleInstance services stable for using over network.
Version 3.1.3
Summary
- Fixed PIE crash that could occur after compilation of a Blueprint class with InitDependencies node
Version 3.1.2
Summary
- Fixed InitDependencies Class filter not showing classes from project modules that are not Game modules
Version 3.1.1
Summary
- Fixed crash that could occur due to auto-registration of type in root Container
Version 3.1.0
Summary
- Added TryInitDependencies to Blueprints
- Added NoInitDependencies metadata
TryInitDependencies in Blueprints
You can now call TryInitDependencies from Blueprint classes to request dependencies from World-bound container.
This function works the same way as its C++ counterpart.
NoInitDependencies metadata
You can now exclude class from DI code generation with NoInitDependencies metadata:
UCLASS(meta = (NoInitDependencies))
class UMyClass : public UObject
{
// ...
};
This may be useful, if class contains methods with names similar to InitDependencies
, which do something different. In this case you will receive an error during code generation, preventing your code to compile. Adding this metadata skips those checks.