Class NoiseType<T> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class NoiseType<T>

    A Singleton class used for representing a NoiseType implementation. A NoiseType class must inherit from this in order to be considered a valid NoiseType and included in the noise shader generation and available for use with the various noise tools.

    Inheritance
    System.Object
    NoiseType<T>
    BillowNoise
    PerlinNoise
    RidgeNoise
    ValueNoise
    VoronoiNoise
    Namespace: UnityEditor.Experimental.TerrainAPI
    Syntax
    public abstract class NoiseType<T> : ScriptableSingleton<T>, INoiseType where T : NoiseType<T>
    Type Parameters
    Name Description
    T

    Methods

    DoGUI(String)

    When overidden, renders the GUI for the NoiseType implementation using the data provided by the serialized string.

    Declaration
    public virtual string DoGUI(string serializedString)
    Parameters
    Type Name Description
    System.String serializedString

    A string for the serialized data used by the NoiseType implementation

    Returns
    Type Description
    System.String

    A string for the NoiseType implementation's serialized data after having gone through possible changes from user interaction with the GUI

    Implements
    INoiseType.DoGUI(String)

    FromSerializedString(String)

    When overidden, converts a string representing the data for the NoiseType implementation into an an actual object reference to be used with said NoiseType implementation.

    Declaration
    public virtual object FromSerializedString(string serializedString)
    Parameters
    Type Name Description
    System.String serializedString

    A string representing a serialized object that is used by the NoiseType implementation

    Returns
    Type Description
    System.Object

    An object deserialized from the provided string

    Implements
    INoiseType.FromSerializedString(String)

    GetDefaultSerializedString()

    When overidden, returns a string that represents the default data state for the NoiseType implementation

    Declaration
    public virtual string GetDefaultSerializedString()
    Returns
    Type Description
    System.String
    Implements
    INoiseType.GetDefaultSerializedString()

    GetDescription()

    Returns a descriptor struct defining the NoiseType

    Declaration
    public abstract NoiseTypeDescriptor GetDescription()
    Returns
    Type Description
    NoiseTypeDescriptor
    Implements
    INoiseType.GetDescription()

    SetupMaterial(Material, String)

    When overidden, sets up a Material to be used with the NoiseType implementation. This function is called from within NoiseSettings.SetupMaterial( Material mat )

    Declaration
    public virtual void SetupMaterial(Material mat, string serializedString)
    Parameters
    Type Name Description
    Material mat

    The Material to setup for use with this NoiseType implementation

    System.String serializedString

    The serialized string representing the NoiseType data to be used when setting up the provided Material

    Implements
    INoiseType.SetupMaterial(Material, String)

    ToSerializedString(Object)

    When overidden, converts an object representing the data for a NoiseType implementation to a string. This is later serialized and stored in a NoiseSettings Asset.

    Declaration
    public virtual string ToSerializedString(object target)
    Parameters
    Type Name Description
    System.Object target

    The data representation for the NoiseType implementation to be converted into a string

    Returns
    Type Description
    System.String

    The string representation of the provided target object

    Implements
    INoiseType.ToSerializedString(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023