5
Recently I started to be interested in game development (initially for the Android platform) and that’s why I met the engine Unity. I’ve never programmed in Java, the native language of Android. However, I know the C language#.
When reading more about the mentioned engine, I verified that it is possible to only use two languages "something derived from Javascript" and C#. Based on this, some doubts arose me:
- This means that it is possible to generate versions of bytecodes from C# to CLR and JVM?
- I thought it was only possible to do this through Shaman.
- What about the SDK issue and access to the system Apis?
I’m a layman, but one thing I can’t understand is what led Unity to adopt C#. When it comes to game development, we always look for performance. With a language dependent on a VM, we already have a bottleneck. With a non-native language, we’ll have two. But, I do not understand why they did not adopt Java, a language with more support and more mature (in my opinion) and at least on Android we would have a barrier less.
– DanOver
You are correct. Unity does not run only on Android, initially did not run on Android. Java does not run on a lot of platform that they were interested in and C# ran (contrary to popular belief). Maybe they liked C better, which is an easy thing to do. Know how to move and like is a much more adopted and more valid criterion in most cases where one tool is not clearly better than another for a task.
– Maniero
If I disassemble an . apk made with Xamarin will I have a CIL (and Mono) code instead of a Java generated file? Obfuscation tools for . net work normally and with the same effectiveness?
– DanOver
More or less, I don’t know if these tools don’t cause problems with Mono and I don’t know if Unity doesn’t change Mono a little. And
.apk
It’s not just CIL. I don’t know details, but I believe I have all the Mono there, and a shovel of things wrapped around it, plus other things specific to Android.– Maniero
Um... I’m not absolutely sure, but I strongly suspect that Unity uses Mono only to validate syntax and tals (that is, C# is only the language chosen to facilitate the implementation of scripts), and that it manages Java code to produce native APK. More information here: https://docs.unity3d.com/560/Documentation/Manual/android-BuildProcess.html (is the documentation of the previous version, but should not have changed this process).
– Luiz Vieira
@Luizvieira I think now is ok, today is different than I knew, and I simplified a little what ended up getting wrong. That’s what I’m looking for.
– Maniero
Bacana. The edition was great. : ) If I could give +1 +1. rs
– Luiz Vieira