I'm trying to lerp a material's color with HoTween, but I'm getting an error:
**Material doesn't have a color property '< noninit >'**
I have a scene that contains a cube and the cube has it's own new Diffuse material. But I get an error when I try to run this test.
using UnityEngine;
using System.Collections;
using Holoville.HOTween;
using Holoville.HOTween.Plugins;
public class HoTweenColorTest : MonoBehaviour {
public Material _Material;
void OnGUI()
{
if (GUI.Button( new Rect(100f, 100f, 100f, 100f), "Start Color Lerp"))
{
HOTween.To(_Material, 1f, new TweenParms()
.Prop("color", new PlugSetColor(Color.red)));
}
}
}
↧