Class SimpleShaderInspector
Default base class for creating new inspectors.
Namespace: VRLabs.SimpleShaderInspectors
Syntax
public abstract class SimpleShaderInspector : ShaderGUI, ISimpleShaderInspector, IControlContainer
Remarks
If you want to make an inspector with Simple Shader Inspectors you need to either derive from this class, or create your own implementing ISimpleShaderInspector, but in this second case you need to implement a lot of stuff manually, so it isn't advised unless you need really custom inspector behaviours.
Properties
| Name | Description |
|---|---|
| Controls | List of controls. |
| CustomLocalizationShaderName | String containing a custom folder name for localization of shaders. |
| DefaultBgColor | Default gui background color. |
| Materials | Array of selected materials |
| NeedsNonAnimatableUpdate | Boolean value that defines if the inspector should check for non animatable properties. |
| Shader | Shader currently used |
Methods
| Name | Description |
|---|---|
| AddControl(SimpleControl) | Implementation needed by IControlContainer to add controls. |
| CheckChanges(MaterialEditor) | Check changes happened to properties. |
| Footer() | Draw method that is used after drawing controls in the inspector. |
| GetControlList() | Implementation needed by IControlContainer to get the object's controls list. |
| Header() | Draw method that is used before drawing controls in the inspector. |
| OnGUI(MaterialEditor, MaterialProperty[]) | Method called when updating UI. Cannot be overridden in child classes, leave it alone. |
| Start() | Initialization method where all the controls are instanced. You need to override it. |
| StartChecks(MaterialEditor) | Checks done on the first cycle before UI is drawn. |