HungryProton / scatter

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

Cache Issue #184

Open iwarner opened 7 months ago

iwarner commented 7 months ago

I have added Scatter Cache

On install no cache file is created, defaults to proton scatter addon cache location

I created - it worked, but on re-load of the game it crashes without being able to click anything

I deleted the cache file, and the app then works - but obviously complains there is no cache file

Godot 4.2.1 - Mac

florianvazelle commented 7 months ago

Hi 👋

I'll try to help you, but I have a few questions:

I submit two PR to fix some issues with the scatter cache node (https://github.com/HungryProton/scatter/pull/180 & https://github.com/HungryProton/scatter/pull/181), but they are not merged now, and I don't think its related to your issue but this can help

iwarner commented 7 months ago

Hiya

I'll try to help you, but I have a few questions:

It crash when you reload the game, or the editor ?

The editor

Do you have some logs before the crash ? Or it more like an endless loading ?

Its more like an endless loader

Do you use the last git version of the addon ? Or the version in the assetlib ?

GIT Verrsion

I submit two PR to fix some issues with the scatter cache node (https://github.com/HungryProton/scatter/pull/180 & https://github.com/HungryProton/scatter/pull/181), but they are not merged now, and I don't think its related to your issue but this can help

Ok I will try which should I download first?

Be great to include a doc maybe on how to create the cache resource file, and where this should be stored.

florianvazelle commented 7 months ago

I can't reproduce locally 🤔

Can you make a small reproducible example? Maybe it's a Mac issue, or specific to your Scatter nodes / models

Normally, you can create a cache resource anywhere

  1. In the Filesystem, click on Create > Resource

Screenshot_20240205-185047__01.jpg

  1. Search for ScatterCacheResource & Create it

Screenshot_20240205-185058__01.jpg

  1. Select the new ScatterCacheResource from the ScatterCache

Screenshot_20240205-185119__01.jpg

And can you try it with thread disabled ?

Screenshot_20240205-184615__01.jpg

SpeckDaKuhLeer commented 4 months ago

Hi, stumbled upon this thread because I had the same issue. The scene worked fine when I started it in the editor, but as soon as I closed the editor and reopened the project while a cache file existed the editor froze during startup.

The scene loaded, but stopped with a frozen image. It looked like an unshaded scene without any of the scatter objects and the yellow loading symbol at the position of the scatter object was visible. I waited for roughly 2 minutes, nothing happened.

I tried to remove objects one by one and make the scene simpler, because I was using about 20 proton scater nodes. However the game editor kept crashing on startup. I even tried a single default scatter node (bricks) with a shader cache, it didn't work.

I created a new project, was not able to recreate it. The problem now is (well at least to solve the issue) I removed every scatter related node from the scene, restarted the editor, now it works even with the same scene setup as before.