Method
Parameters
filename
|
string
|
File name to load from
|
source
|
RB.AssetSource
|
Source type
|
Returns
RB.AssetStatus
Load status
DescriptionLoad a TMX Map asset which can be used to populate RetroBlit tilemap. There are various asset sources supported: - Resources - Synchronously loaded TMX Map assets from a Resources folder. This was the only asset source supported in RetroBlit prior to 3.0.
- ResourcesAsync - Asynchronously loaded TMX Map assets from a Resources folder.
- WWW - Asynchronously loaded TMX Map assets from a URL.
- AddressableAssets - Asynchronously loaded TMX Map assets from Unity Addressable Assets.
If the asset is loaded via a synchronous method then Load will block until the loading is complete. If the asset is loaded via an asynchronous method then Load will immediately return and the asset loading will continue in a background thread. The status of an asynchronous loading asset can be check by looking at RBAsset.status, or by using the event system with RBAsset.OnLoadComplete to get a callback when the asset is done loading. This method only loads the TMX Map definition, but not individual map layers. To load map layers use TMXMapAsset.LoadLayer or TMXMapAsset.LoadLayerChunk. ExampleSee AlsoTMXMapAsset.LoadLayer TMXMapAsset.LoadLayerChunk RB.Result RB.AssetStatus RB.AssetSourceSee DocsFeatures - Tilemaps Features - Tiled TMX Support Features - Asynchronous Asset Loading |