gdquest-demos/godot-3-getting-started-2021

Instantiating balls by clicking doesn't work in Godot 4

Opened this issue · 0 comments

I'm submitting a...

  • Bug report.

Bug report

What is the current behavior?
Instantiating the ball by clicking in the instancing project does not work.

What is the expected behavior?
Clicking instantiates balls.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Load the instancing project in Godot v4
  2. Run project
  3. Instantiating balls doesn't work

Other

This post is how I figured out Godot 4 uses slightly different export syntax.

Suggested Solution
Add a comments with the syntax fix for Godot 4.

Instancing > Main.gd

# Godot 3
@export (PackedScene) var Ball
# Godot 4
#@export var Ball: PackedScene