[fix] 修复导出tvOS工程时未修改xcode工程设置,导致打包失败的bug

main
walon 2024-04-21 13:45:47 +08:00
parent 74bab1d935
commit 3259c11828
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ using System.Text;
using UnityEditor; using UnityEditor;
using System.Reflection; using System.Reflection;
using HybridCLR.Editor.Settings; using HybridCLR.Editor.Settings;
#if UNITY_2019 && UNITY_IOS #if UNITY_2019 && (UNITY_IOS || UNITY_TVOS)
using UnityEditor.Build; using UnityEditor.Build;
using UnityEditor.Callbacks; using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode; using UnityEditor.iOS.Xcode;
@ -32,7 +32,7 @@ namespace HybridCLR.Editor.BuildProcessors
[PostProcessBuild] [PostProcessBuild]
public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject) public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject)
{ {
if (target != BuildTarget.iOS || !HybridCLRSettings.Instance.enable) if (!HybridCLRSettings.Instance.enable)
return; return;
/* /*
* 1. lump * 1. lump

View File

@ -7,7 +7,7 @@ using System.Text;
using UnityEditor; using UnityEditor;
using System.Reflection; using System.Reflection;
using HybridCLR.Editor.Settings; using HybridCLR.Editor.Settings;
#if (UNITY_2020 || UNITY_2021) && UNITY_IOS #if (UNITY_2020 || UNITY_2021) && (UNITY_IOS || UNITY_TVOS)
using UnityEditor.Build; using UnityEditor.Build;
using UnityEditor.Callbacks; using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode; using UnityEditor.iOS.Xcode;
@ -32,7 +32,7 @@ namespace HybridCLR.Editor.BuildProcessors
[PostProcessBuild] [PostProcessBuild]
public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject) public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject)
{ {
if (target != BuildTarget.iOS || !HybridCLRSettings.Instance.enable) if (!HybridCLRSettings.Instance.enable)
return; return;
/* /*
* 1. lump * 1. lump

View File

@ -7,7 +7,7 @@ using UnityEditor.Build;
using UnityEditor.Callbacks; using UnityEditor.Callbacks;
using UnityEngine; using UnityEngine;
#if UNITY_2022_2_OR_NEWER && UNITY_IOS #if UNITY_2022_2_OR_NEWER && (UNITY_IOS || UNITY_TVOS)
namespace HybridCLR.Editor.BuildProcessors namespace HybridCLR.Editor.BuildProcessors
{ {
@ -22,7 +22,7 @@ namespace HybridCLR.Editor.BuildProcessors
[PostProcessBuild] [PostProcessBuild]
public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject) public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject)
{ {
if (target != BuildTarget.iOS || !HybridCLRSettings.Instance.enable) if (!HybridCLRSettings.Instance.enable)
return; return;
#if TUANJIE_2022_3_OR_NEWER #if TUANJIE_2022_3_OR_NEWER
string pbxprojFile = $"{pathToBuiltProject}/Tuanjie-iPhone.xcodeproj/project.pbxproj"; string pbxprojFile = $"{pathToBuiltProject}/Tuanjie-iPhone.xcodeproj/project.pbxproj";