Skip to content

mguddeti/GDScriptToCPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDScriptToC++

A wrapper class to expose GDNative C++ functions to GDScript when compiling with Emscripten.

Use

  1. Copy the contents of lib.cpp to local version.

  2. Add the following function to your module class:

template <typename... Args>
emscripten::function wrapper(const String &func, Args &&...args) {
    return emscripten::function(func, std::forward<Args>(args)...);
}
  1. Add <emscripten/bind.h> to your module.

  2. Call C++ functions from main.gd.

  3. Compile project to WASM with Emscripten.

About

A wrapper class to expose GDNative C++ functions to GDScript when compiling with Emscripten.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published