1
Support / Re: 2d Toolkit deprecated on store
« on: April 28, 2020, 04:54:41 pm »Do you mind sharing where you had to include null checks? I'm not using Unity 2019 yet, but probably will upgrade to it in the next few months. Thanks!
Sure thing:
Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs:
Code: [Select]
Line 381 (replace): public int Count { get { return inst == null ? 0 : inst.spriteDefinitions.Length; } }
Line 578 (replace): platformSpecificData?.Init(); // awake is never called, so we initialize explicitly
Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs
Code: [Select]
Line 69 (insert): if (collectionInst == null) return;
Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSlicedSprite.cs
Code: [Select]
Line 262 (insert): if (CurrentSprite == null) return;
Assets/TK2DROOT/tk2d/Code/Sprites/tk2dBaseSprite.cs
Code: [Select]
Line 954 (replace): if ( Collection != null && Collection.inst != null && GetComponent<Renderer>() != null&& GetComponent<Renderer>().sharedMaterial == null && Collection.inst.needMaterialInstance) {
I am just using Sprites and Sliced Sprites. You might need more if you touch other artefacts also.