Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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


    Jun 17, 2012
    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


    Apr 20, 2018
    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.