Fix editor freeze on loading saved chunks.

This commit is contained in:
Relintai 2020-02-26 12:19:55 +01:00
parent 08e19a9011
commit 69666f37c6
2 changed files with 11 additions and 9 deletions

View File

@ -1,3 +1,4 @@
tool
extends VoxelChunk extends VoxelChunk
class_name TVVoxelChunk class_name TVVoxelChunk

View File

@ -40,15 +40,16 @@ var _player_file_name : String
var _player : Entity var _player : Entity
func _enter_tree(): func _enter_tree():
# for ch in get_children(): for ch in get_children():
# if ch is VoxelChunk: if ch is VoxelChunk:
# var c : VoxelChunk = ch as VoxelChunk var c : VoxelChunk = ch as VoxelChunk
#
# c.set_voxel_world(self) c.set_voxel_world(self)
# c.set_library(library) c.set_library(library)
# c.set_size(c.size_x, c.size_y, c.size_z, c.margin_start, c.margin_end) c.set_size(c.size_x, c.size_y, c.size_z, c.margin_start, c.margin_end)
# add_chunk(c, c.position_x, c.position_y, c.position_z) # c.is_build_threaded = false
# c.build_deferred() add_chunk(c, c.position_x, c.position_y, c.position_z)
c.build_deferred()