Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class ViewModeCollectionConfigAsset

    Represents a configuration that provides a collection of available view mode configuration items

    Inheritance
    object
    Object
    ScriptableObject
    ViewModeCollectionConfigAsset
    Implements
    IViewModeCollectionConfig
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Fwt.HexTerrains.ViewModes.Data
    Assembly: fwt.hexterrains.dll
    Syntax
    [CreateAssetMenu(menuName = "Fwt/HexTerrains/View Modes/ViewMode Collection config", fileName = "ViewModeCollectionConfig")]
    public class ViewModeCollectionConfigAsset : ScriptableObject, IViewModeCollectionConfig

    Fields

    _viewModeConfigByName

    Stores view mode configuration assets indexed by their associated names. If you change ViewModes collection, you should update this dictionary accordingly by calling UpdateCache() to maintain consistency between the list and the dictionary.

    Declaration
    protected Dictionary<string, ViewModeConfigAssetBase> _viewModeConfigByName
    Field Value
    Type Description
    Dictionary<string, ViewModeConfigAssetBase>
    Remarks

    This dictionary enables efficient lookup and management of view mode configurations by name. Derived classes can use this collection to retrieve or update specific view mode configurations as needed.

    _viewModeIndexByName

    Declaration
    protected Dictionary<string, int> _viewModeIndexByName
    Field Value
    Type Description
    Dictionary<string, int>

    _viewModes

    Declaration
    [Tooltip("The collection of available view mode configuration assets for this component.")]
    [SerializeField]
    protected List<ViewModeConfigAssetBase> _viewModes
    Field Value
    Type Description
    List<ViewModeConfigAssetBase>

    Properties

    ViewModes

    Gets or sets the collection of view mode configurations available to the application.

    Declaration
    public List<ViewModeConfigAssetBase> ViewModes { get; set; }
    Property Value
    Type Description
    List<ViewModeConfigAssetBase>
    Remarks

    The list determines which view modes can be presented or selected by users. Modifying this collection affects the available view options at runtime.

    Methods

    GetViewMode(string)

    Retrieves the index of the specified view mode by its name.

    Declaration
    public virtual int GetViewMode(string viewModeName)
    Parameters
    Type Name Description
    string viewModeName

    The name of the view mode to locate. This parameter cannot be null or empty.

    Returns
    Type Description
    int

    The zero-based index of the view mode if found; otherwise, -1.

    Remarks

    If the view mode configuration is not cached, the method updates the cache before searching. The comparison of the view mode name is case-sensitive.

    GetViewModeConfig(int)

    Retrieves the configuration settings for the specified view mode (by ViewMode index).

    Declaration
    public virtual IViewModeConfig GetViewModeConfig(int viewModeIndex)
    Parameters
    Type Name Description
    int viewModeIndex

    The zero-based index of the view mode for which to obtain configuration settings. Must be within the range of available view modes.

    Returns
    Type Description
    IViewModeConfig

    An object that provides configuration details for the specified view mode.

    GetViewModeConfig(string)

    Retrieves the configuration settings for the specified view mode (by ViewMode name set in config).

    Declaration
    public virtual IViewModeConfig GetViewModeConfig(string viewModeName)
    Parameters
    Type Name Description
    string viewModeName

    The name of the view mode for which to retrieve the configuration.

    Returns
    Type Description
    IViewModeConfig

    An instance of IViewModeConfig containing the configuration settings for the specified view mode, or null if the view mode is not found.

    Remarks

    Ensure that the specified view mode name corresponds to an existing view mode configuration.

    GetViewModeConfig(string, out int)

    Retrieves the configuration settings for the specified view mode (by ViewMode name set in config). out parameter viewMode is the index of the view mode with the specified name.

    Declaration
    public virtual IViewModeConfig GetViewModeConfig(string viewModeName, out int viewMode)
    Parameters
    Type Name Description
    string viewModeName

    The name of the view mode for which to retrieve the configuration.

    int viewMode
    Returns
    Type Description
    IViewModeConfig

    An instance of IViewModeConfig containing the configuration settings for the specified view mode, or null if the view mode is not found.

    Remarks

    Ensure that the specified view mode name corresponds to an existing view mode configuration.

    UpdateCache()

    Updates the internal cache of view modes to reflect the current collection of view mode configurations.

    Declaration
    public virtual void UpdateCache()
    Remarks

    Call this method after modifying the list of view modes to ensure that the cache remains accurate. Only view modes with non-empty names are included in the cache.

    Implements

    IViewModeCollectionConfig

    Extension Methods

    Extensions_UnityObject.SmartDestroy<TObject>(TObject)
    Extensions_UnityObject.SmartDisableGameObject<TObject>(TObject)
    Extensions_UnityObject.SmartEnableGameObject<TObject>(TObject)
    HashExtensions.GetHashCode_RefType<TValue>(TValue, int)
    Extensions_UnityObject.SmartDestroy(object)
    Extensions_UnityObject.SmartGetComponent<TComponent>(object)
    Extensions_UnityObject.SmartGetGameGameObject(object)
    In this article
    Back to top Generated by DocFX