PrivateList<sprite>storetexture; Public voidStart () {storetexture=NewList<sprite>(); Storetexture.clear (); //load the picture and store it in the listSprite Texture1 = resources.load<sprite> ("Textures/one"); Storetexture.add (Texture1); Sprite Texture2= Resources.load<sprite> ("Textures/two"); Storetexture.add (Texture2); Sprite Texture3= Resources.load<sprite> ("TEXTURES/3"); Storetexture.add (Texture3); //traverse the list object and print out the name foreach(varKkinchstoretexture) {Debug.logerror (kk.name); } } Private floatTimer =0; Private floatValue =3; Public voidUpdate () {//Logo1 change from transparent to opaque state if(Logoswtich = =logoswtich.start) {Timer+ = Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer >=1) {Logoswtich=Logoswtich.deletelogo1alpha; } } //Logo1 from opaque to Transparent if(Logoswtich = =logoswtich.deletelogo1alpha) {Timer-= Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer <=0) {Logoswtich=Logoswtich.changelogo2; } } //Replace the Logo1 with the Logo2 if(Logoswtich = =logoswtich.changelogo2) {logo. Getcomponent<Image> (). Sprite = storetexture[1]; Logoswtich=Logoswtich.addlogo2alpha; } //Logo2 change from transparent to opaque state if(Logoswtich = =logoswtich.addlogo2alpha) {Timer+ = Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer >=1) {Logoswtich=Logoswtich.deletelogo2alpha; } } //Logo1 from opaque to Transparent if(Logoswtich = =logoswtich.deletelogo2alpha) {Timer-= Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer <=0) {Logoswtich=Logoswtich.changelogo3; } } //Replace the Logo2 with the Logo3 if(Logoswtich = =Logoswtich.changelogo3) {logo. Getcomponent<Image> (). Sprite = storetexture[2]; Logoswtich=Logoswtich.addlogo3alpha; } //Logo3 change from transparent to opaque state if(Logoswtich = =logoswtich.addlogo3alpha) {Timer+ = Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer >=1) {Logoswtich=Logoswtich.deletelogo3alph; } } //Logo3 from opaque to Transparent if(Logoswtich = =Logoswtich.deletelogo3alph) {Timer-= Time.deltatime/value; Logo. Getcomponent<Image> (). color =NewColor (1,1,1, Timer); if(Timer <=0) {Logoswtich=Logoswtich.changelogo1; } } //Replace the Logo3 with the Logo1 if(Logoswtich = =logoswtich.changelogo1) {logo. Getcomponent<Image> (). Sprite = storetexture[0]; Logoswtich=Logoswtich.start; }} Logoswtich Logoswtich=Logoswtich.start; //logo picture Toggle Status Public enumLogoswtich {Start, Deletelogo1alpha, ChangeLogo2, Addlogo2alpha, Deletelogo2al PHA, ChangeLogo3, Addlogo3alpha, Deletelogo3alph, ChangeLogo1, End}
Replace the logo image property with the image component in unity as follows:
1 Sprite used to render the image.
2. Overridesprite sets the overlay sprite for rendering, and setting to NULL restores the default srpite.
Replacing picture properties with rawimage components in unity is texture (rawimage texture)
Unity in the implementation of three logo images for 3 seconds of the looming after each other to switch logo image