在Unity中创建的游戏如何在Android设备上运行? [英] How can a game created in Unity can run on an Android device?

查看:1432
本文介绍了在Unity中创建的游戏如何在Android设备上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用Unity的新手,如果我理解正确,它可以使用C#语言工作. Android设备只能运行Java应用程序,因为这是其虚拟机Dalvik的工作.那么如何利用此程序的功能将其编译"为Android?

I'm new using Unity and, if I understood correctly, it works using C# language. Android devices can only run Java applications cause that's the work of its virtual machine: the Dalvik. So how can this be done with the feature of this program to "compile" to Android???

推荐答案

Android设备还可以运行通常用C或C ++编写的 native 代码.

Android devices can also run native code written normally in C or C++.

用C#编写的Unity应用程序被编译为.NET字节码. Unity构建Android应用时,它会基于 Mono 在本机代码中包含一个.NET字节码解释器.当您运行应用程序时,解释器将运行以执行字节码.这就是它可以在Android上运行的方式.

The Unity application written in C# is compiled to .NET bytecodes. When Unity builds an Android app, it includes a .NET bytecode interpreter in native code, based on Mono. When you run the app, the interpreter is run to execute the bytecodes. That's how it can run on Android.

这篇关于在Unity中创建的游戏如何在Android设备上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆