2024-03-01 10:43:35 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-03-01 15:36:53 +01:00
<class name= "LayeredTileSetScenesCollectionSource" inherits= "LayeredTileSetSource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2024-03-01 10:43:35 +01:00
<brief_description >
2024-03-01 15:36:53 +01:00
Exposes a set of scenes as tiles for a [LayeredTileSet] resource.
2024-03-01 10:43:35 +01:00
</brief_description>
<description >
2024-03-01 15:36:53 +01:00
When placed on a [LayeredTileMap], tiles from [LayeredTileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the LayeredTileMap.
Scenes are instantiated as children of the [LayeredTileMap] when it enters the tree. If you add/remove a scene tile in the [LayeredTileMap] that is already inside the tree, the [LayeredTileMap] will automatically instantiate/free the scene accordingly.
2024-03-01 10:43:35 +01:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "create_scene_tile" >
<return type= "int" />
<param index= "0" name= "packed_scene" type= "PackedScene" />
<param index= "1" name= "id_override" type= "int" default= "-1" />
<description >
Creates a scene-based tile out of the given scene.
Returns a newly generated unique ID.
</description>
</method>
<method name= "get_next_scene_tile_id" qualifiers= "const" >
<return type= "int" />
<description >
Returns the scene ID a following call to [method create_scene_tile] would return.
</description>
</method>
<method name= "get_scene_tile_display_placeholder" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "id" type= "int" />
<description >
Returns whether the scene tile with [param id] displays a placeholder in the editor.
</description>
</method>
<method name= "get_scene_tile_id" >
<return type= "int" />
<param index= "0" name= "index" type= "int" />
<description >
Returns the scene tile ID of the scene tile at [param index].
</description>
</method>
<method name= "get_scene_tile_scene" qualifiers= "const" >
<return type= "PackedScene" />
<param index= "0" name= "id" type= "int" />
<description >
Returns the [PackedScene] resource of scene tile with [param id].
</description>
</method>
<method name= "get_scene_tiles_count" >
<return type= "int" />
<description >
2024-03-01 15:36:53 +01:00
Returns the number or scene tiles this LayeredTileSet source has.
2024-03-01 10:43:35 +01:00
</description>
</method>
<method name= "has_scene_tile_id" >
<return type= "bool" />
<param index= "0" name= "id" type= "int" />
<description >
2024-03-01 15:36:53 +01:00
Returns whether this LayeredTileSet source has a scene tile with [param id].
2024-03-01 10:43:35 +01:00
</description>
</method>
<method name= "remove_scene_tile" >
<return type= "void" />
<param index= "0" name= "id" type= "int" />
<description >
Remove the scene tile with [param id].
</description>
</method>
<method name= "set_scene_tile_display_placeholder" >
<return type= "void" />
<param index= "0" name= "id" type= "int" />
<param index= "1" name= "display_placeholder" type= "bool" />
<description >
Sets whether or not the scene tile with [param id] should display a placeholder in the editor. This might be useful for scenes that are not visible.
</description>
</method>
<method name= "set_scene_tile_id" >
<return type= "void" />
<param index= "0" name= "id" type= "int" />
<param index= "1" name= "new_id" type= "int" />
<description >
Changes a scene tile's ID from [param id] to [param new_id]. This will fail if there is already a tile with an ID equal to [param new_id].
</description>
</method>
<method name= "set_scene_tile_scene" >
<return type= "void" />
<param index= "0" name= "id" type= "int" />
<param index= "1" name= "packed_scene" type= "PackedScene" />
<description >
2024-03-01 15:36:53 +01:00
Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the LayeredTileMap.
2024-03-01 10:43:35 +01:00
</description>
</method>
</methods>
</class>