Loading status of an asset. When the status is Ready the asset is ready to use. If loading fails the status will be Failed and RBAsset.error can be checked for more failure information.
publicvoid Initialize() { // Load asset from WWW. This method call will immediately return without blocking. mySprites.Load("https://mygame.com/sprites.png", SpriteSheetAsset.SheetType.SpriteSheet, RB.AssetSource.WWW);
// Sprite grid can be set before the sprite sheet is loaded mySprites.grid = newSpriteGrid(newVector2i(16, 16)); }
publicvoid Update() { if (mySprites.status == RB.AssetStatus.Failed) { if (mySprites.error = RB.Result.NetworkError) { RB.Print(newVector2i(4, 4), Color.white, "A network occured error while loading assets!"); }
return; }
if (mySprites.status != RB.AssetStatus.Ready) { return; }