docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IInputComponentData

    A special component data interface used for storing player inputs.

    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    public interface IInputComponentData : IComponentData, IQueryTypeParameter
    Remarks

    When using the netcode package these inputs will be automatically handled like command data and will be stored in a buffer synchronized between client and server. This is compatible with netcode features like prediction.

    Methods

    ToFixedString()

    Implement this to get Burst-compatible input struct packet dump logging. Recommended format: $"field1:, field2:";

    Declaration
    FixedString512Bytes ToFixedString()
    Returns
    Type Description
    FixedString512Bytes

    Field values of your input struct.

    Remarks

    This function must be burst compatible too, otherwise you'll get burst compiler errors.

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