Class ThemeStateProperty
Class to store information about a Theme property that contains values per available state
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class ThemeStateProperty
Fields
ShaderPropertyID
Declaration
[NonSerialized]
protected int ShaderPropertyID
Field Value
Type | Description |
---|---|
Int32 |
Properties
Default
Default value to use for this property
Declaration
public ThemePropertyValue Default { get; set; }
Property Value
Type | Description |
---|---|
ThemePropertyValue |
Name
Name of property, useful for comparisons and editor displaying
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
ShaderPropertyName
Name of the shader property, defined in the TargetShader, to utilize for getting/setting values with this property, if applicable Supported by Themes which have AreShadersSupported set to true
Declaration
public string ShaderPropertyName { get; set; }
Property Value
Type | Description |
---|---|
String |
StartValue
The starting value of this property
Declaration
public ThemePropertyValue StartValue { get; set; }
Property Value
Type | Description |
---|---|
ThemePropertyValue |
TargetShader
Shader to target for getting/setting values with this property, if applicable Supported by Themes which have AreShadersSupported set to true
Declaration
public Shader TargetShader { get; set; }
Property Value
Type | Description |
---|---|
Shader |
Type
Type of value stored in this property
Declaration
public ThemePropertyTypes Type { get; set; }
Property Value
Type | Description |
---|---|
ThemePropertyTypes |
Values
List of values corresponding to every available state
Declaration
public List<ThemePropertyValue> Values { get; set; }
Property Value
Type | Description |
---|---|
List<ThemePropertyValue> |
Methods
GetShaderPropertyId()
Lazy loads shader property ID from Unity for the ShaderPropertyName
Declaration
public int GetShaderPropertyId()
Returns
Type | Description |
---|---|
Int32 | integer key for current shader property to get/set shader values |
IsShaderPropertyType(ThemePropertyTypes)
Utility function that determines if the passed property type is supported for shader targeting
Declaration
public static bool IsShaderPropertyType(ThemePropertyTypes type)
Parameters
Type | Name | Description |
---|---|---|
ThemePropertyTypes | type | type of property value |
Returns
Type | Description |
---|---|
Boolean | true if property type supports shader targeting, false otherwise |
MigrateShaderData()
This temporary function will migrate over the previously set shader data (via the now deprecated properties) to the new TargetShader and ShaderPropertyName properties
Declaration
public void MigrateShaderData()