docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IRefCounted

    An interface for managed and unmanaged shared component types to inherit from. Whenever a IRefCounted shared component is added to a world, its Retain() method will be invoked. Similarly, when removed from a world, its Release() method will be invoked. This interface can be used to safely manage the lifetime of a shared component whose instance data is shared between multiple worlds.

    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    public interface IRefCounted

    Methods

    Name Description
    Release()

    Called when a world has the last instance of a IRefCounted type removed from it.

    Retain()

    Called when a world has a new instance of a IRefCounted type added to it.

    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)