SpriteFactory.Sprite.useBatchScaling
C#: bool useBatchScaling
JS: var useBatchScaling : bool
Description
True = Scale Sprite by modifying the mesh instead of using transform scale. Allows dynamic batching with sprites of different scales to reduce draw calls. Set the desired scale in the inspector using the Transform scale as usual. When gameplay begins or sprite is instantiated, Transform.localScale will be reset to 1,1,1 and the sprite will be scaled by modifying the mesh vertex positions instead.
Note: To enable/disable batch scaling during gameplay, it is recommended to cal SetUseBatchScaling instead of setting this variable. (Changes to useBatchScaling directly will take place one cycle after the value is changed. SetUseBatchScaling will take place immediately. Also, SetUseBatchScaling allows you to optionally convert the current transform scale to batchScale automatically so a scaled sprite's size stays the same after enabling batch scaling.)
Important - If using batch scaling, to change the scale of the sprite during gameplay, set batchScale instead of modifying the transform scale.
See Also
batchScale
SetUseBatchScaling