Welcome back, everyone! As the title suggests, in this post, we’ll explore how to generate entities from prefabs at runtime. This is a crucial aspect of any game engine, as it allows for the dynamic creation of game objects during gameplay. Since this blog focuses on Unity ECS, I will explain how to generate entities at runtime using this system. Recap of previous posts: If you haven’t yet checked out the earlier posts, I’ve covered how to create and add components in Unity ECS , as well as the differences between standard components and custom ECS components. I highly recommend reading them, especially if you’re a beginner. In this blog, I will guide you on converting your non-ECS Unity project to Unity ECS and cover all related topics. I hope you’ve opened your ECS project. In the last couple of posts, I explained how to create entities from the editor, so do check those if you’re unfamiliar with the process. Once you’ve done that, you can start from
Welcome to our guide on creating and adding components in Unity using ECS (Entity Component System). In this post, we’ll explore the differences between Unity's standard components and ECS components, and walk you through the process of adding components to entities. We’ll cover key concepts like baking, and demonstrate how to set up and view components in both authoring and runtime modes. By the end of this tutorial, you'll have a clear understanding of how to work with ECS components and implement them in your Unity projects. Let me remind you of the full form of ECS: Entity Component System. It consists of three key elements: 1. Entity, 2. Component, and 3. System. In this blog post, I will specifically focus on how to create and add components, and explain the differences between Unity's standard components and ECS components. If you haven’t already, be sure to check out my blog post on creating your first entity and setting up a subscene