Game.ToolOutputBarrier
Assembly: Assembly-CSharp
Namespace: Game.Tools
Type: class
Base: SafeCommandBufferSystem
Summary:
ToolOutputBarrier is a small system class intended to participate in the tool-related command-buffer/ordering pipeline. It derives from SafeCommandBufferSystem and currently provides an override of OnUpdate that simply delegates to the base implementation. The class and its members are marked with Preserve and the OnUpdate method is marked NoInlining, indicating it should not be stripped or inlined by the runtime/build tooling. This type is likely used as a synchronization/flush point for tool output work in the game's update loop; modders can subclass it to add tool-specific command-buffer handling if needed.
Fields
- This type declares no fields in the provided source file.
The class relies on behavior and storage from its SafeCommandBufferSystem base.
Properties
- This type declares no properties in the provided source file.
Any relevant state or handles are expected to be exposed by the base class (SafeCommandBufferSystem).
Constructors
public ToolOutputBarrier()
The default public constructor is present and marked with [Preserve] in source. It performs no custom initialization and simply constructs the base SafeCommandBufferSystem via the implicit base constructor call. The Preserve attribute prevents the constructor/type from being removed by code stripping.
Methods
protected override OnUpdate() : System.Void
Attributes: [MethodImpl(MethodImplOptions.NoInlining)], [Preserve]
The override currently only callsbase.OnUpdate()
and does not add additional behavior. The NoInlining attribute prevents the method from being inlined (useful for stack traces or specific runtime behavior), and Preserve prevents it from being stripped. Subclasses can override this method to insert custom tool-output processing while still calling the base implementation to preserve the system's built-in behavior.
Usage Example
[Preserve]
public class CustomToolBarrier : Game.Tools.ToolOutputBarrier
{
protected override void OnUpdate()
{
base.OnUpdate();
// Add custom tool output handling or command-buffer operations here.
}
}
Notes and tips: - Because the class is marked with Preserve attributes, it is safe from build-time code stripping; this is common for Unity mods where reflection or managed registration is used. - If you need to synchronize jobs or record commands for later playback, check what SafeCommandBufferSystem provides (e.g., producer/consumer handles or command buffer APIs) and extend OnUpdate accordingly.