![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | mnjq2006 |
I have been researching on how threads work for a few days but I can’t seem to find a solution.
So I have a simple scene tree:
Node
- TileMap
and I have a script on the TileMap
node:
extends TileMap
var thread = Thread.new()
func _ready():
thread.start(self, "generate_tiles")
func generate_tiles(data):
for y in range(100):
for x in range(100):
set_cell(x,y,0) #btw the tileset[0] is a valid tileset I made
But why is it that when I play the project, it crashes?
When replace set_cell(x,y,0)
with print(x,y)
, it works perfectly fine.
Is there something about threads that I should know? (Sry I’m a little new to godot threads so I don’t understand exactly how they work)
Thanks