A seamless connection between unity and Android

Source: Internet
Author: User

Two development for the Unity game Engineering Android client, as long as you understand how unity and Android call each other. There are already blogs about this online.

U3D Game company packaged Android client games in general there are two ways:

1: Write the required Java code in Eclipse package into jar, put in untiy, export apk with unity directly

2: Pack Android projects from unity, import into eclipse, develop two times, and pack them up

The first, multiple packaging is more convenient, the second, can be directly log to error. Each has good or bad.

The project just needs a seamless connection between unity and Android . For example, the place where the image was posted is written directly on the Android native page and is called directly in unity. As a result,Unity's packaged Android project is just an activity page that waits a long time in the process of switching to an Android page ... It's probably the unity**activity of unity that inherits the Android native activity and does a lot of resource operations, causing the system to spend a lot of time on activity lifecycle processing.

The solution to the problem is: Do not do the android page switch operation, the Android page into a view class, directly using Popuswindow to pop the window.

Recently a bit lazy, go back to write two works compare pass up.

RELATED LINKS from rain pine:

http://www.xuanyusong.com/archives/667

http://www.xuanyusong.com/archives/676

http://www.xuanyusong.com/archives/1800

http://www.xuanyusong.com/archives/2477

A seamless connection between unity and Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.