Class CustomMaterialSetup
Retain mapping of Pixyz custom shaders to Unity shaders
Implements
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.Pixyz.UnitySDK
Assembly: Unity.Pixyz.UnitySDK.Runtime.dll
Syntax
public class CustomMaterialSetup : ScriptableObject, ISerializationCallbackReceiver
Constructors
CustomMaterialSetup()
Declaration
public CustomMaterialSetup()
Properties
ShaderConversionBindings
Declaration
public IReadOnlyDictionary<string, ShaderConversion> ShaderConversionBindings { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, ShaderConversion> |
Methods
AddCustomShaderBinding(string, string)
Create a new empty binding between customShder and unityShader and add it to this material setup
Declaration
public ShaderConversion AddCustomShaderBinding(string customShaderName, string unityShader)
Parameters
Type | Name | Description |
---|---|---|
string | customShaderName | |
string | unityShader |
Returns
Type | Description |
---|---|
ShaderConversion |
CloneBinding(string, string, string)
Declaration
public ShaderConversion CloneBinding(string customShader, string newCustomShader, string newUnityShader)
Parameters
Type | Name | Description |
---|---|---|
string | customShader | |
string | newCustomShader | |
string | newUnityShader |
Returns
Type | Description |
---|---|
ShaderConversion |
OnAfterDeserialize()
Implement this method to receive a callback after Unity deserializes your object.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Implement this method to receive a callback before Unity serializes your object.
Declaration
public void OnBeforeSerialize()
RemoveCustomShaderBinding(string)
Remove the binding with the customShaderName provided
Declaration
public void RemoveCustomShaderBinding(string customShaderName)
Parameters
Type | Name | Description |
---|---|---|
string | customShaderName |
SetShaderBinding(string, ShaderConversion)
if customShaderName is different from the shaderName of the provided bindings the material setup will update the internal binding if customShaderName has the same shader name of the provided binding it will be added to the setup (or override if already added)
Declaration
public void SetShaderBinding(string customShaderName, ShaderConversion bindings)
Parameters
Type | Name | Description |
---|---|---|
string | customShaderName | |
ShaderConversion | bindings |