Switch meshlib through gdscript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kakcalu13

So, how do you exactly switch from test1.meshlib to test2.meshlib on gridmap?

I tried to follow this, but I’m not sure how to do it. I tried few and I kept getting errors.

:bust_in_silhouette: Reply From: Inces

What error do You get when You do :

 gridmap.mesh_library = preload(pathforyourtest2.meshlibhere)

This worked perfectly! Thank you so much, you a beautiful soui!

Where can I find more information about this? I don’t see it on docs.

kakcalu13 | 2022-01-14 15:25

Node.property is most basic way to change any property of any node. You only need property name and it is there in your link. Or did You mean preload() method ?

Inces | 2022-01-14 15:37

Sorry, I mean the preload() method!

kakcalu13 | 2022-01-14 16:32

This method is characteristic for Resource class, very important Godot data structure. You should maybe start from here(Resources — Godot Engine (stable) documentation in English), but it gets too advanced pretty soon.

Inces | 2022-01-14 17:20