RB.PackedSpriteID
Method - Static
Parameters
name
|
string
|
Packed sprite name, which corresponds to the filename (without extension) of the source sprite before it was packed into the sprite pack.
|
Returns
PackedSpriteID
Packed sprite id
DescriptionA helper function for getting a PackedSpriteID from a string. These ids can then be used for drawing sprites from sprite packs with RB.DrawSprite. PackedSpriteID is more efficient to use than a string or even a FastString. PackedSpriteID is independent of any particular sprite pack. If multiple sprite packs contain sprites with the same names the same PackedSpriteID can be reused. RB.PackedSpriteID is stable across sessions, and all devices. The same string or FastString will always result in the same PackedSpriteID. Therefore, it is safe to persist and reuse these ids if needed. See Demo Reel for example usage of sprite packs. ExampleSee AlsoRB.DrawSprite SpriteSheetAsset PackedSpriteIDSee DocsFeatures - Sprite Packs Features - Drawing |