Skip to content

Game.Tools.ToolReadyBarrier

Assembly: Assembly-CSharp (game code / modding assembly)
Namespace: Game.Tools

Type: public class

Base: SafeCommandBufferSystem

Summary:
ToolReadyBarrier is a small SafeCommandBufferSystem-derived ECS/system class used by the game to act as a synchronization/barrier point for tool readiness. It does not add state or custom data; it simply overrides OnUpdate and currently defers to the base implementation. The class and its members are annotated with attributes to prevent IL2CPP stripping and to control method inlining, which is important for runtime behavior and native builds.


Fields

  • This class declares no instance or static fields.

Properties

  • This class declares no properties.

Constructors

  • public ToolReadyBarrier()
    Preserved constructor ([Preserve] attribute) so the type and its constructor are not removed by code stripping (IL2CPP/linker). The constructor performs no additional initialization beyond the base constructor.

Methods

  • protected override void OnUpdate()
    Attributes:
  • [MethodImpl(MethodImplOptions.NoInlining)] — prevents the JIT/AOT from inlining this method.
  • [Preserve] — prevents removal by the managed code stripper. Behavior:
  • Calls base.OnUpdate() and does not add any other logic. The override exists to provide an explicit hook point for the game to execute the base SafeCommandBufferSystem update in this named barrier. Modders can override this method in a subclass if they need to run custom logic before or after the barrier's base processing.

Usage Example

[Preserve]
protected override void OnUpdate()
{
    // Optional: run custom pre-barrier logic here.

    base.OnUpdate(); // ensure the barrier/system processing runs

    // Optional: run custom post-barrier logic here.
}