We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The newly created Static Body has a null pointer exception when setting setGameObject
The text was updated successfully, but these errors were encountered:
I guess setGameObject() could handle this better, but if you're creating the body yourself you should just pass gameObject in new StaticBody().
setGameObject()
gameObject
new StaticBody()
Sorry, something went wrong.
What code did you use to create this? We really need to see sample code to know if this is a bug, or just an implementation issue, thanks.
你用什么代码来创建这个?我们真的需要查看示例代码才能知道这是一个错误,还是只是一个实现问题,谢谢。
const staticBody = this.physics.add.staticBody(0, 0, 10, 10) const rect = this.add.rectangle(0, 0, 10, 10) staticBody.setGameObject(rect)
No branches or pull requests
Version
Phaser Version: 3.86.0
Description
The newly created Static Body has a null pointer exception when setting setGameObject
The text was updated successfully, but these errors were encountered: