blocks-view-integration.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. include:: ../_header.rst
  2. Blocks view integration
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. When the |SceneEditor|_ is active, the |BlocksView| shows the "blocks" you can get and drop into the scene, to create new objects. These are the blocks:
  5. * Built-in types. Phaser_ types and other |PhaserEditor|_ related types.
  6. * Images packed in an |AssetPackFile|_.
  7. * The frames of a sprite-sheet or texture map defined in an |AssetPackFile|_.
  8. * `Bitmap Fonts <bitmap-text-object.html>`_ packed in an |AssetPackFile|_.
  9. * The prefabs_ you created.
  10. The first items shown in the |BlocksView|_ are the primitive object types supported by the |SceneEditor|_. You can drag on type on drop it into the scene to create an instance of the type, with the default values.
  11. In case of images, sprites or tile-sprites, the new instance does not contain a texture. If you want to set a texture to the object, you can select one in the `Texture section <texture-property.html>`_.
  12. .. image:: ../images/scene-editor-blocks-view--add-empty-image-02242021.webp
  13. :alt: Add an empty image to the scene.
  14. However, if you drop an image or texture frame into the scene, the editor creates a new `Image object <image-object.html>`_ and sets the dropped texture as the object's texture.
  15. Maybe, instead of an `Image <image-object.html>`_, you need to create a `TileSprite <tile-sprite-object.html>`_ with the same texture, in that case, you can just `convert it to a TileSprite <replace-object-type.html>`_.
  16. If you drop a **BitmapFont**, the editor creates a `Bitmap Text <bitmap-text-object.html>`_.
  17. If you drop a Prefab_, the editor creates an instance of it.
  18. .. image:: ../images/scene-editor-blocks-view-02242021.webp
  19. :alt: Blocks view.
  20. The context menu shows different options for grouping the assets: by type, by Asset Pack file, and by file location:
  21. .. image:: ../images/scene-editor-blocks-view-grouping-02282021.webp
  22. :alt: Grouping the assets.
  23. Also, the Blocks view's tab, shows "tab sections" which you can select for filtering the content:
  24. .. image:: ../images/scene-editor-blocks-view-tab-section-03012021.webp
  25. :alt: Select different tab-sections for filtering content.
  26. Notice that there are three options:
  27. **Built-in**: only the built-in types are shown in the view.
  28. **Prefabs**: only the prefab files are shown.
  29. **Assets**: only the assets defined in Asset Pack files are shown.