0

I can't set my game's window backgroun image.

This is what I have tried:

mainbg = Sky(texture = 'Assets/ruined_city_main_bg')

But that was incomprehensible and scary. Also I have tried:

mainbg = Entity(parent = camera.ui, '''All other arguments''', texture = 'Assets/ruined_city_main_bg', position = (0, 0))

The "ENTITY BG" is not showing.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 05 '23 at 17:33

2 Answers2

1

You can't see it because you didn't give it a model. Try adding model='quad'.

mainbg = Entity(parent=camera.ui, model='quad', texture='ruined_city_main_bg')
pokepetter
  • 1,383
  • 5
  • 8
0

it looks like you are not setting the file extension.

For example: ruined_city_main_bg.png

where .png is an image extension.

or try:

skybox_image = load_texture("sky_sunset.jpg")

Sky(texture=skybox_image)

Don't forget the file extension.