Wrap Unity3D project with Juce


#1

Task:

- Wrap Unity3D project with Juce

- Run on as many Juce-supported platforms as possible.

 

 


#2

- Wrap Unity3D project with Juce

Maybe you want to elaborate here. You want to run JUCE code inside Unity, or run Unity embedded, or ..? (With the latter not being possible)


#3

I see a possible 3 scenarios with this question.


1. You are asking to put Unity3D codes in Juce.
While it is possible somehow using libraries, it is highly impractical and by far too time consuming to be profitable.

2. You are asking to put Juce in Unity3D
This is possible by modifying ALL interfaces by marshalling the code. Various keys are required to be added in order for the linker to keep the names appropriate for linking using a library. Downside is that for every export you'll need to provide a custom library compilation. Generally this takes quite some time too and is not at all update-friendly.

However, you could also link various services together using either outerprocess communication (like TCP sockets) and compile it as a separate program. Then you'll call the separate program while starting the game and have them communicate. This is by far the most reasonable way of doing it and with proper design is best to maintain.

3. You are asking to make Unity3D projects working without Unity3D resources using C++ Juce.
While Unity3D projects are usually in C# or Javascript, Juce is in C++. They are not compatible unless you'd provide linking as stated in scenario 2.
Even if you were to write a parse and make the C# a script language (or use Juce's javascript engine), while Juce being powerful, is not meant for that heavy graphic computing Unity3D can. There is a reason why the engine has its own editor and not just a huge source code. Aside from that being impractical, it also takes most of the time of all scenario's to build and for it to work stable.

Hope that helps!