static void PlayMap( Asset asset )

robot_2Generated
code_blocksInput

Description

The PlayMap method is a static method of the Editor.EditorScene class. It is used to initiate the play mode for a specific map asset within the editor environment. This method is particularly useful for testing and previewing maps directly from the editor without needing to manually load them in a separate play session.

Usage

To use the PlayMap method, you need to pass an instance of Editor.Asset that represents the map you wish to play. This method does not return any value.

Ensure that the asset passed is a valid map asset, as the method will attempt to load and play the map within the editor's play mode environment.

Example

// Example usage of the PlayMap method
Editor.Asset myMapAsset = Editor.Asset.Load("path/to/map.asset");
Editor.EditorScene.PlayMap(myMapAsset);