Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

HoTween: Having trouble tweening a material's color

$
0
0
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))); } } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>