atteneder / KtxUnity

Load KTX and Basis Universal textures at runtime
Apache License 2.0
215 stars 42 forks source link

building on Xcode failed for ios simulator #57

Closed AhmadMansy closed 1 year ago

AhmadMansy commented 2 years ago

I am working on a project and i use glTFast in it, which is depending on this package and draco decompression one. When i set the target as ios simulator the build on xcode is failing with this message Building for iOS Simulator, but the linked library 'ibktx_unity.a' was built for iOS. I need this build not to failed even if the plugin is not supporting the simulator. I don't know if it is possible or not to exclude this lib when targeting a simulator build but not ios device build. I know that adding a compile flag (!TARGET_OS_SIMULATOR) to the lib will help but how can i do this for a package from package manager? And is it possible that this lib to be compiled for simulator as well?

atteneder commented 2 years ago

@AhmadMansy Thanks for reaching out.

Afaik we'd need to compile the libs another time specifically for iOS simulator. Then I'd guess one puts those into the package (along the other iOS lib) and it works, but I never tried that.

Testing on actual hardware does work though! I know it can have longer iteration times, but at least it's not a blocker.

AhmadMansy commented 2 years ago

thank you. and yes it would be great if the simulator is taking into consideration

atteneder commented 1 year ago

So, I've done the tests and the next release will contain iOS simulator binaries as well. However, I noticed that in the simulator many textures don't load properly. I assume there's a discrepancy between what Unity's API reports as supported textures vs. what the hosting macOS system actually supports. I expect some problems that won't get fixed right away.

atteneder commented 1 year ago

Fixed in 1.3.1 and 2.2.2