hey Eric thanks
i do get the follow errors I can’t seem to get solved…
Assets/Standard Assets/Scripts/FadeInAlpha.cs(14,32): error CS0103: The name Fade' does not exist in the current context Assets/Standard Assets/Scripts/FadeInAlpha.cs(14,17): error CS1502: The best overloaded method match for UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)’ has some invalid arguments
Assets/Standard Assets/Scripts/FadeInAlpha.cs(14,17): error CS1503: Argument #1' cannot convert object’ expression to type `System.Collections.IEnumerator’
this Fade script is in Standard Assets/Scripts and on an empty GO in the scene.
this is the code i use to call the fading:
using UnityEngine;
using System.Collections;
public class FadeInAlpha : MonoBehaviour {
public float delay;
public float speed;
public Material[] mat;
//bool fade;
IEnumerator Start () {
yield return new WaitForSeconds (delay);
//fade=true;
StartCoroutine(Fade.use.Alpha(renderer.mat, 0.0f, 1.0f, speed, EaseType.In));
}
/*void Update () {
if(fade==true){
Color color = renderer.material.color;
color.a += 0.1f;
renderer.material.color = color;
}
}*/
}
almost there, how do i Fade in the object if it has multiple materials? renderer.materials gives this Error: object is a UnityEngine.Material[ ]. It must be a GUITexture or a Material
UnityEngine.Debug:LogError(Object)