Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Prefab models

    Beginner Designer

    Prefab models convert prefabs to single drawcalls. This is useful for optimization, as Stride only renders the final model instead of the separate entities in the prefab. When you make changes to the prefab, Game Studio regenerates the prefab model.

    Drawbacks

    Prefab models don't inherit elements such as lights, colliders, or other components — they're only models, and have to be used just like other models. For example, if you have a prefab comprising two models with physics components, the prefab model creates a single model from the two models and ignores the physics components. If you need to add components to a prefab model, add them to the prefab model itself.

    Prefab models don't expose materials. This means you can't view or edit them in the prefab model asset, or in model components that use the prefab model.

    Create a prefab model

    1. In the Asset View, select Add asset > Model > Prefab model.

      Add prefab model

    2. In the Property Grid (on the right by default), next to Prefab, click Hand icon (Select asset).

      Prefab properties

      The Select an asset window opens.

      Select prefab for model

    3. Select the prefab you want to create a model from and click OK.

      Game Studio adds the prefab model to the Asset View.

      Prefab model added

    See also

    • Create a prefab
    • Use prefabs
    • Edit prefabs
    • Nested prefabs
    • Override prefab properties
    • Archetypes
    • Improve this Doc
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation