예제 #1
0
        public void OnPreprocessBuild(BuildReport report)
        {
            // Assign each library a "ShouldIncludeInBuild" delegate to indicate whether the plugin
            // should be placed in a build on a specific platform.  As of right now it's only important
            // for runtime on the device but that could change to have standalone include remoting libs
            AssignNativePluginIncludeInBuildDelegates();

            // Always remember to cleanup preloaded assets after build to make sure we don't
            // dirty later builds with assets that may not be needed or are out of date.
            CleanOldSettings();

            MagicLeapSettings settings = null;

            EditorBuildSettings.TryGetConfigObject(MagicLeapConstants.kSettingsKey, out settings);
            if (settings == null)
            {
                return;
            }

#if PLATFORM_LUMIN
            MagicLeapImageDatabaseBuildProcessor.BuildImageTrackingAssets();
#endif

            UnityEngine.Object[] preloadedAssets = PlayerSettings.GetPreloadedAssets();

            if (!preloadedAssets.Contains(settings))
            {
                var assets = preloadedAssets.ToList();
                assets.Add(settings);
                PlayerSettings.SetPreloadedAssets(assets.ToArray());
            }
        }
예제 #2
0
        public void OnPreprocessBuild(BuildReport report)
        {
            // Always remember to cleanup preloaded assets after build to make sure we don't
            // dirty later builds with assets that may not be needed or are out of date.
            CleanOldSettings();

            MagicLeapSettings settings = null;

            EditorBuildSettings.TryGetConfigObject(MagicLeapConstants.kSettingsKey, out settings);
            if (settings == null)
            {
                return;
            }

            MagicLeapImageDatabaseBuildProcessor.BuildImageTrackingAssets();

            UnityEngine.Object[] preloadedAssets = PlayerSettings.GetPreloadedAssets();

            if (!preloadedAssets.Contains(settings))
            {
                var assets = preloadedAssets.ToList();
                assets.Add(settings);
                PlayerSettings.SetPreloadedAssets(assets.ToArray());
            }
        }