docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method Recycle

    Recycle(T)

    Returns an object instance to the pool.

    Declaration
    public void Recycle(T instance)
    Parameters
    Type Name Description
    T instance

    The instance to return.

    Remarks

    Object values can be cleared automatically if ClearInstance(T) is implemented. The base ObjectPool class does not clear objects to the pool.

    In This Article
    Back to top
    Copyright © 2024 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)