0 votes

One of the biggest reasons I find C# in Godot exciting is the ability to load some of the numerous external libraries that exist in the language.

I have successfully compiled Godot with Mono, but have yet to find a way to reference external DLLs.

Is there currently a way to do this?

asked Oct 30, 2017 in Engine by YoukaiCountry (23 points)

I use Xamarin studio: open your project and add them as references. You could also use Visual Studio or even VS Code (if you know how to modify the .project file). Or are you trying to use unmnaged code?

Are you trying to take an assembly, and use its functions and whatnot in a Godot project?

I'll give Xamarin a shot, thanks for the suggestion. Not trying for unmanaged code, just .net/mono assemblies.

Ertain:
Basically I just want to use general C# code that I or other have created, and reference them in Godot via C#. For example I have C# code that generates randomized noise that I would like to access within Godot.

YouKaiCountry: If you want to access the noise generator in Godot tool editor so that you can integrate with AudioPlayer, you must create a c++ module. No other way around it.

If you have access to raw pcm samples, then all you need to do is extend AudioStreamResampled

https://github.com/hungrymonkey/godot/blob/set_stream_bug/modules/dummy_audiostream/dummy_audiostream.cpp

here is an example of an 631 hz tone generator.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.