docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetDataPoint

    SetDataPoint(int, DataPoint<T>)

    Set the data for a DataPoint<TDataType> at an index.

    Declaration
    public void SetDataPoint(int index, DataPoint<T> value)
    Parameters
    Type Name Description
    int index

    The DataPoint index.

    DataPoint<T> value

    The value to set.

    Remarks

    Using this method will search the DataPoint list and invoke the Changed callback every time. This may be inconvenient when setting multiple DataPoints during the same frame. In this case, consider calling SetDataPointNoSort(int, DataPoint<T>) for each DataPoint, followed by a single call to SortIfNecessary(). Note that the call to SortIfNecessary() is optional and can be omitted if DataPoint sorting is not required and the Changed callback should not be invoked.

    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)