Topic: Cannot initialize non-default texture with negative or zero width.

Hello Alex.
Today Unity 2023.1 was released, and I wanted to test one of my projects with OnlineMaps 3.8.3.1. I'm getting the error that I'm attaching below. The error also occurs in a clean and new project if I activate "Use File Cache."
-------
Cannot initialize non-default texture with negative or zero width.
UnityEngine.Texture2D:.ctor (int,int,UnityEngine.TextureFormat,bool)
OnlineMapsCache:LoadTile (OnlineMapsTile,byte[]) (at Assets/Infinity Code/Online maps/Scripts/Cache/OnlineMapsCache.File.cs:245)
OnlineMapsCache/<>c__DisplayClass65_1:<TryLoadFromFileCache>b__1 () (at Assets/Infinity Code/Online maps/Scripts/Cache/OnlineMapsCache.File.cs:336)
OnlineMapsThreadManager:ExecuteMainThreadActions () (at Assets/Infinity Code/Online maps/Scripts/Threading/OnlineMapsThreadManager.cs:113)
OnlineMaps:Update () (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:1476)
-------
Thank you for your endless assistance.

Re: Cannot initialize non-default texture with negative or zero width.

Hi.

Thanks for the bug report.
I will add support for Unity 2023.1 and fix this bug and all the warnings in the next version of the asset, which will be released in early July.

How do you fix this right now:
Open the OnlineMapsCache.cs file in your IDE or text editor, and on lines 223 and 245, change
new Texture2D(0, 0
to
new Texture2D(1, 1

Kind Regards,
Infinity Code Team.

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

Re: Cannot initialize non-default texture with negative or zero width.

Thanks Alex, perfect.