update readme

This commit is contained in:
Mikhail 2026-03-29 18:07:44 +08:00
parent b326398e00
commit 8471b50c0f
2 changed files with 13 additions and 1 deletions

View File

@ -222,6 +222,7 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
</details>
</br>
# Не null инъекции
@ -232,3 +233,8 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
> Переданный тип должен иметь конструктор без параметров и быть либо того же типа, что и поле, либо производным от него.
Расширение также сообщит, если после завершения предварительной инъекции остались непроинициализированные поля с атрибутом `[DI]`.
</br>
# Лицензия
MIT Лицензия: [Открыть](LICENSE.md)

View File

@ -225,10 +225,16 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
</details>
</br>
# Non-null injections
To ensure a field marked with `[DI]` is initialized even if injection does not occur, pass a fallback type to the attribute constructor. In the example below the field `Foo` will receive the injected `Foo` instance or an instance of `FooDummy : Foo` if injection was not performed.
> The provided type must have a parameterless constructor and be either the same type as the field or derived from it.
The extension will also report if any `[DI]`-marked fields remain uninitialized after the pre-injection phase.
The extension will also report if any `[DI]`-marked fields remain uninitialized after the pre-injection phase.
</br>
# License
The MIT License: [Open](LICENSE.md)