Skip to content

System and Jobs Injections

Alex Silaev edited this page Jun 1, 2025 · 6 revisions

ME.BECS has systems injections which may be useful in jobs or systems.

Important

Only jobs in system methods will be affected by injections.
[InjectDeltaTime] may appear only once per job.

public struct MySystem : ISystem {
    // This link will be injected automatically without reflection
    public InjectSystem<OtherSystem> system1;
    // This link will be injected too even if it is a private
    public InjectSystem<OtherSystem> system2;

    public struct Job : ... {
        // This link will be injected automatically
        public InjectSystem<OtherSystem> system1;
        // This field will be injected too even if it is a private
        private InjectSystem<OtherSystem> system2;
        // Injected deltaTime in ms
        [InjectDeltaTime] public uint deltaTimeMs;
        // Injected deltaTime in seconds (tfloat may be float or sfloat)
        [InjectDeltaTime] public tfloat deltaTime;
    }
}
Clone this wiki locally