MatEdit for Unity3D
Introduction
MatEdit is a script which you can use to make good looking custom editors for shaders very fast and without any affort.
MatEdit Version 1 is obsolete. There won't be any updates or improvements in the future. I am working on MatEdit Version 2 at the moment which will come with most of the missing features as well as some improvments and additional features. MatEdit V2 is developed with a lot of UI and UX research and tests which will take longer than expected. Furthermore MatEdit Version2 will work differently. It is developed from scratch with an entirely different approach. Stay tuned on twitter (/NoxNorthwind) or on marian-brinkmann.com
Basic Steps:
- Create a new custom editor script for a shader of your choice and put it into an editor folder somewhere in your project.
- Add
CustomEditor "<CustomEditorScript>"
in front of the last brace of your shader. - Use the namespace
Northwind.Editor.Shader
to access MatEdit - In the
OnGUI
function access the target material and set it as scope material in MatEdit by using:MatEdit.SetScope(<TargetMaterial>);
- Use one of the included MatEdit functions to set a value in your shader
Features
Groups
- Static Group
- Toggle Group
- Fold Group
Texture Fields
- Texture Field
- Normal Map Field
- Tiling Field // Basically Vector Field
- Offset Field // Basically Vector Field
Simple Fields
- Int Field
- Enum Field
- Float Field
- Slider Field
- Min Max Slider Field
- Toggle Field
- Color Field
- Float As Vector Field
- Vector Field
Special Fields
- Animation Curve Field
- Gradient Field
- Color Curves Field
Tools
- Context Menu:
Create Custom Editor
- Context Menu:
Create Custom Editor (AUTO)
- converts property block into custom editor
Maybe on Roadmap
- Float Array Field
- Int Array Field
- Vector Array Field
- Group Reset Button
- Group Context Menu
Description Key
Symbol | Meaning |
---|---|
+ | Added to Project |
& | Change of function |
! | Marked as obsolet |
- | Removed |