Home > other > Unity3d2018 implementation scenario fades but no response for your guidance
Unity3d2018 implementation scenario fades but no response for your guidance
Time:09-29
using System. The Collections. using System.Collections.Generic; using UnityEngine; Using UnityEngine. SceneManagement;
Public class fadeInOut: MonoBehaviour { Public float fadeSpeed=1.5 f; Private bool sceneStarting=true; Private GUITexture Tex; Void the Start () { Tex=this. GetComponent (a); Tex. PixelInset=new the Rect (0, 0, Screen width, Screen, height); } Void the Update () { If (sceneStarting) { The StartScene (); } } Private void FadeToClear () { Tex. Color=color. Lerp (Tex. Color, the color clear, fadeSpeed * Time deltaTime); } Private void FadeToBlack () { Tex. Color=color. Lerp (Tex. Color, color black, fadeSpeed * Time deltaTime); } Private void StartScene () { FadeToClear (); If (Tex. Color. A & lt;=0.05 f) { Tex. Color=color. The clear; Tex. Enabled=false; SceneStarting=false; } } Public void EndScen () { Tex. Enabled=true; FadeToBlack (); If (Tex. Color. A & gt;=0.95 f) { SceneManager. LoadScene (" Demo "); } }
}
CodePudding user response:
And why can't the public authority fadeSpeed variables on the unity interface change
CodePudding user response:
The big tuo code, looking at skull ache,,,,
CodePudding user response:
Switch the scene, and fadeout a ghost?? Means you turn off the tap, then said I say let him the water less,!!!!! You already turn off the faucet,,,,,,,!!!!! Program that is one thing,,,,,,,, you thought it was a little less, actually the whole closed, is a single line of code