Class NoiseSettingsGUI
Class used to draw the GUI for Noise Settings.
Inheritance
Namespace: UnityEditor.Experimental.TerrainAPI
Syntax
public class NoiseSettingsGUI
Fields
serializedNoise
The SerializedObject for the NoiseSettings that this NoiseSettingsGUI instance is currently rendering the GUI for.
Declaration
public SerializedObject serializedNoise
Field Value
Type | Description |
---|---|
SerializedObject |
target
The current NoiseSettings object that is associated with this instance of NoiseSettingsGUI.
Declaration
public NoiseSettings target
Field Value
Type | Description |
---|---|
NoiseSettings |
Properties
previewRT
Declaration
public RenderTexture previewRT { get; }
Property Value
Type | Description |
---|---|
RenderTexture |
Methods
DrawPreviewTexture(Single, Boolean)
Renders an interactive Noise Preview along with tooltip icons and an optional Export button that opens a new ExportNoiseWindow. A background image is also rendered behind the preview that takes up the entire width of the EditorWindow currently being drawn.
Declaration
public void DrawPreviewTexture(float minSize, bool showExportButton = true)
Parameters
Type | Name | Description |
---|---|---|
System.Single | minSize | Minimum size for the Preview |
System.Boolean | showExportButton | Whether or not to render the Export button |
Init(SerializedObject)
Sets up this instance of NoiseSettingsGUI with the specified SerializedObject containing an object reference to a NoiseSettings instance. GUI will be drawn for this serialized NoiseSettings instance.
Declaration
public void Init(SerializedObject serializedNoise)
Parameters
Type | Name | Description |
---|---|---|
SerializedObject | serializedNoise | A SerializedObject instance containing an object reference to a NoiseSettings object |
Init(NoiseSettings)
Sets up this instance of NoiseSettingsGUI with the specified NoiseSettings object. GUI will be drawn for this NoiseSettings instance.
Declaration
public void Init(NoiseSettings noiseSettings)
Parameters
Type | Name | Description |
---|---|---|
NoiseSettings | noiseSettings | The NoiseSettings instance for which GUI will be drawn |
OnGUI(NoiseSettingsGUIFlags)
Renders the GUI for the NoiseSettings instance associated with this NoiseSettingsGUI instance.
Declaration
public void OnGUI(NoiseSettingsGUIFlags flags = NoiseSettingsGUIFlags.All)
Parameters
Type | Name | Description |
---|---|---|
NoiseSettingsGUIFlags | flags | Flags specifying which portions of the GUI to draw |