python - 当我尝试在 Python 上使用 Ursina 时出现黑屏

标签 python ursina

from ursina import *


Entity(model='quad', scale=60, texture='assets/blue_sky')
app = Ursina()

app.run()   # opens a window and starts the game.

when i run the code

the black screen with nothing

最佳答案

我认为这是可行的,但只是规模太大了。通常,如果比例为 15,它会覆盖整个屏幕,任何高于该比例的值都与 15 相同。此外,您应该在 Ursina() 之后创建实体。因此,如果您不想覆盖整个屏幕,这就是您的代码(比例可以是 1 到 15 之间的任意值,但不能是 15):

from ursina import *

app = Ursina()

Entity(model='quad', scale=10, texture='assets/blue_sky')

app.run() # opens a window and starts the game.

上面的代码对我有用,但如果它对你不起作用,我不知道出了什么问题......

关于python - 当我尝试在 Python 上使用 Ursina 时出现黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69963253/

相关文章:

python - 如何在 `FormView.get_success_url()`中访问表单数据

python - 我的工作簿在哪里弹出?

python在类中的dll回调函数中访问self

python - Ursina 中的第一人称 Controller y-pos 逻辑

python - 在 Ursina 中使用鼠标正确关闭窗口

python - Ursina Python 引擎 : Lighting, 阴影和光晕效果

python - PySpark:如何从嵌套在数组内的结构中的结构中提取变量?

python - seaborn/matplotlib 中的直方图显示 x 轴上的所有分箱数据索引