Unity3d modifying Playersetting's scripting backend selection in code Il2cpp/mono

Source: Internet
Author: User

In the Unity3d automatic packaging process, if you want to submit to the AppStore audit, need to support 64-bit, you need to select Scripting backend in playersetting to Il2cpp.

Unity does not provide an explicit interface to set scriptingbackend, but all functions by querying playersettings find that there is a property set that the public interface can use.

You can select Il2cpp by setting properties in your code. article transferred from http://blog.csdn.net/huutu/http://www.thisisgame.com.cn

        public static void Setpropertyint (string name, int value);        public static void Setpropertyint (string name, int value, Buildtarget target);        public static void Setpropertyint (string name, int value, Buildtargetgroup target);

For example I set here to Il2cpparticle transferred from http://blog.csdn.net/huutu/http://www.thisisgame.com.cn

Using unityengine;using system.collections;using unityeditor;public class newbehaviourscript:editorwindow{    [ MenuItem ("Mytools/changescript")]    static void Changescript ()    {        debug.logerror ("Changescript");        Playersettings.setpropertyint ("Scriptingbackend", (int) scriptingimplementation.il2cpp,buildtarget.iphone);}    }

Article transferred from http://blog.csdn.net/huutu/http://www.thisisgame.com.cn

First, let the playersetting be modified to mono.


Article transferred from http://blog.csdn.net/huutu/http://www.thisisgame.com.cn
After clicking on the Mytools/changescript in the menu bar, review the Playersetting tab again and find that it has been successfully modified to il2cpp.

Article transferred from http://blog.csdn.net/huutu/http://www.thisisgame.com.cn

Unity3d modifying Playersetting's scripting backend selection in code Il2cpp/mono

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.