public static void MakeWin32TestingBuild()
        {
            Setup();
            SetScriptingBackend(ScriptingImplementation.Mono2x, BuildTarget.StandaloneWindows, BuildTargetGroup.Standalone);
#if UNITY_2018_1_OR_NEWER
            PlayerSettings.fullScreenMode = FullScreenMode.Windowed;
#else
            PlayerSettings.defaultIsFullScreen = false;
#endif
            PlayerSettings.defaultScreenHeight = 768;
            PlayerSettings.defaultScreenWidth  = 1024;
            PlayerSettings.runInBackground     = true;
#if !UNITY_2019_2_OR_NEWER
#pragma warning disable 0618
            PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled;
#pragma warning restore 0618
#endif
            PlayerSettings.resizableWindow = true;
            string win32Path = Path.Combine(GetBuildPath(), "Win32test.exe");
            MkDir(GetBuildPath());
            BuildPipeline.BuildPlayer(TestScenes, win32Path, BuildTarget.StandaloneWindows, BuildOptions.None);
            if (!File.Exists(win32Path))
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target file did not build: " + win32Path);
            }
        }
Exemple #2
0
        /// <summary>
        /// Checks whether the editor supports the build target.
        /// </summary>
        /// <param name="targetGroup">The build target group.</param>
        /// <param name="target">The build target.</param>
        /// <returns>Returns <c>true</c> if the build target is supported, otherwise <c>false</c>.</returns>
        protected static bool IsBuildTargetSupported(BuildTargetGroup targetGroup, BuildTarget target)
        {
#if UNITY_2018_1_OR_NEWER
            return(UBuildPipeline.IsBuildTargetSupported(targetGroup, target));
#else
            return(true);
#endif
        }
        public static void MakeAndroidBuild()
        {
            Setup();
            SetScriptingBackend(ScriptingImplementation.Mono2x, BuildTarget.Android, BuildTargetGroup.Android); // Ideal setting for Android
            SetIdentifier(BuildTargetGroup.Android, TestPackageName);
            var androidPackage = Path.Combine(GetBuildPath(), "PlayFabAndroid.apk");

            MkDir(GetBuildPath());
            BuildPipeline.BuildPlayer(TestScenes, androidPackage, BuildTarget.Android, BuildOptions.None);
            if (!File.Exists(androidPackage))
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target file did not build: " + androidPackage);
            }
        }
        public static void MakeXboxOneBuild()
        {
            Setup();
            SetScriptingBackend(ScriptingImplementation.IL2CPP, BuildTarget.XboxOne, BuildTargetGroup.XboxOne);
            //SetScriptingBackend( ScriptingImplementation.Mono2x, BuildTarget.XboxOne, BuildTargetGroup.XboxOne );
            SetIdentifier(BuildTargetGroup.XboxOne, TestPackageName);
            var xboxOnePath = Path.Combine(GetBuildPath(), "PlayFabXboxOne");

            MkDir(GetBuildPath());
            MkDir(xboxOnePath);
            BuildPipeline.BuildPlayer(TestScenes, xboxOnePath, BuildTarget.XboxOne, BuildOptions.None);
            if (Directory.GetFileSystemEntries(xboxOnePath).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + xboxOnePath + ", " + string.Join(",", Directory.GetFiles(xboxOnePath)));
            }
        }
        public static void MakeOsxBuild()
        {
            Setup();
            //SetScriptingBackend(ScriptingImplementation.IL2CPP, OsxBuildTarget, BuildTargetGroup.Standalone);  // IL2CPP can only be built on Mac.
            SetScriptingBackend(ScriptingImplementation.Mono2x, OsxBuildTarget, BuildTargetGroup.Standalone);
            SetIdentifier(AppleBuildTargetGroup, TestPackageName);
            var osxAppName = "PlayFabOSX";
            var osxPath    = Path.Combine(GetBuildPath(), osxAppName);

            MkDir(GetBuildPath());
            MkDir(osxPath);
            BuildPipeline.BuildPlayer(TestScenes, Path.Combine(osxPath, osxAppName), OsxBuildTarget, BuildOptions.None);
            if (Directory.GetFileSystemEntries(osxPath).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + osxPath + ", " + string.Join(",", Directory.GetFiles(osxPath)));
            }
        }
        public static void MakeSwitchBuild()
        {
            Setup();
            SetScriptingBackend(ScriptingImplementation.IL2CPP, BuildTarget.Switch, BuildTargetGroup.Switch);
            SetIdentifier(BuildTargetGroup.Switch, "PlayFabSwitchTest");
            PlayerSettings.SplashScreen.show            = false;
            EditorUserBuildSettings.switchCreateRomFile = true;

            var switchPackage = Path.Combine(GetBuildPath(), "PlayFabSwitch.nsp");

            MkDir(GetBuildPath());
            BuildPipeline.BuildPlayer(TestScenes, switchPackage, BuildTarget.Switch, BuildOptions.None);
            if (!File.Exists(switchPackage))
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target file did not build: " + switchPackage);
            }
        }
        public static void MakePS4Build()
        {
            Setup();
            SetScriptingBackend(ScriptingImplementation.IL2CPP, BuildTarget.PS4, BuildTargetGroup.PS4);
            SetIdentifier(BuildTargetGroup.PS4, TestPackageName);
#if UNITY_5_6_OR_NEWER
            PlayerSettings.SplashScreen.show = false;
#endif
            PlayerSettings.PS4.parentalLevel = 0;
            var ps4Path = Path.Combine(GetBuildPath(), "PlayFabPS4");
            MkDir(GetBuildPath());
            MkDir(ps4Path);
            BuildPipeline.BuildPlayer(TestScenes, ps4Path, BuildTarget.PS4, BuildOptions.None);
            if (Directory.GetFiles(ps4Path).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + ps4Path + ", " + string.Join(",", Directory.GetFiles(ps4Path)));
            }
        }
        public static void MakeIPhoneBuild()
        {
            Setup();
#if UNITY_2018_1_OR_NEWER
            SetScriptingBackend(ScriptingImplementation.IL2CPP, AppleBuildTarget, AppleBuildTargetGroup); // Ideally we should be testing both at some point, but ...
#else
            SetScriptingBackend(ScriptingImplementation.Mono2x, AppleBuildTarget, AppleBuildTargetGroup); // Mono2x is traditionally the one with issues, and it's a lot faster to build/test
#endif
            SetIdentifier(AppleBuildTargetGroup, TestPackageName);
            var iosPath = Path.Combine(GetBuildPath(), "PlayFabIOS");
            MkDir(GetBuildPath());
            MkDir(iosPath);
            BuildPipeline.BuildPlayer(TestScenes, iosPath, AppleBuildTarget, BuildOptions.None);
            if (Directory.GetFiles(iosPath).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + iosPath + ", " + string.Join(",", Directory.GetFiles(iosPath)));
            }
        }
        public static void MakePS4Build()
        {
            Setup();
            PlayerSettings.PS4.enableApplicationExit = true; // Only suitable for dev/test applications
            SetScriptingBackend(ScriptingImplementation.IL2CPP, BuildTarget.PS4, BuildTargetGroup.PS4);
            SetIdentifier(BuildTargetGroup.PS4, TestPackageName);
#if UNITY_5_6_OR_NEWER
            PlayerSettings.SplashScreen.show = false;
#endif
            PlayerSettings.PS4.parentalLevel = 0;
            var ps4Path = Path.Combine(GetBuildPath(), "PlayFabPS4");
            MkDir(GetBuildPath());
            MkDir(ps4Path);
            BuildPipeline.BuildPlayer(TestScenes, ps4Path, BuildTarget.PS4, BuildOptions.Development); // Development build is required for final test-result submission (bug)
            if (Directory.GetFiles(ps4Path).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + ps4Path + ", " + string.Join(",", Directory.GetFiles(ps4Path)));
            }
        }
        public static void MakeWp8Build()
        {
            Setup();
#if UNITY_2017_1_OR_NEWER
            EditorUserBuildSettings.wsaBuildAndRunDeployTarget = WSABuildAndRunDeployTarget.WindowsPhone;
            EditorUserBuildSettings.wsaSubtarget = WSASubtarget.AnyDevice;
#if !UNITY_2019_1_OR_NEWER
            EditorUserBuildSettings.wsaGenerateReferenceProjects = true;
#endif
            PlayerSettings.WSA.SetCapability(PlayerSettings.WSACapability.InternetClient, true);
#elif UNITY_5_2 || UNITY_5_3_OR_NEWER
            EditorUserBuildSettings.wsaSDK = WSASDK.UniversalSDK81;
#endif
            var wp8Path = Path.Combine(GetBuildPath(), "PlayFabWP8");
            MkDir(GetBuildPath());
            MkDir(wp8Path);
            BuildPipeline.BuildPlayer(TestScenes, wp8Path, WsaBuildTarget, BuildOptions.None);
            if (Directory.GetFiles(wp8Path).Length == 0)
            {
                throw new PlayFabException(PlayFabExceptionCode.BuildError, "Target directory is empty: " + wp8Path + ", " + string.Join(",", Directory.GetFiles(wp8Path)));
            }
        }
Exemple #11
0
 public EditorProperty(GUIContent name, string key, object defaultValue)
     : base(name, key, defaultValue, BuildPipeline.GetEditorTargetName())
 {
 }
Exemple #12
0
            /// <summary>
            /// Default implementation of the build player method.
            /// </summary>
            /// <param name="options"></param>
            public static void BuildPlayer(BuildPlayerOptions options)
            {
                if (!UnityConnect.instance.canBuildWithUPID)
                {
                    if (!EditorUtility.DisplayDialog("Missing Project ID", "Because you are not a member of this project this build will not access Unity services.\nDo you want to continue?", "Yes", "No"))
                    {
                        throw new BuildMethodException();
                    }
                }

                if (!BuildPipeline.IsBuildTargetSupported(options.targetGroup, options.target))
                {
                    throw new BuildMethodException("Build target is not supported.");
                }

                string module = ModuleManager.GetTargetStringFrom(EditorUserBuildSettings.selectedBuildTargetGroup, options.target);
                IBuildWindowExtension buildWindowExtension = ModuleManager.GetBuildWindowExtension(module);

                if (buildWindowExtension != null && (options.options & BuildOptions.AutoRunPlayer) != 0 && !buildWindowExtension.EnabledBuildAndRunButton())
                {
                    throw new BuildMethodException();
                }

                if (Unsupported.IsBleedingEdgeBuild())
                {
                    var sb = new System.Text.StringBuilder();
                    sb.AppendLine("This version of Unity is a BleedingEdge build that has not seen any manual testing.");
                    sb.AppendLine("You should consider this build unstable.");
                    sb.AppendLine("We strongly recommend that you use a normal version of Unity instead.");

                    if (EditorUtility.DisplayDialog("BleedingEdge Build", sb.ToString(), "Cancel", "OK"))
                    {
                        throw new BuildMethodException();
                    }
                }

                // See if we need to switch platforms and delay the build.  We do this whenever
                // we're trying to build for a target different from the active one so as to ensure
                // that the compiled script code we have loaded is built for the same platform we
                // are building for.  As we can't reload while our editor stuff is still executing,
                // we need to defer to after the next script reload then.
                bool delayToAfterScriptReload = false;

                if (EditorUserBuildSettings.activeBuildTarget != options.target ||
                    EditorUserBuildSettings.activeBuildTargetGroup != options.targetGroup)
                {
                    if (!EditorUserBuildSettings.SwitchActiveBuildTargetAsync(options.targetGroup, options.target))
                    {
                        // Switching the build target failed.  No point in trying to continue
                        // with a build.
                        var errStr = string.Format("Could not switch to build target '{0}', '{1}'.",
                                                   BuildPipeline.GetBuildTargetGroupDisplayName(options.targetGroup),
                                                   BuildPlatforms.instance.GetBuildTargetDisplayName(options.targetGroup, options.target));
                        throw new BuildMethodException(errStr);
                    }

                    if (EditorApplication.isCompiling)
                    {
                        delayToAfterScriptReload = true;
                    }
                }

                // Trigger build.
                // Note: report will be null, if delayToAfterScriptReload = true
                var report = BuildPipeline.BuildPlayerInternalNoCheck(options.scenes, options.locationPathName, null, options.targetGroup, options.target, options.options, delayToAfterScriptReload);


                if (report != null)
                {
                    var resultStr = String.Format("Build completed with a result of '{0}'", report.summary.result.ToString("g"));

                    switch (report.summary.result)
                    {
                    case Build.Reporting.BuildResult.Unknown:
                        Debug.LogWarning(resultStr);
                        break;

                    case Build.Reporting.BuildResult.Failed:
                        DeleteBuildFolderIfEmpty(report.summary.outputPath);
                        Debug.LogError(resultStr);
                        throw new BuildMethodException(report.SummarizeErrors());

                    default:
                        Debug.Log(resultStr);
                        break;
                    }

                    buildCompletionHandler?.Invoke(report);
                }
            }
Exemple #13
0
        public override void OnInspectorGUI()
        {
            settings.Update();

            var c = (Camera)target;

            m_ShowBGColorOptions.target = !clearFlagsHasMultipleValues && (c.clearFlags == CameraClearFlags.SolidColor || c.clearFlags == CameraClearFlags.Skybox);
            m_ShowOrthoOptions.target   = !orthographicHasMultipleValues && c.orthographic;

            bool displaySubsystemPresent = displayDescriptors.Count > 0;

            m_ShowTargetEyeOption.target = targetEyeValue != (int)StereoTargetEyeMask.Both || VREditor.GetVREnabledOnTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget)) || displaySubsystemPresent;

            settings.DrawClearFlags();

            if (EditorGUILayout.BeginFadeGroup(m_ShowBGColorOptions.faded))
            {
                settings.DrawBackgroundColor();
            }
            EditorGUILayout.EndFadeGroup();

            settings.DrawCullingMask();

            EditorGUILayout.Space();

            settings.DrawProjection();

            if (displaySubsystemPresent && targetEyeValue != (int)StereoTargetEyeMask.None && c.orthographic && c.targetTexture == null)
            {
                GUILayout.Label(EditorGUIUtility.TrTextContent("Orthographic projection is not supported when running in XR.", "One or more XR Plug-in providers were detected in your project. Using Orthographic projection is not supported when running in XR and enabling this may cause problems.", EditorGUIUtility.warningIcon));
            }

            settings.DrawClippingPlanes();

            settings.DrawNormalizedViewPort();

            EditorGUILayout.Space();
            settings.DrawDepth();
            settings.DrawRenderingPath();
            if (m_ShowOrthoOptions.target && wantDeferredRendering)
            {
                EditorGUILayout.HelpBox("Deferred rendering does not work with Orthographic camera, will use Forward.",
                                        MessageType.Warning, true);
            }

            settings.DrawTargetTexture(wantDeferredRendering);
            settings.DrawOcclusionCulling();
            settings.DrawHDR();
            settings.DrawMSAA();
            settings.DrawDynamicResolution();

            foreach (Camera camera in targets)
            {
                if (camera != null)
                {
                    Settings.DrawCameraWarnings(camera);
                }
            }

            settings.DrawVR();
            EditorGUILayout.Space();
            settings.DrawMultiDisplay();

            if (EditorGUILayout.BeginFadeGroup(m_ShowTargetEyeOption.faded))
            {
                settings.DrawTargetEye();
            }
            EditorGUILayout.EndFadeGroup();

            DepthTextureModeGUI();
            CommandBufferGUI();

            serializedObject.ApplyModifiedProperties();
        }
 public static bool BuildResourceFile(UnityEngine.Object[] selection, string pathName)
 {
     return(BuildPipeline.BuildAssetBundle(null, selection, pathName, BuildAssetBundleOptions.CompleteAssets));
 }
Exemple #15
0
 private bool ShouldShowMultiDisplayOption()
 {
     GUIContent[] displayNames = ModuleManager.GetDisplayNames(EditorUserBuildSettings.activeBuildTarget.ToString());
     return(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget) == BuildTargetGroup.Standalone || displayNames != null);
 }
 /// <summary>
 /// Builds asset bundles.
 /// </summary>
 /// <param name="settings">The build asset bundles settings.</param>
 /// <returns>The asset bundle manifest.</returns>
 private static AssetBundleManifest BuildAssetBundles(BuildAssetBundlesSettings settings)
 {
     return(UBuildPipeline.BuildAssetBundles(settings.OutputPath, settings.Options, settings.TargetPlatform));
 }
 public static void SetPropertyBool(string name, bool value, BuildTarget target)
 {
     SetPropertyBool(name, value, BuildPipeline.GetBuildTargetGroup(target));
 }
        // This function is responsible for providing all the subscenes to the build.
        //
        // The way these files get generated is that we have a SceneWithBuildConfiguration file, (which is a bit of a hack to work around the inability for scriptable importers to take arguments, so
        // instead we create a different file that points to the scene we want to import, and points to the buildconfiguration we want to import it for).   The SubsceneImporter will import this file,
        // and it will make 3 (relevant) kind of files:
        // - headerfile
        // - entitybinaryformat file (the actual entities payloads)
        // - a SerializedFile that has an array of UnityEngine.Object PPtrs that are used by this entity file.
        //
        // The first two we deal with very simply: they just need to be copied into the build, and we're done.
        // the third one, we will feed as input to the Scriptable build pipeline (which is actually about creating assetbundles), and create an assetbundle that
        // has all those objects in it that the 3rd file referred to.  We do this with a batch api, first we loop through all subscenes, and register with this batch
        // api which assetbundles we'd like to see produced, and then at the end, we say "okay make them please".  this assetbundle creation api has a caching system
        // that is separate from the assetpipeline caching system, so if all goes well, the call to produce these assetbundles will return very fast and did nothing.
        //
        // The reason for the strange looking api, where a two callbacks get passed in is to make integration of the new incremental buildpipeline easier, as this code
        // needs to be compatible both with the current buildpipeline in the dots-repo, as well as with the incremental buildpipeline.  When that is merged, we can simplify this.
        public static void PrepareAdditionalFiles(GUID[] sceneGuids, ArtifactKey[] entitySceneArtifacts, BuildTarget target, Action <string, string> RegisterFileCopy, string outputStreamingAssetsDirectory, string buildWorkingDirectory)
        {
            if (target == BuildTarget.NoTarget)
            {
                throw new InvalidOperationException($"Invalid build target '{target.ToString()}'.");
            }

            if (target != EditorUserBuildSettings.activeBuildTarget)
            {
                throw new InvalidOperationException($"ActiveBuildTarget must be switched before the {nameof(SubSceneBuildCode)} runs.");
            }

            Assert.AreEqual(sceneGuids.Length, entitySceneArtifacts.Length);

            var content             = new BundleBuildContent(new AssetBundleBuild[0]);
            var bundleNames         = new HashSet <string>();
            var subScenePaths       = new Dictionary <Hash128, string>();
            var dependencyInputData = new Dictionary <SceneSection, SectionDependencyInfo>();

            var    refExt    = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesUnityObjectReferences);
            var    headerExt = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesHeader);
            var    binaryExt = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesBinary);
            string conversionLogExtension = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesConversionLog);

            var group      = BuildPipeline.GetBuildTargetGroup(target);
            var parameters = new BundleBuildParameters(target, @group, buildWorkingDirectory)
            {
                BundleCompression = BuildCompression.LZ4Runtime
            };

            var artifactHashes = new UnityEngine.Hash128[entitySceneArtifacts.Length];

            AssetDatabaseCompatibility.ProduceArtifactsRefreshIfNecessary(entitySceneArtifacts, artifactHashes);

            for (int i = 0; i != entitySceneArtifacts.Length; i++)
            {
                var sceneGuid            = sceneGuids[i];
                var sceneBuildConfigGuid = entitySceneArtifacts[i].guid;
                var artifactHash         = artifactHashes[i];

                bool foundEntityHeader = false;

                if (!artifactHash.isValid)
                {
                    throw new Exception($"Building EntityScene artifact failed: '{AssetDatabaseCompatibility.GuidToPath(sceneGuid)}' ({sceneGuid}). There were exceptions during the entity scene imports.");
                }

                AssetDatabaseCompatibility.GetArtifactPaths(artifactHash, out var artifactPaths);

                foreach (var artifactPath in artifactPaths)
                {
                    //UnityEngine.Debug.Log($"guid: {sceneGuid} artifact: '{artifactPath}'");

                    //@TODO: This looks like a workaround. Whats going on here?
                    var ext = Path.GetExtension(artifactPath).Replace(".", "");

                    if (ext == conversionLogExtension)
                    {
                        var res = ConversionLogUtils.PrintConversionLogToUnityConsole(artifactPath);

                        if (res.HasException)
                        {
                            throw new Exception("Building entity scenes failed. There were exceptions during the entity scene imports.");
                        }
                    }
                    else if (ext == headerExt)
                    {
                        foundEntityHeader = true;

                        if (!string.IsNullOrEmpty(artifactPaths.FirstOrDefault(a => a.EndsWith(refExt))))
                        {
                            subScenePaths[sceneGuid] = artifactPath;
                        }
                        else
                        {
                            //if there are no reference bundles, then deduplication can be skipped
                            var destinationFile = EntityScenesPaths.RelativePathFolderFor(sceneGuid, EntityScenesPaths.PathType.EntitiesHeader, -1);
                            DoCopy(RegisterFileCopy, outputStreamingAssetsDirectory, artifactPath, destinationFile);
                        }
                    }
                    else if (ext == binaryExt)
                    {
                        var destinationFile = EntityScenesPaths.RelativePathFolderFor(sceneGuid, EntityScenesPaths.PathType.EntitiesBinary, EntityScenesPaths.GetSectionIndexFromPath(artifactPath));
                        DoCopy(RegisterFileCopy, outputStreamingAssetsDirectory, artifactPath, destinationFile);
                    }
                    else if (ext == refExt)
                    {
                        content.CustomAssets.Add(new CustomContent
                        {
                            Asset     = sceneBuildConfigGuid,
                            Processor = (guid, processor) =>
                            {
                                var sectionIndex = EntityScenesPaths.GetSectionIndexFromPath(artifactPath);
                                processor.GetObjectIdentifiersAndTypesForSerializedFile(artifactPath, out ObjectIdentifier[] objectIds, out Type[] types);
 public static void SetPropertyString(string name, string value, BuildTarget target)
 {
     SetPropertyString(name, value, BuildPipeline.GetBuildTargetGroup(target));
 }
Exemple #20
0
        public void OnEnable()
        {
            settings.OnEnable();

            var c = (Camera)target;

            m_ShowBGColorOptions.value  = !clearFlagsHasMultipleValues && (c.clearFlags == CameraClearFlags.SolidColor || c.clearFlags == CameraClearFlags.Skybox);
            m_ShowOrthoOptions.value    = c.orthographic;
            m_ShowTargetEyeOption.value = targetEyeValue != (int)StereoTargetEyeMask.Both || VREditor.GetVREnabledOnTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget));

            m_ShowBGColorOptions.valueChanged.AddListener(Repaint);
            m_ShowOrthoOptions.valueChanged.AddListener(Repaint);
            m_ShowTargetEyeOption.valueChanged.AddListener(Repaint);

            SubsystemManager.GetSubsystemDescriptors(displayDescriptors);
            SubsystemManager.afterReloadSubsystems += OnReloadSubsystemsComplete;
        }
 public void SetExcludeFromAnyPlatform(BuildTarget platform, bool excludedFromAny)
 {
     SetExcludeFromAnyPlatform(BuildPipeline.GetBuildTargetName(platform), excludedFromAny);
 }
Exemple #22
0
        // This function is responsible for providing all the subscenes to the build.
        //
        // The way these files get generated is that we have a SceneWithBuildConfiguration file, (which is a bit of a hack to work around the inability for scriptable importers to take arguments, so
        // instead we create a different file that points to the scene we want to import, and points to the buildconfiguration we want to import it for).   The SubsceneImporter will import this file,
        // and it will make 3 (relevant) kind of files:
        // - headerfile
        // - entitybinaryformat file (the actual entities payloads)
        // - a SerializedFile that has an array of UnityEngine.Object PPtrs that are used by this entity file.
        //
        // The first two we deal with very simply: they just need to be copied into the build, and we're done.
        // the third one, we will feed as input to the Scriptable build pipeline (which is actually about creating assetbundles), and create an assetbundle that
        // has all those objects in it that the 3rd file referred to.  We do this with a batch api, first we loop through all subscenes, and register with this batch
        // api which assetbundles we'd like to see produced, and then at the end, we say "okay make them please".  this assetbundle creation api has a caching system
        // that is separate from the assetpipeline caching system, so if all goes well, the call to produce these assetbundles will return very fast and did nothing.
        //
        // The reason for the strange looking api, where a two callbacks get passed in is to make integration of the new incremental buildpipeline easier, as this code
        // needs to be compatible both with the current buildpipeline in the dots-repo, as well as with the incremental buildpipeline.  When that is merged, we can simplify this.
        public static void PrepareAdditionalFiles(string buildConfigurationGuid, string[] scenePathsForBuild, BuildTarget target, Action <string, string> RegisterFileCopy, string outputStreamingAssetsDirectory, string buildWorkingDirectory)
        {
            if (target == BuildTarget.NoTarget)
            {
                throw new InvalidOperationException($"Invalid build target '{target.ToString()}'.");
            }

            if (target != EditorUserBuildSettings.activeBuildTarget)
            {
                throw new InvalidOperationException($"ActiveBuildTarget must be switched before the {nameof(SubSceneBuildCode)} runs.");
            }

            var content             = new BundleBuildContent(new AssetBundleBuild[0]);
            var bundleNames         = new HashSet <string>();
            var subSceneGuids       = scenePathsForBuild.SelectMany(scenePath => SceneMetaDataImporter.GetSubSceneGuids(AssetDatabase.AssetPathToGUID(scenePath))).Distinct().ToList();
            var subScenePaths       = new Dictionary <Hash128, string>();
            var dependencyInputData = new Dictionary <SceneSection, SectionDependencyInfo>();
            var refExt    = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesUnityObjectReferences);
            var headerExt = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesHeader);
            var binaryExt = EntityScenesPaths.GetExtension(EntityScenesPaths.PathType.EntitiesBinary);

            var group      = BuildPipeline.GetBuildTargetGroup(target);
            var parameters = new BundleBuildParameters(target, @group, buildWorkingDirectory)
            {
                BundleCompression = BuildCompression.LZ4Runtime
            };

            var requiresRefresh       = false;
            var sceneBuildConfigGuids = new NativeArray <GUID>(subSceneGuids.Count, Allocator.TempJob);

            for (int i = 0; i != sceneBuildConfigGuids.Length; i++)
            {
                sceneBuildConfigGuids[i] = SceneWithBuildConfigurationGUIDs.EnsureExistsFor(subSceneGuids[i], new Hash128(buildConfigurationGuid), out var thisRequiresRefresh);
                requiresRefresh         |= thisRequiresRefresh;
            }
            if (requiresRefresh)
            {
                AssetDatabase.Refresh();
            }

            var artifactHashes = new NativeArray <UnityEngine.Hash128>(subSceneGuids.Count, Allocator.TempJob);

            AssetDatabaseCompatibility.ProduceArtifactsRefreshIfNecessary(sceneBuildConfigGuids, typeof(SubSceneImporter), artifactHashes);

            for (int i = 0; i != sceneBuildConfigGuids.Length; i++)
            {
                var sceneGuid            = subSceneGuids[i];
                var sceneBuildConfigGuid = sceneBuildConfigGuids[i];
                var artifactHash         = artifactHashes[i];

                bool foundEntityHeader = false;
                AssetDatabaseCompatibility.GetArtifactPaths(artifactHash, out var artifactPaths);
                foreach (var artifactPath in artifactPaths)
                {
                    //@TODO: This looks like a workaround. Whats going on here?
                    var ext = Path.GetExtension(artifactPath).Replace(".", "");
                    if (ext == headerExt)
                    {
                        foundEntityHeader = true;

                        if (!string.IsNullOrEmpty(artifactPaths.FirstOrDefault(a => a.EndsWith(refExt))))
                        {
                            subScenePaths[sceneGuid] = artifactPath;
                        }
                        else
                        {
                            //if there are no reference bundles, then deduplication can be skipped
                            var destinationFile = EntityScenesPaths.RelativePathFolderFor(sceneGuid, EntityScenesPaths.PathType.EntitiesHeader, -1);
                            DoCopy(RegisterFileCopy, outputStreamingAssetsDirectory, artifactPath, destinationFile);
                        }
                    }
                    else if (ext == binaryExt)
                    {
                        var destinationFile = EntityScenesPaths.RelativePathFolderFor(sceneGuid, EntityScenesPaths.PathType.EntitiesBinary, EntityScenesPaths.GetSectionIndexFromPath(artifactPath));
                        DoCopy(RegisterFileCopy, outputStreamingAssetsDirectory, artifactPath, destinationFile);
                    }

                    if (ext == refExt)
                    {
                        content.CustomAssets.Add(new CustomContent
                        {
                            Asset     = sceneBuildConfigGuid,
                            Processor = (guid, processor) =>
                            {
                                var sectionIndex = EntityScenesPaths.GetSectionIndexFromPath(artifactPath);
                                processor.GetObjectIdentifiersAndTypesForSerializedFile(artifactPath, out ObjectIdentifier[] objectIds, out Type[] types);
Exemple #23
0
        private Property[] GetProperties()
        {
            List <Property> properties = new List <Property>();

            m_WindowsX86     = new DesktopSingleCPUProperty(EditorGUIUtility.TrTextContent("x86"), BuildPipeline.GetBuildTargetName(BuildTarget.StandaloneWindows), DesktopPluginCPUArchitecture.x86);
            m_WindowsX86_X64 = new DesktopSingleCPUProperty(EditorGUIUtility.TrTextContent("x86_x64"), BuildPipeline.GetBuildTargetName(BuildTarget.StandaloneWindows64), DesktopPluginCPUArchitecture.x86_64);

            m_LinuxX86_X64 = new DesktopSingleCPUProperty(EditorGUIUtility.TrTextContent("x86_x64"), BuildPipeline.GetBuildTargetName(BuildTarget.StandaloneLinux64), DesktopPluginCPUArchitecture.x86_64);

            m_OSX_X64 = new DesktopSingleCPUProperty(EditorGUIUtility.TrTextContent("x64"), BuildPipeline.GetBuildTargetName(BuildTarget.StandaloneOSX), DesktopPluginCPUArchitecture.x86_64);

            properties.Add(m_WindowsX86);
            properties.Add(m_WindowsX86_X64);

            properties.Add(m_LinuxX86_X64);

            properties.Add(m_OSX_X64);

            return(properties.ToArray());
        }
 internal PluginImporterInspector.Compatibility GetPlatformCompatibility(string platformName)
 {
     return(this.m_CompatibleWithPlatform[(int)BuildPipeline.GetBuildTargetByName(platformName)]);
 }
Exemple #25
0
        public static void MonoLink(BuildTarget buildTarget, string managedLibrariesDirectory, string[] input, string[] allAssemblies, RuntimeClassRegistry usedClasses)
        {
            Process process             = MonoProcessUtility.PrepareMonoProcess(buildTarget, managedLibrariesDirectory);
            string  buildToolsDirectory = BuildPipeline.GetBuildToolsDirectory(buildTarget);
            string  str2 = null;
            string  path = Path.Combine(MonoInstallationFinder.GetFrameWorksFolder(), StripperExe());
            string  str5 = Path.Combine(Path.GetDirectoryName(path), "link.xml");
            string  str6 = Path.Combine(managedLibrariesDirectory, "output");

            Directory.CreateDirectory(str6);
            process.StartInfo.Arguments = "\"" + path + "\" -l none -c link";
            foreach (string str7 in input)
            {
                ProcessStartInfo info1 = process.StartInfo;
                info1.Arguments = info1.Arguments + " -a \"" + str7 + "\"";
            }
            ProcessStartInfo startInfo = process.StartInfo;
            string           arguments = startInfo.Arguments;

            string[] textArray1 = new string[] { arguments, " -out output -x \"", str5, "\" -d \"", managedLibrariesDirectory, "\"" };
            startInfo.Arguments = string.Concat(textArray1);
            string str8 = Path.Combine(buildToolsDirectory, "link.xml");

            if (File.Exists(str8))
            {
                ProcessStartInfo info3 = process.StartInfo;
                info3.Arguments = info3.Arguments + " -x \"" + str8 + "\"";
            }
            string str9 = Path.Combine(Path.GetDirectoryName(path), "native_link.xml");

            if (File.Exists(str9))
            {
                ProcessStartInfo info4 = process.StartInfo;
                info4.Arguments = info4.Arguments + " -x \"" + str9 + "\"";
            }
            foreach (string str10 in Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "Assets"), "link.xml", SearchOption.AllDirectories))
            {
                ProcessStartInfo info5 = process.StartInfo;
                info5.Arguments = info5.Arguments + " -x \"" + str10 + "\"";
            }
            if (usedClasses != null)
            {
                str2 = GenerateBlackList(managedLibrariesDirectory, usedClasses, allAssemblies);
                ProcessStartInfo info6 = process.StartInfo;
                info6.Arguments = info6.Arguments + " -x \"" + str2 + "\"";
            }
            MonoProcessUtility.RunMonoProcess(process, "assemblies stripper", Path.Combine(str6, "mscorlib.dll"));
            DeleteAllDllsFrom(managedLibrariesDirectory);
            CopyAllDlls(managedLibrariesDirectory, str6);
            foreach (string str11 in Directory.GetFiles(managedLibrariesDirectory))
            {
                if (str11.Contains(".mdb") && !File.Exists(str11.Replace(".mdb", string.Empty)))
                {
                    FileUtil.DeleteFileOrDirectory(str11);
                }
            }
            if (str2 != null)
            {
                FileUtil.DeleteFileOrDirectory(Path.Combine(managedLibrariesDirectory, str2));
            }
            FileUtil.DeleteFileOrDirectory(str6);
        }
Exemple #26
0
        public static void MonoLink(BuildTarget buildTarget, string managedLibrariesDirectory, string[] input, string[] allAssemblies, RuntimeClassRegistry usedClasses)
        {
            Process process             = MonoProcessUtility.PrepareMonoProcess(buildTarget, managedLibrariesDirectory);
            string  buildToolsDirectory = BuildPipeline.GetBuildToolsDirectory(buildTarget);
            string  text             = null;
            string  frameWorksFolder = MonoInstallationFinder.GetFrameWorksFolder();
            string  text2            = Path.Combine(frameWorksFolder, MonoAssemblyStripping.StripperExe());
            string  text3            = Path.Combine(Path.GetDirectoryName(text2), "link.xml");
            string  text4            = Path.Combine(managedLibrariesDirectory, "output");

            Directory.CreateDirectory(text4);
            process.StartInfo.Arguments = "\"" + text2 + "\" -l none -c link";
            for (int i = 0; i < input.Length; i++)
            {
                string           str     = input[i];
                ProcessStartInfo expr_80 = process.StartInfo;
                expr_80.Arguments = expr_80.Arguments + " -a \"" + str + "\"";
            }
            ProcessStartInfo expr_B3   = process.StartInfo;
            string           arguments = expr_B3.Arguments;

            expr_B3.Arguments = string.Concat(new string[]
            {
                arguments,
                " -out output -x \"",
                text3,
                "\" -d \"",
                managedLibrariesDirectory,
                "\""
            });
            string text5 = Path.Combine(buildToolsDirectory, "link.xml");

            if (File.Exists(text5))
            {
                ProcessStartInfo expr_110 = process.StartInfo;
                expr_110.Arguments = expr_110.Arguments + " -x \"" + text5 + "\"";
            }
            string text6 = Path.Combine(Path.GetDirectoryName(text2), "Core.xml");

            if (File.Exists(text6))
            {
                ProcessStartInfo expr_151 = process.StartInfo;
                expr_151.Arguments = expr_151.Arguments + " -x \"" + text6 + "\"";
            }
            string[] files = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "Assets"), "link.xml", SearchOption.AllDirectories);
            string[] array = files;
            for (int j = 0; j < array.Length; j++)
            {
                string           str2     = array[j];
                ProcessStartInfo expr_1A2 = process.StartInfo;
                expr_1A2.Arguments = expr_1A2.Arguments + " -x \"" + str2 + "\"";
            }
            if (usedClasses != null)
            {
                text = MonoAssemblyStripping.GenerateBlackList(managedLibrariesDirectory, usedClasses, allAssemblies);
                ProcessStartInfo expr_1E6 = process.StartInfo;
                expr_1E6.Arguments = expr_1E6.Arguments + " -x \"" + text + "\"";
            }
            string path = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(EditorUserBuildSettings.activeBuildTarget, BuildOptions.None), "Whitelists");

            string[] files2 = Directory.GetFiles(path, "*.xml");
            for (int k = 0; k < files2.Length; k++)
            {
                string           str3     = files2[k];
                ProcessStartInfo expr_23B = process.StartInfo;
                expr_23B.Arguments = expr_23B.Arguments + " -x \"" + str3 + "\"";
            }
            MonoProcessUtility.RunMonoProcess(process, "assemblies stripper", Path.Combine(text4, "mscorlib.dll"));
            MonoAssemblyStripping.DeleteAllDllsFrom(managedLibrariesDirectory);
            MonoAssemblyStripping.CopyAllDlls(managedLibrariesDirectory, text4);
            string[] files3 = Directory.GetFiles(managedLibrariesDirectory);
            for (int l = 0; l < files3.Length; l++)
            {
                string text7 = files3[l];
                if (text7.Contains(".mdb"))
                {
                    string path2 = text7.Replace(".mdb", string.Empty);
                    if (!File.Exists(path2))
                    {
                        FileUtil.DeleteFileOrDirectory(text7);
                    }
                }
            }
            if (text != null)
            {
                FileUtil.DeleteFileOrDirectory(Path.Combine(managedLibrariesDirectory, text));
            }
            FileUtil.DeleteFileOrDirectory(text4);
        }
 public static PluginImporter[] GetImporters(BuildTarget platform)
 {
     return(GetImporters(BuildPipeline.GetBuildTargetName(platform)));
 }
 public static PluginImporter[] GetImporters(BuildTargetGroup buildTargetGroup, BuildTarget buildTarget)
 {
     return(GetImporters(BuildPipeline.GetBuildTargetGroupName(buildTargetGroup), BuildPipeline.GetBuildTargetName(buildTarget)));
 }
Exemple #29
0
 BuildPlayer(BuildPlayerSettings settings)
 {
     return(UBuildPipeline.BuildPlayer(settings.Levels, settings.OutputPath, settings.Target, settings.Options));
 }
        protected void InitRuntimeClassRegistry()
        {
            BuildTargetGroup buildTargetGroup = BuildPipeline.GetBuildTargetGroup(this.buildTarget);

            this.AddFunctionalityGroup("Runtime", "[no manager]");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "GameObject");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "Material");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "PreloadData");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "PlayerSettings");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "InputManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "BuildSettings");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "GraphicsSettings");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "QualitySettings");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "MonoManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "AudioManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "ScriptMapper");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "DelayedCallManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "TimeManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "Cubemap");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "Texture3D");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "Texture2DArray");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "LODGroup");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GameObject), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Transform), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Mesh), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SkinnedMeshRenderer), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(MeshRenderer), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UnityException), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Resolution));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(LayerMask));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SerializeField));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(WaitForSeconds));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(WaitForSecondsRealtime));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(WaitForFixedUpdate));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(WaitForEndOfFrame));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AssetBundle), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AssetBundleRequest));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Event), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(HideInInspector));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SerializePrivateVariables));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SerializeField));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Font), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUIStyle));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUISkin), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUITargetAttribute), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUI), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(TextGenerator), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SendMouseEvents), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SetupCoroutine), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Coroutine));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AttributeHelperEngine), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(StackTraceUtility), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUIUtility), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUI), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Application), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Animation), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimationClip), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimationEvent));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AsyncOperation));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UnityEngine.Resources), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(CacheIndex));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Keyframe));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(RenderTexture));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimationCurve), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(BoneWeight));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UnityEngine.Particle));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SliderState), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUI.ScrollViewState), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GUIScrollGroup), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(TextEditor), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(ClassLibraryInitializer), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AssetBundleCreateRequest), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "ImageEffectTransformsToLDR");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "ImageEffectOpaque");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Gradient), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GradientColorKey));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(GradientAlphaKey));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Canvas), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(RectTransform), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AssemblyIsEditorAssembly), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Camera), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(CullingGroup), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(StateMachineBehaviour), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "Networking.DownloadHandler", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "Experimental.Director.Playable", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "Experimental.Director.ScriptPlayable", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "Experimental.Director.GenericMixerPlayable", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SharedBetweenAnimatorsAttribute), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimatorStateInfo), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimatorTransitionInfo), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AnimatorClipInfo), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(SkeletonBone), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(HumanBone), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UIVertex), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UICharInfo), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(UILineInfo), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AudioClip), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AudioMixer), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(AudioSettings), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "iPhone", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJNI", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJNIHelper", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "_AndroidJNIHelper", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaObject", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaClass", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaRunnableProxy", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "SamsungTV", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(ISerializationCallbackReceiver), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "UnhandledExceptionHandler", "all");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", "Display", "all");
            switch (buildTargetGroup)
            {
            case BuildTargetGroup.Android:
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJNI", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJNIHelper", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "_AndroidJNIHelper", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaObject", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaClass", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "AndroidJavaRunnableProxy", "all");
                break;

            case BuildTargetGroup.SamsungTV:
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "SamsungTV", "all");
                break;

            case BuildTargetGroup.iPhone:
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "iPhoneKeyboard");
                break;
            }
            if ((buildTargetGroup == BuildTargetGroup.iPhone) || ((buildTargetGroup == BuildTargetGroup.Standalone) && (((this.buildTarget == BuildTarget.StandaloneOSXIntel) || (this.buildTarget == BuildTarget.StandaloneOSXIntel64)) || (this.buildTarget == BuildTarget.StandaloneOSXUniversal))))
            {
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "SocialPlatforms.GameCenter.GameCenterPlatform", "all");
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "SocialPlatforms.GameCenter.GcLeaderboard", "all");
            }
            if (((buildTargetGroup == BuildTargetGroup.iPhone) || (buildTargetGroup == BuildTargetGroup.Android)) || (((buildTargetGroup == BuildTargetGroup.WP8) || (buildTargetGroup == BuildTargetGroup.WSA)) || (buildTargetGroup == BuildTargetGroup.Tizen)))
            {
                this.AddManagedDependenciesForFunctionalityGroup("Runtime", "TouchScreenKeyboard");
            }
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "NetworkManager");
            this.AddNativeDependenciesForFunctionalityGroup("Runtime", "NetworkView");
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Network));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(NetworkMessageInfo));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(RPC));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(HostData));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(BitStream));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(NetworkPlayer));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(NetworkViewID));
            this.AddManagedDependenciesForFunctionalityGroup("Runtime", typeof(Ping), "all");
            this.AddFunctionalityGroup("Physics", "PhysicsManager");
            this.AddNativeDependenciesForFunctionalityGroup("Physics", "PhysicsManager");
            this.AddNativeDependenciesForFunctionalityGroup("Physics", "Rigidbody");
            this.AddNativeDependenciesForFunctionalityGroup("Physics", "Collider");
            this.AddManagedDependenciesForFunctionalityGroup("Physics", typeof(ControllerColliderHit));
            this.AddManagedDependenciesForFunctionalityGroup("Physics", typeof(RaycastHit));
            this.AddManagedDependenciesForFunctionalityGroup("Physics", typeof(Collision));
            this.AddManagedDependenciesForFunctionalityGroup("Physics", typeof(MeshCollider));
            this.AddFunctionalityGroup("Physics2D", "Physics2DSettings");
            this.AddNativeDependenciesForFunctionalityGroup("Physics2D", "Physics2DSettings");
            this.AddNativeDependenciesForFunctionalityGroup("Physics2D", "Rigidbody2D");
            this.AddNativeDependenciesForFunctionalityGroup("Physics2D", "Collider2D");
            this.AddNativeDependenciesForFunctionalityGroup("Physics2D", "Joint2D");
            this.AddNativeDependenciesForFunctionalityGroup("Physics2D", "PhysicsMaterial2D");
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(RaycastHit2D));
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(Collision2D));
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(JointMotor2D));
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(JointAngleLimits2D));
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(JointTranslationLimits2D));
            this.AddManagedDependenciesForFunctionalityGroup("Physics2D", typeof(JointSuspension2D));
            this.AddFunctionalityGroup("Terrain", "Terrain");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(Terrain), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(TerrainData), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(TerrainCollider), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(DetailPrototype), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(TreePrototype), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(TreeInstance), "all");
            this.AddManagedDependenciesForFunctionalityGroup("Terrain", typeof(SplatPrototype), "all");
            this.AddFunctionalityGroup("Shuriken", "ParticleSystem");
            this.AddManagedDependenciesForFunctionalityGroup("Shuriken", typeof(ParticleSystem));
            this.AddManagedDependenciesForFunctionalityGroup("Shuriken", typeof(ParticleSystemRenderer));
            this.AddManagedBaseClass("UnityEngine.MonoBehaviour");
            this.AddManagedBaseClass("UnityEngine.ScriptableObject");
            if (buildTargetGroup == BuildTargetGroup.Android)
            {
                this.AddManagedBaseClass("UnityEngine.AndroidJavaProxy");
            }
            string[] dontStripClassNames = RuntimeInitializeOnLoadManager.dontStripClassNames;
            foreach (string str in dontStripClassNames)
            {
                this.AddManagedBaseClass(str);
            }
        }