Created
March 5, 2024 00:58
-
-
Save baba-s/a7780ee848f7b2c8dca549286b7a72ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.Build; | |
using UnityEngine; | |
public class Example : IFilterBuildAssemblies | |
{ | |
int IOrderedCallback.callbackOrder => 0; | |
string[] IFilterBuildAssemblies.OnFilterAssemblies | |
( | |
BuildOptions buildOptions, | |
string[] assemblies | |
) | |
{ | |
// ビルドに含まれるすべてのアセンブリを確認 | |
Debug.Log( string.Join( "\n", assemblies.OrderBy( x => x ) ) ); | |
// 例えば UniTask は使用しているが Addressables は使用していない場合、 | |
// UniTask.Addressables.dll はビルドに含めないようにする | |
return assemblies | |
.Where( x => x.Contains( "UniTask.Addressables.dll", StringComparison.Ordinal ) ) | |
.ToArray() | |
; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment