# Porting from Cocos2d-iPhone to Unity

**URL:** <https://forums.kodeco.com/t/porting-from-cocos2d-iphone-to-unity/42228>\
**Category:** iOS\
**Created:** [May 4, 2018, 8:10am UTC](https://forums.kodeco.com/t/porting-from-cocos2d-iphone-to-unity/42228 "2018-05-04T08:10:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yt42](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@yt42](https://forums.kodeco.com/u/yt42)\
**Post date:** [May 4, 2018, 8:10am UTC](https://forums.kodeco.com/t/porting-from-cocos2d-iphone-to-unity/42228/1 "2018-05-04T08:10:17Z")

</div>

Hello all. We’re very far along (~85%) on a large project in Cocos2d-iPhone. Yes, the old framework. Progress is slow and painful. What would we gain/lose from a port to Unity?

Many thanks

---

<div class="post-metadata">

**Author:** ![syedfa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/syedfa/32/101500_2.png) [@syedfa](https://forums.kodeco.com/u/syedfa)\
**Post date:** [May 29, 2018, 3:03am UTC](https://forums.kodeco.com/t/porting-from-cocos2d-iphone-to-unity/42228/2 "2018-05-29T03:03:15Z")

</div>

@yt42 Thanks very much for your question!

I found the following answer that may help you:

“I can tell you that you of course can’t just dump your cocos2d-x code (which is C++ as far as I remember) into Unity and expect it to work, but if you understand the syntax and language differences you should be able to read the C++ and gather what it is doing and write the equivalent C# code to do the same thing. One thing that might get you is that the cocos2d-x game might not have been using a component pattern, whereas with Unity3D it makes sense to do this, so you might have a ton of polymorphism in the game code to trawl through and get working in Unity (not that you can’t do that of course, because you can, but I guess what I am saying is that I’ve found that in a lot of cases it doesn’t make sense to use class inheritance with Unity, and is way easier to just use the Monobehaviour and go with that).”

Here is the [source](https://www.reddit.com/r/Unity2D/comments/32l0vp/migrating_from_cocos2d_to_unity/).

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [October 18, 2018, 12:15am UTC](https://forums.kodeco.com/t/porting-from-cocos2d-iphone-to-unity/42228/3 "2018-10-18T00:15:05Z")

</div>

Closed on October 18, 2018, 12:15am UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
