docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ImportSetting<T>

    Represents a setting in the ImporterGraph that contains both a setting Id and it's Value.

    Inheritance
    object
    ImportSetting<T>
    Implements
    IGraphValue
    IEquatable<ImportSetting<T>>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Importer
    Assembly: Unity.Importer.dll
    Syntax
    [Serializable]
    public class ImportSetting<T> : IGraphValue, IEquatable<ImportSetting<T>>
    Type Parameters
    Name Description
    T

    The setting's type.

    Remarks

    Settings can be added and removed from the ImporterGraph using AddImportSetting(IGraphValue) and RemoveImportSetting(IGraphValue).

    using UnityEngine.Importer;
    using UnityEngine;
    
    public static class ExampleClass
    {
        public static void AddNewSettingToAGraph()
        {
            var graph = ScriptableObject.CreateInstance<ImporterGraph>();
            var newSetting = new ImportSetting<int>("MyIntSetting", 5);
            graph.AddImportSetting(newSetting);
        }
    }

    Constructors

    ImportSetting(string, T)

    Creates a new instance of an ImportSetting<T>.

    Declaration
    public ImportSetting(string id, T value)
    Parameters
    Type Name Description
    string id

    The id of the setting.

    T value

    The default value of the setting.

    Properties

    Id

    The id of the setting.

    Declaration
    public string Id { get; }
    Property Value
    Type Description
    string

    Type

    The Type of the setting.

    Declaration
    public Type Type { get; }
    Property Value
    Type Description
    Type

    Value

    The default value of the setting.

    Declaration
    public T Value { get; }
    Property Value
    Type Description
    T

    Methods

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)

    Equals(ImportSetting<T>)

    Declaration
    public bool Equals(ImportSetting<T> other)
    Parameters
    Type Name Description
    ImportSetting<T> other
    Returns
    Type Description
    bool

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IGraphValue
    IEquatable<T>
    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)