Search Results for

    Show / Hide Table of Contents

    Class VariablesMapper

    Use this class to map existing variables to multiple variables under a common path prefix. Intended for expanding list / dictionary variables. For example a VariablesMapper could expand a json variable to multiple varialbes: source variable => items-list: ["item1", "item2", "item3"] mapped variables => items-list-1: "item1" items-list-2: "item2" items-list-3: "item3"

    Inheritance
    Object
    VariablesMapper
    Implements
    IVariableSource
    IVariablesServiceComponent
    IServiceComponent<VariablesService>
    Namespace: NoSuchStudio.Variables
    Assembly: NoSuchStudio-Variables.dll
    Syntax
    [ExecuteAlways]
    public abstract class VariablesMapper : NoSuchMonoBehaviour, IVariableSource, IVariablesServiceComponent, IServiceComponent<VariablesService>

    Fields

    _connected

    Declaration
    [NonSerialized]
    protected Dictionary<Type, bool> _connected
    Field Value
    Type Description
    Dictionary<Type, Boolean>

    _mappedPrefix

    Declaration
    [SerializeField]
    protected string _mappedPrefix
    Field Value
    Type Description
    String

    _mappedVariables

    Declaration
    [NonSerialized]
    protected Dictionary<string, string> _mappedVariables
    Field Value
    Type Description
    Dictionary<String, String>

    _readyToConnect

    Declaration
    [NonSerialized]
    protected bool _readyToConnect
    Field Value
    Type Description
    Boolean

    _sourceVariable

    Declaration
    [SerializeField]
    protected string _sourceVariable
    Field Value
    Type Description
    String

    Properties

    mappedVariables

    Declaration
    public Dictionary<string, string> mappedVariables { get; }
    Property Value
    Type Description
    Dictionary<String, String>

    mono

    Declaration
    public MonoBehaviour mono { get; }
    Property Value
    Type Description
    UnityEngine.MonoBehaviour

    sourceVariable

    Declaration
    public string sourceVariable { get; set; }
    Property Value
    Type Description
    String

    Methods

    Connect<ST>()

    Declaration
    public void Connect<ST>()
    
        where ST : Service<ST>
    Type Parameters
    Name Description
    ST

    CreateMappedVariables()

    Declaration
    protected abstract Dictionary<string, string> CreateMappedVariables()
    Returns
    Type Description
    Dictionary<String, String>

    CreateSourceValue()

    Declaration
    protected abstract string CreateSourceValue()
    Returns
    Type Description
    String

    Disconnect<ST>()

    Declaration
    public void Disconnect<ST>()
    
        where ST : Service<ST>
    Type Parameters
    Name Description
    ST

    GetVariable(String)

    Declaration
    public string GetVariable(string variable)
    Parameters
    Type Name Description
    String variable
    Returns
    Type Description
    String

    IsConnected<ST>()

    Declaration
    public bool IsConnected<ST>()
    
        where ST : Service<ST>
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    ST

    OnDisable()

    Declaration
    protected virtual void OnDisable()

    OnEnable()

    Declaration
    protected virtual void OnEnable()

    SetVariable(String, String)

    Declaration
    public bool SetVariable(string variable, string value)
    Parameters
    Type Name Description
    String variable
    String value
    Returns
    Type Description
    Boolean

    Implements

    IVariableSource
    IVariablesServiceComponent
    IServiceComponent<>
    In This Article
    Back to top Generated by DocFX