Search Unity

IAP causes texture import problems when changing platforms in the editor

Discussion in 'Unity IAP' started by paxtonmason, Feb 6, 2019.

  1. paxtonmason

    paxtonmason

    Joined:
    Sep 17, 2012
    Posts:
    8
    With IAP installed in our game, changing platforms in the build settings does not properly crunch all of the game's textures. We can see this problem by stepping through the textures in the unity inspector and notice that many of them say "not yet compressed". The fact that many of these textures are not crunched causes errors loading the asset bundles that contain the textures in web builds of our games.

    Note that in unity's preferences, the "compress on import" option is enabled. Building the game will not fix the lack of compression, nor will calling AssetDatabase.Refresh or any other unity API that I can find. The only work around I've found is to delete the Library folder and then open the game in Unity with the correct platform and *never* change the platform. Also, don't use a cache server, because the uncompressed files seem to get cached in the broken state and spread the problem around to others on your team. Our team has lost multiple days of work dealing with these problems.

    It seems very weird that unity's IAP is part of the problem (although it appears to me there are multiple unity bugs in different systems), but I found another user, tim-unity, who mentioned this problem here: https://forum.unity.com/threads/tex...-when-building-or-switching-platforms.601162/ (comment #9)
    After reading his comment, I experimented with removing IAP and indeed the problem does go away.

    Is there a defect report in the issue tracker? Any idea when this will be fixed?
     
    Last edited: Feb 7, 2019
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @paxtonmason When you installed Unity IAP, it should have prompted you to update the API, and recommend that you make a backup first. Did you receive this popup and say Yes? At any rate, this is the second time I've heard of this behavior, I'll do some further checking here.
     
  3. paxtonmason

    paxtonmason

    Joined:
    Sep 17, 2012
    Posts:
    8
    @JeffDUnity3D I'm not sure about the specific popups, but I can tell you the versions we have installed.
    I've tried Unity 2018.2.17f1, and the latest release 2018.3.4f1. The IAP installed version is reported as 1.21 in the IAP updates window, and as 2.0.3 in the package manager. Not sure why those would be different.

    Thanks for looking into it.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    The team believes they have identified the issue. If so, hopefully it will be included in an upcoming release. We are close to code freeze for the very next release, but we'll see what we can do.
     
  5. paxtonmason

    paxtonmason

    Joined:
    Sep 17, 2012
    Posts:
    8
    Awesome!