Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.72k stars 159 forks source link

Heightmap never saves (nothing is created in data folder) #190

Open Favkis opened 4 years ago

Favkis commented 4 years ago

Heightmap cannot save it's data ever

To Reproduce I tried empty new scene, just with heightmap, tried editing textures/height. Tried saving scene without editing anything in heightmap - it just cannot save it. Even tried 3 new folders, created from godot and windows explorer. Trued multiple heightmaps, tried heightmaps in other scenes, they cannot save files.

Expected behavior Heightmap to save it's data.

Screenshots image

Environment WIN10 3.2.2 + voxel_godot module master GLES3

Favkis commented 4 years ago

I also tried to export heightmap image and it does export it image

Favkis commented 4 years ago

Tried opening in godot 3.2.2 march voxel_godot binary, and now I have new issue. I have now files in folder: image

But cannot select path for HTerrain, selecting this folder says: No loader found for resource: res://heightmap4/data.hterrain.

Created new folder, after saving it has new files too image

But after starting game I get this image

Zylann commented 4 years ago

Problems like this keep happening from time to time and I just don't know what on Earth is happening. It's really up to Godot to save the data, and sometimes it's stupidly hard just to make the editor realize the resource must be saved. The only well-defined scenario I know of where it happens, is this: https://github.com/Zylann/godot_heightmap_plugin/issues/101 but I doubt it's what you run into.

Your first report is incomplete, as it shows logs from a running game after the bug already happened. You need to show editor logs from the moment you start your repro until the bug happens.

There is an issue open already so yours is likely a duplicate: https://github.com/Zylann/godot_heightmap_plugin/issues/120 And as I explain in this comment, I didnt manage to reproduce any of this, hence I can't fix it, see the video I recorded here https://github.com/Zylann/godot_heightmap_plugin/issues/120#issuecomment-578988766

But cannot select path for HTerrain, selecting this folder says: No loader found for resource: res://heightmap4/data.hterrain.

That's a better insight in what could be happening, which was also found in the existing issue, but the only clue I have so far is that Godot, for some obscure reason, is not finding the loader, which is right there: https://github.com/Zylann/godot_heightmap_plugin/blob/master/addons/zylann.hterrain/hterrain_resource_loader.gd See https://github.com/Zylann/godot_heightmap_plugin/issues/120#issuecomment-618695103

Zylann commented 3 years ago

I did a slight change to the saving in master, you may want to try see if your problem still occurs. (however if the cause IS Godot not finding the resource saver again, that's still a mystery)