component : fadein


version 3.5.2 topic : component UI - Fadein

Let’s make a nice scene component that makes the whole screen transit from black to blank in 1.0 second.

  1. add scene node2D
  2. add ColorRect and rename it to “Fadein”
  3. under last add AnimationPlayer

Nice, that is all you need to have. Now resize the ColorRect to whole screen you will use for example 1024x600px.

Open the AnimationPlayer.

  1. add animation and name it “start”
  2. select the ColorRect “Fadein”
  3. add track for “color” and another track for “visible”
  4. now you need to set at 0.0 second frame time visible to “true” and color to “black”
  5. and for last 1.0 second frame set visible to “false” and color to “blank” that means alpha is at 0
  6. press the “autoplay” button so the things starts everytime a scene opens with this component

After this select the “Fadein” and save it as new branch into a “components” folder you make from which you will put it to the scenes at the end of each scene to block input until the scene shows.

As last step look if the default color of the ColorRect is blank. Because otherwise it would block your view at the scene.