0

Challenge

A simple usrina program to show cube entity and some image. While running the app from the terminal, the cube entity along with the images are show perfectly. Here is the image while running from terminal

Then I created a .exe file using 'auto-py-to-exe' for the same application. While running the exe file, only the cube entity is show and the images are disappeared from the screen. Here is the image while running the exe file

Program code

from ursina import *
app = Ursina(title="App", borderless=False, fullscreen=False)
window.editor_ui.disable()
window.color=color.yellow

class c_1(Entity):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        parent_entity=Entity(parent=camera.ui,enabled=True)

        Entity(model='cube',parent=parent_entity,color=color.red,texture='white_cube',scale=0.2,
            position=(-0.5,0),rotation=(45,45,0))
        
        Sprite('assets/arrow.png',parent=parent_entity,scale=0.07,position=(0,0))

        Entity(model='quad',parent=parent_entity,texture='assets/down.png',scale=0.3,position=(0.5,0))
c_1()
app.run()

Here you can see the files and directory of the working environment

Image of directory of working files

Folder included in compiling the program

My_python_package\Lib\site-packages\direct

My_python_package\Lib\site-packages\panda3d

My_python_package\Lib\site-packages\panda3d-1.10.13.post1.dist-info

My_python_package\Lib\site-packages\ursina

My_python_package\Lib\site-packages\ursina

Root_folder\assets

[NOTE: My_python_package is the directory where python is installed in my system. And Root_folder is the root directory where the assets package is present]

Expectation Expect to show the images in the application when it is run from exe file as the images are show when it is run from the terminal.

Thanks

Sonarjit
  • 5
  • 2

0 Answers0