docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ContainsKey

    ContainsKey<T>(string, SettingsScope)

    Does the repository contain a setting with key and type.

    Declaration
    public bool ContainsKey<T>(string key, SettingsScope scope = SettingsScope.Project)
    Parameters
    Type Name Description
    string key

    The settings key.

    SettingsScope scope

    Which scope should be searched for matching key.

    Returns
    Type Description
    bool

    True if a setting matching both key and type is found, false if no entry is found.

    Type Parameters
    Name Description
    T

    The type of value to search for.

    ContainsKey<T>(string, string, SettingsScope)

    Does the repository contain a setting with key and type.

    Declaration
    public bool ContainsKey<T>(string key, string repositoryName, SettingsScope scope = SettingsScope.Project)
    Parameters
    Type Name Description
    string key

    The settings key.

    string repositoryName

    The repository name to match.

    SettingsScope scope

    Which scope should be searched for matching key.

    Returns
    Type Description
    bool

    True if a setting matching both key and type is found, false if no entry is found.

    Type Parameters
    Name Description
    T

    The type of value to search for.

    ContainsKey<T, K>(string, string)

    Does the repository contain a setting with key and type.

    Declaration
    public bool ContainsKey<T, K>(string key, string repositoryName = null) where K : ISettingsRepository
    Parameters
    Type Name Description
    string key

    The settings key.

    string repositoryName

    If provided, only repositories with a matching name will be searched for the key.

    Returns
    Type Description
    bool

    True if a setting matching both key and type is found, false if no entry is found.

    Type Parameters
    Name Description
    T

    The type of value to search for.

    K

    Only repositories of type K will be searched for matching keys.

    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)