0 votes

I want to render my game with a transparent background/no background at all so that my desktop of my computer is visible behind the game, is there a way to make that possible?

Thank you?

asked May 6, 2019 in Engine by Sharon (14 points)
edited May 6, 2019 by Sharon

Window transparency is usually controlled by the window manager, I don't know about windows but some linux desktops like lxde don't support transparency. There are ways to fake transparency, you would likely need a separate script to run along side the game to do this.

1 Answer

+2 votes

This is possible since Godot 3.1. In the Project Settings, enable the following settings:

  • Display → Window → Per Pixel Transparency → Allowed
  • Display → Window → Per Pixel Transparency → Enabled
  • Display → Window → Per Pixel Transparency → Splash (only if the splash screen requires it)
answered May 7, 2019 by Calinou (6,336 points)

I tried doing this in my project to no avail. what other steps are necessary to achieve a transparent background?

You need to call get_tree().get_root().set_transparent_background(true) first

how would you toggle it off and on with a button in game?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.