pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.18k stars 327 forks source link

AttributeError after DebugMenu call #267

Closed RadiantUwU closed 2 years ago

RadiantUwU commented 3 years ago
package_folder: C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina
asset_folder: C:\Users\Stefan\PycharmProjects\nice 3D game
blender_paths:
{'2.9': WindowsPath('C:/Program Files/Blender Foundation/Blender 2.90/blender.exe'),
 'default': WindowsPath('C:/Program Files/Blender Foundation/Blender 2.90/blender.exe')}
screen resolution: (1280, 1024)
[10 Sep 2021 20:47:59 ERROR]: An error has occurred while running 'color 07'
[10 Sep 2021 20:47:59 WARN]: Could not initialize high colors via 'color 07'
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\Stefan\PycharmProjects\nice 3D game\game.py", line 1, in <module>
    from engine import *
  File "C:\Users\Stefan\PycharmProjects\nice 3D game\engine\__init__.py", line 5, in <module>
    import engine.ingame_debug as _
  File "C:\Users\Stefan\PycharmProjects\nice 3D game\engine\ingame_debug.py", line 18, in <module>
    DebugMenu(AppControl())
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\prefabs\debug_menu.py", line 5, in __init__
    super().__init__()
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\prefabs\draggable.py", line 8, in __init__
    super().__init__(**kwargs)
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\prefabs\button.py", line 26, in __init__
    self.model = Quad(aspect=self.scale[0] / self.scale[1])
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\models\procedural\quad.py", line 11, in Quad
    return QuadMesh(radius, segments, aspect, scale, mode, thickness)
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\models\procedural\quad.py", line 42, in __init__
    new_verts.append(QuadMesh.point_placer.world_position)
  File "C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages\ursina\entity.py", line 410, in world_position
    return Vec3(self.get_position(render))
NameError: name 'render' is not defined

Process finished with exit code 1
pokepetter commented 3 years ago

create Ursina() before creating entities