Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Best solution to image format support for add ref library image at runtime

Discussion in 'AR' started by douglassophies, Jun 7, 2021.

  1. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    141
    When adding images at runtime to a mutable reference library i get this error:
    Code (CSharp):
    1. The texture format ETC_RGB4 is not supported by the current image tracking subsystem.
    I looked up the source code and found that RGB 24 bit works but my question is whether that is the best solution or am i missing a setting that would allows other formats to work?
     
  2. CavemanProgrammer

    CavemanProgrammer

    Joined:
    Apr 20, 2018
    Posts:
    1
    Code (CSharp):
    1. mutableRuntimeReferenceImageLibrary.supportedTextureFormatCount
    returns the number of supported texture formats and
    Code (CSharp):
    1. mutableRuntimeReferenceImageLibrary.GetSupportedTextureFormatAt(int)
    returns the enum values of supported formats. You can loop through them and change your textures formats

    Code (CSharp):
    1. for (int i = 0; i < mutableRuntimeReferenceImageLibrary.supportedTextureFormatCount; i++) {
    2.             Debug.Log(mutableRuntimeReferenceImageLibrary.GetSupportedTextureFormatAt(i) + "\n");
    3.         }
     
    douglassophies likes this.