@@ -215,17 +215,20 @@ public static void BuildLibraryPlatforms(BuildTarget buildTarget)
215
215
216
216
static void OnPostprocessAllAssets ( string [ ] importedAssets , string [ ] deletedAssets , string [ ] movedAssets , string [ ] movedFromAssetPaths , bool didDomainReload )
217
217
{
218
- string pathToPlugin = Path . Combine ( "Assets" , PluginLibraryDir ( BuildTarget . VisionOS . ToString ( ) , true ) , "libundreamai_visionos.a" ) ;
219
- for ( int i = 0 ; i < movedAssets . Length ; i ++ )
218
+ foreach ( BuildTarget buildTarget in new BuildTarget [ ] { BuildTarget . iOS , BuildTarget . VisionOS } )
220
219
{
221
- if ( movedAssets [ i ] == pathToPlugin )
220
+ string pathToPlugin = Path . Combine ( "Assets" , PluginLibraryDir ( buildTarget . ToString ( ) , true ) , $ "libundreamai_{ buildTarget . ToString ( ) . ToLower ( ) } .a") ;
221
+ for ( int i = 0 ; i < movedAssets . Length ; i ++ )
222
222
{
223
- var importer = AssetImporter . GetAtPath ( pathToPlugin ) as PluginImporter ;
224
- if ( importer != null && importer . isNativePlugin )
223
+ if ( movedAssets [ i ] == pathToPlugin )
225
224
{
226
- importer . SetCompatibleWithPlatform ( BuildTarget . VisionOS , true ) ;
227
- importer . SetPlatformData ( BuildTarget . VisionOS , "CPU" , "ARM64" ) ;
228
- AssetDatabase . ImportAsset ( pathToPlugin ) ;
225
+ var importer = AssetImporter . GetAtPath ( pathToPlugin ) as PluginImporter ;
226
+ if ( importer != null && importer . isNativePlugin )
227
+ {
228
+ importer . SetCompatibleWithPlatform ( buildTarget , true ) ;
229
+ importer . SetPlatformData ( buildTarget , "CPU" , "ARM64" ) ;
230
+ AssetDatabase . ImportAsset ( pathToPlugin ) ;
231
+ }
229
232
}
230
233
}
231
234
}
0 commit comments