docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class UnityObjectUtils

    Utility methods for working with UnityEngine Object types.

    Inheritance
    object
    UnityObjectUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Assembly: solution.dll
    Syntax
    public static class UnityObjectUtils

    Methods

    Name Description
    ConvertUnityObjectToType<T>(Object)

    Returns a component of the specified type that is associated with an object, if possible.

    Destroy(Object, bool)

    Calls the proper Destroy method on an object based on if application is playing.

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

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

    RemoveDestroyedObjects<T>(List<T>)

    Removes any destroyed UnityObjects from a list.

    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)