Comments (8)
The thing is, you would expect any saving to be completed before Godot starts the game... so there shouldn't be file locking issues (but I don't know for sure if Godot actually respects that). The only known issue you might encounter is that if you made unsaved changes and play, Godot won't re-import the saved PNGs until you unfocus/refocus the editor so in the worst case you might just see a slightly out-of-date terrain. But flat-out being unable to load even a PNG from this folder is unexpected and I don't know what could be done to figure out what's really happening.
Maybe as a test, try to comment out all the code in the saver to prevent those files to be eventually written to, to check if it's some weird permissions issue (and restart the editor to make sure the plugin reloads properly), but again if that's the cause, that would mean Godot is wrongly starting the game too early which the plugin can't possibly workaround.
from godot_heightmap_plugin.
All I can say is that this is somehow a Godot bug. The terrain uses a custom loader here: https://github.com/Zylann/godot_heightmap_plugin/blob/master/addons/zylann.hterrain/hterrain_resource_loader.gd
"no loader found" is a Godot error... as in, no code from that plugin even has a chance to run, it's like Godot is litterally not calling that code and fails earlier for unexplained reasons.
There seems to have been weird heisenbugs with custom savers and loaders for a very long time (notably saving). I suspect all the changes that have been done to GDScript over the years have somehow broken it in very unintuitive ways and nobody has looked into it. I could never do that either because these issues just never reproduced on my end...
Btw I find it extremely weird that on your screenshot Godot goes through NativeCalls.cs
, a C# file, and somehow ends up printing an error about failing to load splat.png
, which is terrain data file while this plugin is written in GDScript.
(that doesn't mean you can't use C# with a GDScript plugin, but I'm curious why C# gets involved here)
from godot_heightmap_plugin.
I see, thanks. Thought you may have any ideas or already saw something similar. Terrain saving and in-editor behavior is all working just fine for me, never had any issues there, only that strange project build/start bug.
Looks like I will have to inspect the original C++ eventually if want to find out the cause 🙂
I will update the issue if I get any mood to do a deep dive in Godot sources and get to find the source of the issue.
Oh, splat.png
is on my side, I'm loading it separately (in C#) to determine the textures used on different parts of the terrain and map them to correct steps sounds. But this problem was present before I've added this system. Though, now it looks like the whole data directory is not accessible at this point, strange
from godot_heightmap_plugin.
And is the data directory actually present? Like, its contents have not been erased or anything?
from godot_heightmap_plugin.
I mean not accessible when that issue happens. The directory is obviously always here as I'm able to load the project correctly with restart later
from godot_heightmap_plugin.
Just had a thought. Could it be connected to a plugin saving the data on a scene save? When Godot starting/building the project it's always saving the opened scenes; maybe sometimes it doesn't do it fast enough and just started in-game plugin fails to load because the files are still being written to? Maybe you have any functionality connected to that save scene
logic?
from godot_heightmap_plugin.
Can't test right now, maybe will do it tomorrow. I will let you know in this thread if I happen to found out anything. Thanks a lot
from godot_heightmap_plugin.
Ok, I found out the culprit. For some reason Godot sometimes doesn't register yours hterrain_resource_loader.gd
after rebuild and nobody can handle *.hterrain
resource type in that case, thus terrain doesn't appear.
Previous part is understandable, but it's strange that separately after that my another C# script cannot load the splat.png
. It is throwing error 7
, which is according to those Godot headers is ERR_FILE_NOT_FOUND
. I'm using Godot library to load this file, so something goes wrong inside, because I tried to locate the files with .NET internal library just before it gets accessed by Godot and it seems fine / existing.
Oh, yes, and it is definitely not saving-lock issue, commented your saver to just return Ok
without saving, but it have not prevented the issue in any way.
Yea, crazy stuff... :)
from godot_heightmap_plugin.
Related Issues (20)
- Strange square and contour artifacts in imported terrain HOT 7
- HTerrainDetailedLayer issues using centered maps HOT 3
- Tangent error in shader HOT 15
- How to get Multisplat16 working in procedural generation? HOT 3
- Allow showing CollisionShapes3D inside a StaticBody3D in the Editor for Dreadpon's Godot Spatial Gardener and maybe others to work with the plugin HOT 2
- Grass continues after the terrain and don't know why HOT 6
- mesh export is not same collide with the hterrain HOT 13
- Can't Texture Paint HOT 5
- Is it possible to create infinite procedural generated terrain? HOT 1
- texture can not paint second one HOT 3
- center terrain get_height_at has diff than true pos HOT 1
- godot4.3.beta3 error HOT 8
- Detail Layer extends far from the actual terrain? + Folder structure HOT 2
- Error after deleting plugin HOT 1
- Regen multimesh HOT 1
- tree scene paint HOT 2
- Probably godot regression in >= 4.3 beta 2 HOT 1
- How can I make a larger map? HOT 1
- Cannot load single-channel, 32-bit float EXR file HOT 3
- Symmetric Painting HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot_heightmap_plugin.