C# 클래스 UnityEditor.ShaderGUI

Abstract class to derive from for defining custom GUI for shader properties and for extending the material preview.

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

공개 메소드들

메소드 설명
AssignNewShaderToMaterial ( Material material, Shader oldShader, Shader newShader ) : void

This method is called when a new shader has been selected for a Material.

OnGUI ( MaterialEditor materialEditor, MaterialProperty properties ) : void

To define a custom shader GUI use the methods of materialEditor to render controls for the properties array.

OnMaterialInteractivePreviewGUI ( MaterialEditor materialEditor, Rect r, GUIStyle background ) : void
OnMaterialPreviewGUI ( MaterialEditor materialEditor, Rect r, GUIStyle background ) : void

Override for extending the rendering of the Preview area or completly replace the preview (by not calling base.OnMaterialPreviewGUI).

OnMaterialPreviewSettingsGUI ( MaterialEditor materialEditor ) : void

Override for extending the functionality of the toolbar of the preview area or completly replace the toolbar by not calling base.OnMaterialPreviewSettingsGUI.

보호된 메소드들

메소드 설명
FindProperty ( string propertyName, MaterialProperty properties ) : MaterialProperty

Find shader properties.

FindProperty ( string propertyName, MaterialProperty properties, bool propertyIsMandatory ) : MaterialProperty

Find shader properties.

ShaderGUI ( ) : System

메소드 상세

AssignNewShaderToMaterial() 공개 메소드

This method is called when a new shader has been selected for a Material.

public AssignNewShaderToMaterial ( Material material, Shader oldShader, Shader newShader ) : void
material UnityEngine.Material The material the newShader should be assigned to.
oldShader UnityEngine.Shader Previous shader.
newShader UnityEngine.Shader New shader to assign to the material.
리턴 void

FindProperty() 보호된 정적인 메소드

Find shader properties.

protected static FindProperty ( string propertyName, MaterialProperty properties ) : MaterialProperty
propertyName string Name of the material property.
properties MaterialProperty The array of available properties.
리턴 MaterialProperty

FindProperty() 보호된 정적인 메소드

Find shader properties.

protected static FindProperty ( string propertyName, MaterialProperty properties, bool propertyIsMandatory ) : MaterialProperty
propertyName string Name of the material property.
properties MaterialProperty The array of available properties.
propertyIsMandatory bool If true then this method will throw an exception if a property with propertyName was not found.
리턴 MaterialProperty

OnGUI() 공개 메소드

To define a custom shader GUI use the methods of materialEditor to render controls for the properties array.

public OnGUI ( MaterialEditor materialEditor, MaterialProperty properties ) : void
materialEditor MaterialEditor The MaterialEditor that are calling this OnGUI (the 'owner').
properties MaterialProperty Material properties of the current selected shader.
리턴 void

OnMaterialInteractivePreviewGUI() 공개 메소드

public OnMaterialInteractivePreviewGUI ( MaterialEditor materialEditor, Rect r, GUIStyle background ) : void
materialEditor MaterialEditor
r UnityEngine.Rect
background UnityEngine.GUIStyle
리턴 void

OnMaterialPreviewGUI() 공개 메소드

Override for extending the rendering of the Preview area or completly replace the preview (by not calling base.OnMaterialPreviewGUI).

public OnMaterialPreviewGUI ( MaterialEditor materialEditor, Rect r, GUIStyle background ) : void
materialEditor MaterialEditor The MaterialEditor that are calling this method (the 'owner').
r UnityEngine.Rect Preview rect.
background UnityEngine.GUIStyle Style for the background.
리턴 void

OnMaterialPreviewSettingsGUI() 공개 메소드

Override for extending the functionality of the toolbar of the preview area or completly replace the toolbar by not calling base.OnMaterialPreviewSettingsGUI.

public OnMaterialPreviewSettingsGUI ( MaterialEditor materialEditor ) : void
materialEditor MaterialEditor The MaterialEditor that are calling this method (the 'owner').
리턴 void

ShaderGUI() 보호된 메소드

protected ShaderGUI ( ) : System
리턴 System