HungryProton / scatter

Godot engine addon to randomly fill an area with props or other scenes
MIT License
2.08k stars 94 forks source link

Use use_chunks and chunk_dimensions are not loaded properly #170

Open Hugal31 opened 11 months ago

Hugal31 commented 11 months ago

The settings use_chunks and chunk_dimensions are not loaded properly when launching the game. They work in the editor and are saved in the scene file under "Performance/...", but when running the game, they return to the default values.

If I add a print in _on_transforms_ready, we can see the difference between in-editor and in-game:

if not transforms or transforms.is_empty():
    clear_output()
    update_gizmos()
    return

print("Set transforms. Mode is %d, use_chunks is %s and chunk_dimensions is %s" % [render_mode, use_chunks, chunk_dimensions])
match render_mode:
    0:
    if use_chunks:
        _update_split_multimeshes()
# In editor
Set transforms. Mode is 0, use_chunks is false and chunk_dimensions is (30, 35, 30)
# In game
Set transforms. Mode is 0, use_chunks is true and chunk_dimensions is (15, 15, 15)
STehrani commented 2 months ago

I am having the same issue