Esempio n. 1
0
        public static void PreBuildProcessing(BuildTarget target, string path)
        {
            // Search through all enabled scenes in the BuildSettings to find the EasyMobile prefab instance.
            // Warn the user if none was found.
            GameObject prefab = EM_EditorUtil.GetMainPrefab();

            if (prefab != null)
            {
                string[] enabledScenePaths = EM_EditorUtil.GetScenePathInBuildSettings(true);
                if (!EM_EditorUtil.IsPrefabInstanceFoundInScenes(prefab, enabledScenePaths))
                {
                    string title = "EasyMobile Instance Missing";
                    string msg   = "No root-level instance of the EasyMobile prefab was found in the enabled scene(s). " +
                                   "Please add one to the first scene of your game for the plugin to function properly.";
                    #if !UNITY_CLOUD_BUILD
                    EM_EditorUtil.Alert(title, msg);
                    #else
                    Debug.LogWarning(msg);
                    #endif
                }
            }
        }