Closed nbrugger-tgm closed 3 years ago
The best solution here would probably be to provide installers/packages which have java (or openjdk) as dependency. And if this is the case we could simply execute java -jar game-controller.jar
This could be a solution : https://www.itexico.com/blog/
Also this seems viable but the documentation is old : https://docs.unity3d.com/530/Documentation/Manual/PluginsForAndroid.html
A thread about this topic https://answers.unity.com/questions/1425772/calling-a-java-method-in-android-from-unity.html
The game controller (Rest API) is (ow will be) written in java. But as a client should have the option to host a game we need a way to execute the API by C# which is used by the game client.
C# can easily access a ReST-Interface, why do you ask for a C#-Java-Bridge? What are the requirements?
It seems that my description was unclear.
The point is not about how to access the ReST interface. The problem is that the ReST (Software) Server is written in Java and the Game which needs to start the api is written in Unity/C#.
The reason for this is that every client should also be able to act as a game host. For this task the C# client needs to execute the java application (ReST Interface) which is actually hosting the game.
The access to the rest interface (HTTP requests) will be done by an auto generated (from OAS3) C# Client for the Api.
Then maybe the evaluation sprint will show that you should not implement the ReST server in Java (or do multiple implementations) ...
We decided to implement the API using the .NET core (C#). As i am not too experienced in this topic i will need the help of @kdanzer-tgm.
Research Java execution by C
The game controller (Rest API) is (ow will be) written in java. But as a client should have the option to host a game we need a way to execute the API by C# which is used by the game client.
Tasks