Topic: Broken script after last update

Hi
I updated Online maps this morning (that haven't been done since more than a month) and i got an error spamming my console (and making the app really slow) on a custom script, which purpose is to check the downloaded tiles.

Here is the script :

using UnityEngine;

public class CheckArcGISTile : MonoBehaviour
{
    private Color emptyColor = new Color32(204, 204, 204, 255);

    private void Start()
    {
        OnlineMapsTileManager.OnTileLoaded += OnTileLoaded;
    }

    private void OnTileLoaded(OnlineMapsTile tile)
    {
        Texture2D texture = tile.texture;
        Color c1 = texture.GetPixel(1, 1);        // new error is here
        Color c2 = texture.GetPixel(254, 254);

        if (c1 == emptyColor && c2 == emptyColor) tile.status = OnlineMapsTileStatus.error;
    }
}

Error is on line 15. When disabling this script, the app doesn't get slowed.
error is "null reference exeption: object not set to an instance of an object ..."

So i guess things have change since july about the tile loading, what is the new way of doing this correctly ?

Thanks for your help
Thibault

Re: Broken script after last update

Hello.

Thank you for the bug report.
This is a cache error.
The problem is fixed and you have two ways:
1. Wait for the new version (most likely next week).
2. Write an email (support@infinity-code.com) and I will send you a modified script.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.