// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Utilities;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.UI
{
///
/// Theme Engine to change the texture on a GameObject based on state changes
///
public class InteractableTextureTheme : InteractableShaderTheme
{
///
public override bool IsEasingSupported => false;
protected new const string DefaultShaderProperty = "_MainTex";
public InteractableTextureTheme()
{
Types = new Type[] { typeof(Renderer) };
Name = "Texture Theme";
}
///
public override ThemeDefinition GetDefaultThemeDefinition()
{
return new ThemeDefinition()
{
ThemeType = GetType(),
StateProperties = new List()
{
new ThemeStateProperty()
{
Name = "Texture",
Type = ThemePropertyTypes.Texture,
Values = new List(),
Default = new ThemePropertyValue() { Texture = null },
TargetShader = StandardShaderUtility.MrtkStandardShader,
ShaderPropertyName = DefaultShaderProperty,
},
},
CustomProperties = new List(),
};
}
}
}