atteneder / KtxUnity

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

Fix compilation for unsupported platforms #69

Closed hybridherbst closed 6 months ago

hybridherbst commented 1 year ago

Currently, when compiling/building to some platforms, KtxUnity will error out:

image Mostly with variations of

'KtxNativeInstance' does not contain a definition for 'INTERFACE_DLL'

This is not ideal; better would be that the platforms are explicitly unsupported but compilation would still work.

I tried setting the flags in the Runtime Ktx.asmdef: image

But that brings follow-up errors in glTFast with it, so might not be as easy as that (there may be ifdefs needed in glTFast as well then).

To test compilation for all platforms, simply add https://openupm.com/packages/com.needle.compilation-visualizer to your project and put it into the testables in manifest.json, then run the editor tests seen in the screenshot above:

  "testables": [
    "com.needle.compilation-visualizer"
  ]
atteneder commented 6 months ago

Fixed in KTX for Unity 3.3.0! Please transition to that package, as it is the official successor.

Full list of changes

Added

Changed

Fixed