mohsenph69 / Godot-MTerrain-plugin

A GDExtension plugin which give godot the ability to produce highly optimized Terrain for Open world games
MIT License
399 stars 22 forks source link

Here are compiled libaries for MacOS and iOS #42

Open STehrani opened 1 month ago

STehrani commented 1 month ago

Hello Mohsen,

thank you for making that plugin. I think your project becomes more accessible, if Mac-User can also use it. I have put the universal dylibs in the zip file below for everybody to use, which goes into <Your Godot Project>/addons/m_terrain/libs.

There where a few problems, before I was able to compile MTerrain. For some reason, the import in some of the python files were not working properly, e.g. windows.py, linux.py, ios.py, target.py. For instance:

from SCons.Variables import *

That import-statement didn't load "BoolVariable". So underneath that line, I added:

from SCons.Variables import BoolVariable

Stating the import explicitly solved the problem. That was also the case for "EnumVariable".

Here are the compiled files for Mac:

libMTerrain-for-MacOS-and-iOS.zip

STehrani commented 1 month ago

I am still figuring out how to use it. When I load a heightmap into Godot, it shows up on the screen, but it seems to be detached from any node. That means, that I cannot move it around or do other changes.

I also need to press the "Create" button for the MTerrain-Node in the Inspector, every time I open the project. Otherwise the terrain wouldn't be shown in the editor.

arimus commented 1 week ago

I also got this from Godot-MTerrain-plugin/gdextension/godot-cpp/tools/targets.py

NameError: name 'EnumVariable' is not defined

Did the same import for that and got things working for the build. Interesting to note that the master branch of godot-cpp does the import the correct way and should not cause an issue. The git sub-module seems to be locked to 631cd5fe37d4e6df6e5eb66eb4435feca12708cc, which is older. Should probably upgrade to a newer version that at least has this issue resolved OR provide a little patch script to fix-up after fetching.