使用 Unity 为 iPhone 开发游戏

发布于 2024-10-20 09:31:12 字数 125 浏览 3 评论 0原文

我决定使用 Unity 游戏引擎来开发 iPhone 游戏。但我需要使用iOS SDK内置的一些功能。

如果我选择使用Unity进行开发,我还可以使用标准iOS SDK中的功能吗?比如访问 url 的函数等等......

I have decided to use the game engine Unity to develop my game for iPhone. But I need to use some functions built into the iOS SDK.

If I choose to develop using Unity, can I still use functions from the standard iOS SDK? Like functions to access a url, etc...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

翻身的咸鱼 2024-10-27 09:31:12

当您为 iOS 编译 Unity 项目时,它会采用 C# 或 JavaScript 代码,然后 AOT 将其编译为本机 dll。然后它创建一个 xcode 项目来加载该 dll。您可以将本机 ObjectiveC 或 C/C++ 函数添加到此项目中,并将它们公开以供从 Unity 引擎调用。

http://unity3d.com/support/documentation/Manual/Plugins.html

Unity 还具有用于访问 URL 的内置方法。

When you compile a Unity project for iOS it takes your C# or JavaScript code and AOT compiles it to a native dll. It then creates an xcode project which loads that dll. You can add native objectiveC, or C/C++ functions to this project and expose them for calling from the Unity engine.

http://unity3d.com/support/documentation/Manual/Plugins.html

Unity also has built-in methods for accessing URLs.

野却迷人 2024-10-27 09:31:12

我不知道Unity SDK是如何构建的,但如果它是静态Objective-C库,那么您可以毫无问题地访问iOS SDK功能。如果它是一个脚本引擎,您在 IDE 之外开发脚本,那么您可能无法访问 iOS 功能。

您是否检查过其他用于游戏开发的引擎/sdk?我知道 Cocos2D详细记录,并且我确信您可以调用 iOS 方法。
祝你好运!

I don't know how the Unity SDK is built, but if it's a static Objective-C library then you can access iOS SDK functions without any problems. If its a script engine where you develop your scripts outside the IDE then you may not access iOS function.

Have you checked other engines/sdk's for your game development? I know that Cocos2D is well documented and I know for sure that you can call iOS methods.
Good luck!

‖放下 2024-10-27 09:31:12

我使用了unity3d和corona,它们在各自的领域都非常擅长,是的,你可以使用所有标准的SDK而不是它们,但有时你需要做一些技巧(这是相当痛苦的)。如果您正在开发 3D 游戏并且熟悉 NVIDIA PhysX 引擎,那么它会为您提供不错的功能。但如果你对碰撞/刚体/布娃娃等一无所知,你肯定会遇到困难。

至于 2d 应用程序开发,因为我不喜欢 Objective-C,所以我更喜欢用 lua 编写的 corona(易于学习和使用)。您可以毫无问题地使用其中的大部分 IOS SDK。

I used both unity3d and corona which are very good at their field, and yes you can use all standart SDK over them, sometimes you need to do tricks though (which is quite a pain). If you are developing a 3d game and familiar with NVIDIA PhysX engine go for unity, it gives you nice features. But if you are clueless about collasions/rigidbodies/ragdolls etc you would have a hard time for sure.

As for 2d application development since I don't like Objective-C I prefer corona which you code in lua (easy to learn and use). You can use most of the IOS SDK in it without any problem.

我ぃ本無心為│何有愛 2024-10-27 09:31:12

我真的推荐你从 Unity 开始,它是我用过的最好的引擎(我用过很多糟糕的引擎)。

Unity 是最好的起点和落脚点。在此引擎中,编码、图形和所有内容都易于管理。

Unity 是专门的 3d 游戏,但您也可以构建 2d 游戏,例如 Zombieville 和 OMG Pirates(应用商店上非常成功的游戏)。

I really reccomend you starting with Unity, it is the best engine I have ever used (I have used a ton of bad engines).

Unity is the best place to start and to stay. Coding, graphics and everything is simple to manage in this engine.

Unity is specially 3d but you can also build 2d games, some examples are Zombieville and OMG Pirates (very succesfull games on the appstore).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文