public void PostProcess(BuildPostProcessArgs args) { base.m_PostProcessArgs = args; AssemblyReferenceChecker checker = new AssemblyReferenceChecker(); checker.CollectReferences(args.stagingAreaDataManaged, false, 0f, true); bool flag = !string.IsNullOrEmpty(checker.WhoReferencesClass("UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform", true)); this.SaveEditorOnlyPlayerSettingsToPlist(); base.PostProcess(); if (flag) { if (Application.platform != RuntimePlatform.OSXEditor) { UnityEngine.Debug.LogWarning("OS X Standalone players with GameCenter support need to be built on an OS X machine in order to pass Mac App Store validation."); } else { Console.WriteLine("Adding GameKit linkage to OS X binary."); ProcessStartInfo info2 = new ProcessStartInfo { FileName = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(args.target, args.options), "optool") }; string[] textArray1 = new string[] { "install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit -t \"", this.m_PostProcessArgs.installPath, "/Contents/MacOS/", this.InstallNameWithoutExtension, "\"" }; info2.Arguments = string.Concat(textArray1); info2.CreateNoWindow = true; ProcessStartInfo si = info2; Program program = new Program(si); program.Start(); while (!program.WaitForExit(100)) { } if (program.ExitCode != 0) { UnityEngine.Debug.LogError("Running optool to link GameKit failed\n" + si.FileName + " " + si.Arguments + "\n" + program.GetAllOutput()); } program.Dispose(); } } }