docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetValueOrDefault

    GetValueOrDefault<T>()

    Get value of type T if found. Otherwise a new instance of type T constructed using TypeConstruction utility. The build context is not modified.

    Declaration
    public T GetValueOrDefault<T>() where T : class
    Returns
    Type Description
    T

    The value or new instance of type T.

    Type Parameters
    Name Description
    T

    The value type.

    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)