Android uses unity to cause activity to be destroyed solution

Source: Internet
Author: User

Because of the need to use unity on Android (Android activity inherits unityplayeractivity from Unity), it could be a third-party reason to quit unity and cause the Android app to be recreated once, Many of the previously initialized variables have been reset. At the same time return after the life cycle method actually does not execute! Toss for a long time do not know why, and then think that since it is a third-party things, then I should be unityplayeractivity the list of properties to change, as follows:

<activity    android:name="me.xanaduo.ui.UnityActivity" android:process=":UnityActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen" ></activity>

Note that the above android:process= ": Unityactivity" is the key point. For this attribute, we search for relevant explanations by ourselves. So the unityactivity run in their own processes, and they do not affect each other.

How Android uses unity to cause activity to be destroyed

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.