docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method RemoveDestroyedKeys

    RemoveDestroyedKeys<TKey, TValue>(Dictionary<TKey, TValue>)

    Removes any destroyed keys from a dictionary that uses UnityObjects as its key type.

    Declaration
    public static void RemoveDestroyedKeys<TKey, TValue>(Dictionary<TKey, TValue> dictionary) where TKey : Object
    Parameters
    Type Name Description
    Dictionary<TKey, TValue> dictionary

    A dictionary of UnityObjects that may contain destroyed objects.

    Type Parameters
    Name Description
    TKey

    The specific type of UnityObject serving as keys in the dictionary.

    TValue

    The value type of the dictionary.

    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)