HungryProton / scatter

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

fix: create the default cache folder only inside the editor #180

Closed florianvazelle closed 6 months ago

florianvazelle commented 10 months ago

Hi, I submit a small bug fix :wave:

I don't store my cache file in the default cache folder, so when I export my game and run it, I get an error like this:

ERROR: Could not create directory: res://addons
   at: make_dir_recursive (core/io/dir_access.cpp:180)

I think that creating a default cache folder is only necessary when defining a default path to the cache file.

florianvazelle commented 10 months ago

Perhaps a better solution would be to create the path if it doesn't exist, but only when the code is executed from the editor, and otherwise log a clear error ? 🤔

florianvazelle commented 6 months ago

Hi @HungryProton, I think I finish with this MR, do you need extra informations on the initial issue ?

HungryProton commented 6 months ago

I'm sorry I thought I merged this one already but it looks like I completely forgot. Thanks again for the pull request! I'm merging it now

florianvazelle commented 6 months ago

@HungryProton

No problem 😊 Same for https://github.com/HungryProton/scatter/pull/181, is it good for you?