novhack / godot-gifexporter

GDNative plugin adding a GifExporter node that enables GIF file export to Godot Engine 3.2
MIT License
7 stars 1 forks source link

Check if the NativeScript's current library path exists #2

Closed OverloadedOrama closed 4 years ago

OverloadedOrama commented 4 years ago

This should make projects that use the gif exporter run in Godot for platforms that don't have a library for it, like Mac. I haven't tested it, but I assume running projects on Mac would crash because of "preload("res://addons/godot-gifexporter/src/GifExporter.gdns").new()". Now, it checks if the library exists before instantiating it.

This is also related to https://github.com/Orama-Interactive/Pixelorama/issues/245 In theory, people who have trouble running projects from Linux, can now just remove their library path from GifExporter.gdnlib, and the projects will run fine. This is not an actual solution of course, but it's a decent workaround.

To test it, just remove temporarily the path of your platform's library and run the project. It should print an "GIF export is not supported on this platform" error, but it will not crash.