示例#1
0
    void OnEnable()
    {
        Instance = this;
#if UNITY_5_3_OR_NEWER
        titleContent = new GUIContent("Please import Unity IAP to use this asset");
#endif
    }
    static void Update()
    {
        EditorApplication.update -= Update;

        string from = "Assets/WordChef/Plugins/Android/AndroidManifest.xml";
        string to   = "Assets/Plugins/Android/AndroidManifest.xml";

        if (File.Exists(from) && !File.Exists(to))
        {
            if (!Directory.Exists("Assets/Plugins"))
            {
                AssetDatabase.CreateFolder("Assets", "Plugins");
            }
            if (!Directory.Exists("Assets/Plugins/Android"))
            {
                AssetDatabase.CreateFolder("Assets/Plugins", "Android");
            }
            AssetDatabase.MoveAsset(from, to);
        }

        if (!Directory.Exists("Assets/Plugins/UnityPurchasing/Bin"))
        {
            IAPChecker.CheckItNow();
            return;
        }

        IAPChecker.CheckItNow();
    }
    static void Update()
    {
        EditorApplication.update -= Update;

        IAPChecker.CheckItNow();

        if (Directory.Exists("Assets/EasyMobile"))
        {
            AddDefine("EASY_MOBILE_LITE", BuildTargetGroup.Android);
            AddDefine("EASY_MOBILE_LITE", BuildTargetGroup.iOS);
        }

        PluginImporter importer = AssetImporter.GetAtPath("Assets/EasyMobile/Plugins/iOS/libEasyMobileLite.a") as PluginImporter;

        if (importer != null)
        {
            importer.SetCompatibleWithAnyPlatform(false);
            importer.SetCompatibleWithPlatform(BuildTarget.iOS, true);
            importer.SaveAndReimport();
        }
    }
示例#4
0
 void OnEnable()
 {
     Instance     = this;
     titleContent = new GUIContent("Please import Unity IAP to use this asset");
 }