docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SortIfNecessary

    SortIfNecessary()

    Triggers sorting of the DataPoint<TDataType> list if the data is dirty.

    Declaration
    public void SortIfNecessary()
    Remarks

    Call this after a single or series of calls to SetDataPointNoSort(int, DataPoint<T>). This will trigger DataPoint sort and invoke the Changed callback. This method has two main use cases: to prevent frequent Changed callback calls within the same frame and to reduce multiple DataPoints list searches to a single sort in performance critical paths.

    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)