public void setupSprites(SInstancedSpriteData instanceData)
        {
            _backgroundSpriteIdx = instanceData.requestSlot();
            _overlaySpriteIdx    = instanceData.requestSlot();

            instanceData.writeRect(_backgroundSpriteIdx, _backgroundRect);
            instanceData.writeRect(_overlaySpriteIdx, _overlayRect);
        }
        public void setupSprites(SInstancedSpriteData instanceData)
        {
            var numElements = Math.Max(_rects.Length, _scales.Length);

            _spriteSlotIdxs = instanceData.requestSlots(numElements);

            for (int i = 0; i < _rects.Length; ++i)
            {
                instanceData.writeRect(_spriteSlotIdxs[i], _rects [i]);
            }
            for (int i = 0; i < _scales.Length; ++i)
            {
                instanceData.writeMasterScale(_spriteSlotIdxs [i], _scales [i]);
            }
        }