Editor Properties

Name Effect Required Example
shader_master_label Display name customizes the gui header No [HideInInspector] shader_master_label ("<color =#ff0000ff>❤</color> <color =#000000ff>Poiyomi Toon Shader V4.0</color> <color =#ff0000ff>❤</color>", Float) = 0
shader_properties_label_file If specified the editor tries to load property's display names out of this file No [HideInInspector] shader_properties_label_file ("poiToonLabels", Float) = 0
shader_properties_locale Is used to specify a locale file and locale selector. Specify "locale::<string>" anywhere to load a string from the locale file. No [HideInInspector] shader_properties_locale ("locale::locale--{file_name:locale_file_name}", Float) = 0
shader_on_swap_to Is used to specify actions to be executed when the material is switched to this shader. No [HideInInspector] shader_on_swap_to ("--{actions:[{type:SET_PROPERTY,data:_ZWrite=1},{type:SET_PROPERTY,data:_CullBack=0}]}", Float) = 0
footer_<string> Adds a footer button to the bottom of the ui. Multiple footers can be added to one shader. The displayname has to be a ButtonData object No [HideInInspector] footer_github ("{text:Github,action:{type:URL,data:https://github.com/thryrallo/thryeditor}}", Float) = 0
[HideInInspector] footer_discord ("{texture:{name:discord-icon,height:40},action:{type:URL,data:https://discord.gg}}", Float) = 0
DSGI add this property for double sided illumination settings to be shown No [HideInInspector] DSGI ("", Float) = 0
Instancing add this property for instancing variants settings to be shown No [HideInInspector] Instancing ("", Float) = 0
LightmapFlags add this property for lightmap flags settings to be shown No [HideInInspector] LightmapFlags ("", Float) = 0
m_<string> starts a dropdown menu. all properties underneath, till the next menu is specified, are in this menu No [HideInInspector] m_mainOptions ("Main", Float) = 0
m_start_<string> starts a dropdown menu. all properties underneath, till this menu's end is specified, are in this menu. use if you want to layer menus. No [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0
m_end_<string> ends a dropdown menu that has been started with m_start_<string> No [HideInInspector] m_end_Alpha ("", Float) = 0
g_start_<string> starts a group. properties are grouped together. not visible to the user. can be used to hide multiple properties with one condition specification. No [HideInInspector] g_start_blending ("--{condition_show:{type:PROPERTY_BOOL,data:_DisplayBlending}}", Float) = 0
g_end_<string> ends a group that has been started with g_start_<string> No [HideInInspector] g_start_blending ("", Float) = 0

Suggestions:

Name Description Example
Variant Selector Use a commbination of Enum and on_value_actions to create a varian selector [Enum(Cutout,0,Transparent,1)]variant_selector("Variant--{on_value_actions:[{value:0,actions:[{type:SET_PROPERTY,data:_ZWrite=1},{type:SET_SHADER,data:Thry/Example 1}]},{value:1,actions:[{type:SET_PROPERTY,data:_ZWrite=0},{type:SET_SHADER,data:Thry/Example 2}]}]}",Float) = 0

Drawers

Drawer Name Effect Extra Property Options Example
[SmallTexture] Creates a texture field that will always be small [SmallTexture]_MainTex("Main Texture",2D)= "white" { }
[BigTexture] Creates a texture field that will always be big [BigTexture]_MainTex("Main Texture",2D)= "white" { }
[StylizedBigTexture] Creates a texture field that will always be big but stylized differently [StylizedBigTexture]_MainTex("Main Texture",2D)= "white" { }
[Gradient] Creates a texture field with a gradient field next to it.
Gradient is automatically converted to texture.
[Gradient]_ColorRamp("Color Ramp",2D)= "white" { }
[MultiSlider] Creates a slider for a range.
Is used with a vector property.
x and y are the slider values. z is slider minimum. w is slider maximum.
[MultiSlider]_Slider("Multi Slider",Vector)= (0.1,0.9,0,1)
[TextureArray] Creates field that accepts Texture Arrays [TextureArray]_FlipbookTexArray ("Texture Array", 2DArray) = "" {}
[Vector2] Creates a Vector 2 field [Vector2]_Vector("Vector with 2 values",Vector)= (0,0,0,0)
[Vector3] Creates Vector 3 field [Vector3]_Vector("Vector with 3 values",Vector)= (0,0,0,0)
[Curve] Creates a curve field [Curve]_ColorCurve("Curve",2D)= "white" { }
[Helpbox] Creates an info box [Helpbox]_MainHelpbox("This is the text inside the info box",Float)= 0

Supported Default Unity Flags

Name Effect
[NoScaleOffset]
[Normal]
[Space]
[Space(Int)]
[Toggle()]

Property Options

None of the poperty options are required.
Options are defined in the display name of a property inside curly brackets and after "--":
In practice:

_Tex("Texture--{Put all your options in here}",2D) = "white" { }
_Tex("Texture--{offet:2,hover:read this on hover,altClick{type:URL,data:http://thryrallo.de}}",2D) = "white" { }
Use json syntax instead to future proof your properties!
You can use '' instead of " inside property display names

Example:
{''text'':''Youtube'',''action'':{''type'':''URL'',''data'':''https://www.youtube.com/''}
Name Value Type Effect Drawer Specific Example
offset int adds an extra x-offset to the property No _Tex("Texture--{offset:1}",2D) = "white" { }
tooltip string text that is shown when hovering above property No _Tex("Texture--{tooltip:use this texture for albedo}",2D) = "white" { }
altClick Action performs an action when holding alt down and clicking on property No _Tex("Texture--{altClick:{type:URL,data:http://thryrallo.de}}",2D) = "white" { }
condition_show Condition let's you define a condition that has to be true for this property to be shown in the ui No _Tex("Texture--{condition_show:{type:PROPERTY_BOOL,data:_ForceOpaque==1}}",2D) = "white" { }
condition_enable Condition let's you define a condition that has to be true for this property to be enabled No _Tex("Texture--{condition_enable:{type:PROPERTY_BOOL,data:_ForceOpaque==1}}",2D) = "white" { }
on_value_actions PropertyValueAction[] let's you define a actions that happen if this property is set to a specfiic value. No [Enum(Cutout,0,Transparent,1)]variant_selector("Variant--{on_value_actions:[{value:0,actions:[{type:SET_PROPERTY,data:_ZWrite=1},{type:SET_SHADER,data:Thry/Example 1}]},{value:1,actions:[{type:SET_PROPERTY,data:_ZWrite=0},{type:SET_SHADER,data:Thry/Example 2}]}]}",Float) = 0
button_right Button let's you define a button that is shown on the side of a dropdown header Yes, only headers _Tex("Texture--{button_right:{text:Test Button,action:{type:URL,data:https://github.com/Thryrallo/thryeditor},hover:hover text,condition_show:{type:PROPERTY_BOOL,data:_ShowButtonOnMenus}}}",2D) = "white" { }
texture TextureData Defines the texture settings for created textures. [Gradient],[Curve] [Gradient]_ColorRamp ("Gradient --{texture:{width:256,height:16,filterMode:Point,wrapMode:Clamp}}", 2D) = "white" { }
[Curve]_MainTex ("Texture --{image:{width:256,height:16,channel:b}}", 2D) = "white" { }
force_texture_options bool Default: false. Set this to true to hide the texture options and force your defined texture settings. [Gradient] [Gradient]_ColorRamp ("Gradient --{texture:{width:256,height:16,filterMode:Point,wrapMode:Clamp},force_texture_options:true}", 2D) = "white" { }
hide_in_inspector bool Default: false. Set this to true to hide the property in ThryEditor, but not the unity default inspector. Usefull if you already display the options in a texture dropdown or Foldout Header. No _Toogle ("Gradient Lighting--{texture:{hide_in_inspector:true}}", Int) = 0
reference_properties string[] Default: null. specified properties will be drawn in texture foldout menu Texture _Texture("Panning Texture --{reference_properties:[_PanSpeed,_PanUV]}", 2D) = "white" { }
reference_property string Specifies a property by it's name.
If defined on a menu header, it will create a toggle linked with the referenced property.
If defined on a TextureArray it will fill this float property with the texture array depth (frame count) after creating an array from a gif or multiple images.
If defined on a texture property it will draw this property next to the texture property (for example for a color field)
[TextureArray],Texture,MenuHeader Light and Shadow--{reference_property:_EnableLighting}
[TextureArray]_Texture("Animated Texture --{reference_property:_FrameCount}", 2DArray) = { }
is_hideable bool If set to true, property will be able to be hidden using the little eye icon in the top right of the inspector. MenuHeaders [HideInInspector] m_vertex("Vertex Options--{button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=FO-bxI5znI0},hover:YouTube},is_hideable:true}", Float) = 0
is_hidden_default bool If set to true and property is hideable, the property will be hidden by default. MenuHeaders [HideInInspector] m_vertex("Vertex Options--{button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=FO-bxI5znI0},hover:YouTube},is_hideable:true,is_hidden_default:true}", Float) = 0

Data Structures

Button

Variables:
Name Value Type required default
text string text or texture
texture TextureData text or texture
hover string no
action Action kinda
condition_show Condition no

PropertyValueAction

Variables:
Name Value Type required
value string Yes
actions Action[] Yes

Action

Variables:
Name Value Type required
type ActionType Yes
data string Yes

Enum: ActionType

States:
Value Effect Example
URL Opens the url in browser {type:URL,data:https://github.com/Thryrallo/thryeditor}
SET_PROPERTY Sets the value of a specified property. {type:SET_PROPERTY,data:_ZWrite=1}
SET_SHADER Changes the shader of the material. {type:SET_SHADER,data:Thry/Example 1}

TextureData

Variables:
Name Value Type required default Explanation
name string no File name of image
width int no 128
height int no 128
channel char no r
ansioLevel int no 1
filterMode Enum(FilterMode) no Bilinear EnumValues: Bilinear,Point,Trilinear
wrapMode Enum(TextureWrapMode) no Repeat EnumValues: Clamp,Mirror,MirrorOnce,Repeat

Condition

Variables:
Name Value Type required default
type ConditionType Yes None
data string If type!=AND && type!=OR yes
condition1 Condition if type==AND || type==OR yes null
condition2 Condition if type==AND || type==OR yes null
Data will have different meanings depending on type

Data
Useable Comparators: ==,!=,>,<
type data value example
PROPERTY_BOOL <PropertyName>(<Comparator><value>)? {type:PROPERTY_BOOL,data:_ForceOpaque}
or {type:PROPERTY_BOOL,data:_ForceOpaque==0}
EDITOR_VERSION <Comparator><value> {type:EDITOR_VERSION,data:>0.17} #checks if installed editor version > 0.17
VRC_SDK_VERSION <Comparator><value> {type:VRC_SDK_VERSION,data:>0.17} #checks if installed vrc sdk version > 0.17
TEXTURE_SET <PropertyName> {type:TEXTURE_SET,data:_ToonRamp} #checks if texture _ToonRamp is set
DROPDOWN <PropertyName><Comparator><value> {type:DROPDOWN,data:_LightingType==2} #checks if property _LightingType has enum 2 selected

Enum: ConditionType

States:
Value Effect
AND Combines two conditions with &&
OR Combines two conditions with ||
PROPERTY_BOOL checks agains the float value of a property
EDITOR_VERSION checks agains the version number of ThryEditor
VRC_SDK_VERSION checks agains the version number of the VRC SDK