docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ReadComponent

    ReadComponent<T>(Buffer)

    Reads a component reference from the buffer.

    Declaration
    public static T ReadComponent<T>(this Buffer buffer) where T : Component
    Parameters
    Type Name Description
    Buffer buffer
    Returns
    Type Description
    T

    The component reference that has been read from the buffer.

    Type Parameters
    Name Description
    T
    Remarks

    Component references are stored as an index relative to a GameObject. If components are added to or removed from the GameObject, this method will have undefined results.

    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)