docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IMessagePool

    Provides a mechanism to recycle IMessage instances, reducing garbage allocation.

    Namespace: Unity.SimulationPro.Foundation
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    public interface IMessagePool
    Remarks

    Assign an IMessagePool to an IPublisher via SetMessagePool(IMessagePool) to enable message pooling on that publisher.

    Methods

    AddMessage(IMessage)

    Returns a message to the pool so it can be reused.

    Declaration
    void AddMessage(IMessage messageToRecycle)
    Parameters
    Type Name Description
    IMessage messageToRecycle

    The message instance to recycle. Must match the message type managed by this pool.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)