TileSetScenesCollectionSource.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TileSetScenesCollectionSource" inherits="TileSetSource" version="4.0">
  3. <brief_description>
  4. Exposes a set of scenes as tiles for a [TileSet] resource.
  5. </brief_description>
  6. <description>
  7. When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap.
  8. Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="create_scene_tile">
  14. <return type="int" />
  15. <argument index="0" name="packed_scene" type="PackedScene" />
  16. <argument index="1" name="id_override" type="int" default="-1" />
  17. <description>
  18. Creates a scene-based tile out of the given scene.
  19. Returns a newly generated unique ID.
  20. </description>
  21. </method>
  22. <method name="get_next_scene_tile_id" qualifiers="const">
  23. <return type="int" />
  24. <description>
  25. Returns the scene ID a following call to [method create_scene_tile] would return.
  26. </description>
  27. </method>
  28. <method name="get_scene_tile_display_placeholder" qualifiers="const">
  29. <return type="bool" />
  30. <argument index="0" name="id" type="int" />
  31. <description>
  32. Returns whether the scene tile with id [code]id[/code] displays a placeholder in the editor.
  33. </description>
  34. </method>
  35. <method name="get_scene_tile_id">
  36. <return type="int" />
  37. <argument index="0" name="index" type="int" />
  38. <description>
  39. Returns the scene tile ID of the scene tile at index [code]index[/code].
  40. </description>
  41. </method>
  42. <method name="get_scene_tile_scene" qualifiers="const">
  43. <return type="PackedScene" />
  44. <argument index="0" name="id" type="int" />
  45. <description>
  46. Returns the [PackedScene] resource of scene tile with id [code]id[/code].
  47. </description>
  48. </method>
  49. <method name="get_scene_tiles_count">
  50. <return type="int" />
  51. <description>
  52. Returns the number or scene tiles this TileSet source has.
  53. </description>
  54. </method>
  55. <method name="has_scene_tile_id">
  56. <return type="bool" />
  57. <argument index="0" name="id" type="int" />
  58. <description>
  59. Returns whether this TileSet source has a scene tile with id [code]id[/code].
  60. </description>
  61. </method>
  62. <method name="remove_scene_tile">
  63. <return type="void" />
  64. <argument index="0" name="id" type="int" />
  65. <description>
  66. Remove the scene tile with id [code]id[/code].
  67. </description>
  68. </method>
  69. <method name="set_scene_tile_display_placeholder">
  70. <return type="void" />
  71. <argument index="0" name="id" type="int" />
  72. <argument index="1" name="display_placeholder" type="bool" />
  73. <description>
  74. Sets whether or not the scene tile with id [code]id[/code] should display a placeholder in the editor. This might be useful for scenes that are not visible.
  75. </description>
  76. </method>
  77. <method name="set_scene_tile_id">
  78. <return type="void" />
  79. <argument index="0" name="id" type="int" />
  80. <argument index="1" name="new_id" type="int" />
  81. <description>
  82. Changes a scene tile's ID from [code]id[/code] to [code]new_id[/code]. This will fail if there is already a tile with a ID equal to [code]new_id[/code].
  83. </description>
  84. </method>
  85. <method name="set_scene_tile_scene">
  86. <return type="void" />
  87. <argument index="0" name="id" type="int" />
  88. <argument index="1" name="packed_scene" type="PackedScene" />
  89. <description>
  90. Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap.
  91. </description>
  92. </method>
  93. </methods>
  94. </class>