Class NoiseLib | Terrain Tools | 3.0.2-preview.3
docs.unity3d.com
    Show / Hide Table of Contents

    Class NoiseLib

    Class responsible for loading all the NoiseType and FractalType implementations and generating the associated shaders

    Inheritance
    Object
    NoiseLib
    Namespace: UnityEditor.Experimental.TerrainAPI
    Syntax
    [InitializeOnLoad]
    public static class NoiseLib

    Methods

    FractalTypePopup(GUIContent, String)

    Renders a Popup using EditorGUILayout.Popup for all loaded FractalType implementations

    Declaration
    public static string FractalTypePopup(GUIContent label, string selectedName)
    Parameters
    Type Name Description
    GUIContent label

    Label prefix for the Popup

    String selectedName

    The currently selected FractalType name

    Returns
    Type Description
    String

    GenerateHeaderFiles()

    Forces generation of the NoiseType and FractalType variant HLSL header files

    Declaration
    public static void GenerateHeaderFiles()

    GenerateShaders()

    Forces the generation of any shaders that make use of generated noise header files. Gathers all the NoiseShaderGenerators and generates shaders based on the ".noisehlsltemplate" file provided by that particular NoiseShaderGenerator implementation

    Declaration
    public static void GenerateShaders()

    GetFractalIndex(String)

    Returns the global index for the specified FractalType

    Declaration
    public static int GetFractalIndex(string fractalName)
    Parameters
    Type Name Description
    String fractalName

    The name of the FractalType

    Returns
    Type Description
    Int32

    GetFractalIndex(NoiseSettings)

    Returns the global FractalType index associated with provided NoiseSettings instance

    Declaration
    public static int GetFractalIndex(NoiseSettings noise)
    Parameters
    Type Name Description
    NoiseSettings noise

    The NoiseSettings instance

    Returns
    Type Description
    Int32

    GetFractalTypeInstance(String)

    Returns the Singleton instance for the specified FractalType implementation

    Declaration
    public static IFractalType GetFractalTypeInstance(string fractalName)
    Parameters
    Type Name Description
    String fractalName
    Returns
    Type Description
    IFractalType

    GetFractalTypeInstance(Type)

    Returns the Singleton instance for the specified FractalType

    Declaration
    public static IFractalType GetFractalTypeInstance(Type t)
    Parameters
    Type Name Description
    Type t

    The Type for the FractalType implementation

    Returns
    Type Description
    IFractalType

    GetGeneratedMaterial(Type, Type)

    Returns a Material associated with the provided Type of NoiseShaderGenerator and Type of FractalType

    Declaration
    public static Material GetGeneratedMaterial(Type generatorType, Type fractalType)
    Parameters
    Type Name Description
    Type generatorType

    The Type of a NoiseShaderGenerator

    Type fractalType

    The Type of a FractalType

    Returns
    Type Description
    Material

    GetNoiseIndex(String)

    Returns the global index for the specified NoiseType

    Declaration
    public static int GetNoiseIndex(string noiseName)
    Parameters
    Type Name Description
    String noiseName

    The name of the NoiseType

    Returns
    Type Description
    Int32

    GetNoiseIndex(NoiseSettings)

    Returns the global NoiseType index associated with provided NoiseSettings instance

    Declaration
    public static int GetNoiseIndex(NoiseSettings noise)
    Parameters
    Type Name Description
    NoiseSettings noise

    The NoiseSettings instance

    Returns
    Type Description
    Int32

    GetNoiseTypeInstance(String)

    Returns the Singleton instance for the specified NoiseType

    Declaration
    public static INoiseType GetNoiseTypeInstance(string noiseName)
    Parameters
    Type Name Description
    String noiseName

    The name of the NoiseType

    Returns
    Type Description
    INoiseType

    GetNoiseTypeInstance(Type)

    Returns the Singleton instance for the specified NoiseType

    Declaration
    public static INoiseType GetNoiseTypeInstance(Type t)
    Parameters
    Type Name Description
    Type t

    The Type for the NoiseType implementation

    Returns
    Type Description
    INoiseType

    NoiseTypePopup(GUIContent, String)

    Renders a Popup using EditorGUILayout.Popup for all loaded NoiseType implementations

    Declaration
    public static string NoiseTypePopup(GUIContent label, string selectedName)
    Parameters
    Type Name Description
    GUIContent label

    Label prefix for the Popup

    String selectedName

    The currently selected NoiseType name

    Returns
    Type Description
    String
    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