- Home /
Creating a GUI that can fade transition over time to other GUI
Hey, so i have a plane that is placed over my character so that i can place material with text that i want to display on it, and a script that changes the material. my code is here
#pragma strict
//this script changes the material of the object to the different materials
var textures : Texture2D[];
var delay = 1.0;
private var textureCounter = 0;
function Start ()
{
InvokeRepeating("CycleTextures", delay, delay);
}
function CycleTextures ()
{
textureCounter = ++textureCounter % textures.length;
GetComponent.<Renderer>().material.mainTexture = textures[textureCounter];
}
the problem that i have with this is that the script does not fade into and out of the current material. second, i would like to use a GUI because right now i have to create an image in Photoshop, import that image into unity, change it to a material, and then add it to the script. i find that too hassling and it could be a huge problem later on.
so all in all, im trying to A: get a Gui that floats over my characters head with text on it B: Get the text to change over time C: get the text to fade in and out between transitions
how would i go about doing this?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Change skybox color via script? 0 Answers
UI Text - changing material instance 1 Answer
Distribute terrain in zones 3 Answers
Is it possible to calculate batch count of each material ? 0 Answers