public override void SetToStart() { TweenColorRotation tween = ((TweenColorRotation)target); if (!tween.useMaterial) { Color initial; if (initialSet) { initial = tween.initialColor; tween.Awake(); tween.initialColor = initial; } else { tween.Awake(); initialSet = true; } tween.SetToLerpPoint(0f); } else { //if ( tween.material != null ) { // tween.material.SetMatrix(tween.materialProperty,); //} } }
public override void SetToEnd() { TweenColorRotation tween = ((TweenColorRotation)target); if (!tween.useMaterial) { tween.Awake(); tween.SetToLerpPoint(1f); } }
public void SetColor() { if (!initialSet) { return; } TweenColorRotation tween = ((TweenColorRotation)target); tween.Awake(); }
public override void OnInspectorGUI() { // base.OnInspectorGUI(); TweenColorRotation item = (TweenColorRotation)target; base.OnInspectorGUI(); if (item.setMatrix) { EditorGUILayout.HelpBox("use _MatrixYIQ property for supplied shaders or equivalent.", MessageType.Info); } if (GUILayout.Button("SetColor")) { SetColor(); } }