docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Create the subscene for the spawner example

    The first step in the entity component system (ECS) workflow is to create a subscene to contain the content for your application. This task shows you how to create a new subscene which you'll use in subsequent tasks in this workflow to instantiate entities within.

    ECS workflow overview

    This task is the first task in a series of five tasks that show you how to create and optimize behavior in an ECS system. At the end of the tasks, you will have a spawner system that reads and writes component data, and instantiates entities. This workflow contains the following tasks:

    1. Create the subscene for the spawner example
    2. Create a component for the spawner example
    3. Create the spawner entity for the spawner example
    4. Create the system for the spawner example
    5. Optimize the system for the spawner example

    Each task is a prerequisite for the subsequent tasks.

    Create a subscene for the spawner

    You create subscenes in the Unity Editor.

    1. In the Editor, open a scene that has been saved as a file.
    2. In the Hierarchy, right-click and select New Sub Scene > Empty Scene.
    3. In the prompt that appears, save the new subscene. Unity adds the subscene to the open scene and you can now use it.

    Next steps

    To continue to create and optimize the spawner system, follow the next task in this workflow:

    • Create a component for the spawner example

    Additional resources

    • Understand the ECS workflow
    • Subscene overview
    In This Article
    • ECS workflow overview
    • Create a subscene for the spawner
    • Next steps
    • Additional resources
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)