private void InstallXcodePlugin(string buildToolsDir) { string path = this.PluginSourcePath(buildToolsDir); string str2 = Unsupported.ResolveSymlinks(kXcodePluginDestination); bool flag = Directory.Exists(kXcodePluginDestination); try { if (flag && !string.Equals(Path.GetFullPath(str2), Path.GetFullPath(path), StringComparison.InvariantCultureIgnoreCase)) { this.Log("Plugin points to wrong location. Removing.", new object[0]); Directory.Delete(kXcodePluginDestination); flag = false; } if (!flag) { Directory.CreateDirectory(Path.GetDirectoryName(kXcodePluginDestination)); Utils.SymlinkFileAbsolute(path, kXcodePluginDestination); XCodeUtils.TerminateXCode(); } } catch (Exception exception) { object[] param = new object[] { exception }; this.Log("{0}", param); UnityEngine.Debug.LogWarning("Could not install the Unity Xcode plugin. Automatic Build & Run won't be supported"); } }