So from what I’ve learned so far using entities has two workflows. The first is creating gameobjects and then baking/converting them to entities at runtime and this is the method that every tutorial seems to use.
The other method is creating the entities through code at runtime which is my preferred way of gamedev. Does anyone know of some tutorials that teaches entities with this workflow?
Which is amazing, this guy is a very good teacher. Problem is the tutorials are 4 years old and the code is all different now. Even the unity manual has outdated code, Add components to an entity | Entities | 1.3.0-pre.4
??? O_O how we supposed to learn this stuff… seems like all the info is from 3-4 years ago. Guess I need to purchase a chatGPT subscription.
You will need to use code for authoring any baking setups except for the most rudimentary setups. Creating authoring workflows 100% requires coding if there was some confusion.
For everything else if you insist on runtime entity creation, which generally all docs will not cover as its inefficient and not the recommended way of doing things, you can:
Inspect the baking process, either by looking at the code for what bakers do behind the scenes and/or simply inspecting the result of baking something and seeing what components are added to it. Bakers handle a lot so you will be doing a lot of wheel reinventing.
Highly recommend you just use baking. Also chatgpt will be out of date and out of its depth for its solutions for dots.
What if you are making a procedurally generated game? You would need to create the entities and assign their components at runtime or read from a data file.
Most procgen isn’t really standing stuff up from zero… yes, some of it is, but almost always you’re building with bigger pieces, whether that is entire rooms, chunks of levels, agents, etc.
The magic of procgen comes in when you find the right granularity of pre-fabricated stuff mixed with the flexibility of placement and configuration and well-directed randomization.
I haven’t used DOTS much but I imagine the same rules hold true, just different ways of actually doing the work and getting the world to exist.
Based on my experience, ChatGPT will be counter-productive for this purpose.
In other words, if you cloned yourself and one copy of you used Chat to learn DOTS programming, the other copy of you would likely a) learn a lot more, and b) be finished a lot quicker with far less head-scratching.
If there was any up to date tutorials maybe. You would think unity would spend some effort to teach developers how to use their systems. It would be in their best interest no? All we get is a manual that very rarely has sample code available.
On that page specifically? The Rotation component and the mechanism for building the EntityQuery.
I don’t have any suggestions regarding good tutorials or learning resources for beginners with the latest stack. My suggestion would be to ask technical questions in the ECS community spaces. There’s enough people here that have been around long enough to know the caveats.