Inspector does not show "Platform" option for GDNativeLibrary

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SergLoff
:warning: Old Version Published before Godot 3 was released.

Hello!
I am following this and this guides on GDNative using the Godot 3.0 Beta 1 from here and when creating a GDNativeLibrary resource i’m supposed to see this:

But I don’t have the “Platform” option, instead, i’ve got “Load Once” , “Singleton” and “Symbol Prefix”.
Am I missing something?
Thanks.

:bust_in_silhouette: Reply From: Zylann

The system changed, but as a counterpart there is no more UI for it (because it was just not done, as it’s a bit more complex, though PRs to address this are welcome).

A way to do this now is to edit the .gdnlib directly, which is actually a simple configuration file.
Here is an example taken from OpenVR plugin: https://github.com/BastiaanOlij/godot_openvr/blob/master/demo/bin/godot_openvr.gdnlib

[general]

singleton=true
load_once=true
symbol_prefix="godot_openvr_"

[entry]

X11.64="res://bin/libgodot_openvr.so"
Windows.64="res://bin/godot_openvr.dll"
OSX="res://bin/libgodot_openvr.dylib"

[dependencies]

X11.64=[]
Windows=[]
OSX.64=[]

Thank you! just one thing, do i have to change the .tres (SimpleLibrary.tres) extension to .gdnlib?

SergLoff | 2017-12-06 18:31

I don’t think so, I never tried to save it as .tres but it’s also a readable text format so it shouldn’t be too hard to modify.

Zylann | 2017-12-06 19:47