Hi everyone! We have just published a set of reference material to help you get started with DOTS, and ECS in particular. You’ll find there:
A summary and video overview of important ECS concepts
A simple tutorial to learn the basics of using ECS and the Job System
A set of cheat sheets across API topics
This is the first release of this material, so we are eager to read your thoughts. Please use this thread to share any feedback you have on how to improve that content.
Very impressive, neat and tidy setup, helped to understand the different aspects. Hope there will be more guides on the different windows etc.
Did however have to get through about 5 Unity reloads (build system error, something to do with saving code VS/recompile), and finally out of memory crash (32GB) blackscreened. Oddly I can no longer load the project, it just keeps loading Application.UpdateScene. Probably need a computer restart.
Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 6)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I put this down to the Editor being beta though (b9), or something to do with Burst (1.7.4).
Restarted and stable so far, and still impressive. Was hoping to build, is that a no go on IL2CPP atm, or am I missing a setting in Build Configuration?
Assembly-CSharp.cpp(11739):
error C2664: ‘float fmodf(float,float)’: cannot convert argument 1 from ‘RuntimeObject *’ to ‘float’
error C2660: ‘Il2CppCodeGenWriteBarrier’: function does not take 1 arguments
error C2664: ‘Color_tD001788D726C3A7F1379BEED0260B9591F440C1F Color_HSVToRGB_m1E66966AAB74D56DB4D339B65E60E2AF435C8105_inline(float,float,float,const RuntimeMethod *)’: cannot convert argument 1 from ‘String_t *’ to ‘float’
There are definitely some issues in this experimental release, I don’t think anything you encountered there is specific to the tutorial and are already tracked (check the list of know issues in the main announcement post). Those particular temp allocation leak reports should normally be false positives.
I’ve tried a normal build (now using Smaller Builds) also using a build configuration which doesn’t have a choice. Furthest I get is, cannot find mspdcore.dll. When I updated to VS2022 I deleted VS2019 not sure if that has anything to do with it. I’ll try adding some more build tools in VS feel that something is missing as unable to find manually.
Finding the material really useful to ‘get my head round’ DOTS and am enjoying the process. The organisation of scripts into different DOTS directories by concepts is helpful. The step by step, illustrate one concept at a time approach works for me, as usually I drown in detail. I am using this tutorial to establish my workflow for creating projects with DOTS, so a template for the ‘correct’ way of creating and organising a DOTS project would be useful.
The guide is great, excellent and clear way to learn about the fundamental concepts.
What is really needed, and I’m sure you know this, is a series to walk through the practical steps of integrating these concepts into a game. Roll-a-ball but for DOTS, or something. The tech is not settled so I get that this release cycle is aimed for established devs who presumably can figure out that stuff on their own. But the true herald of the DOTS era will be when we can see and follow along with best-practice implementation to create a functional DOTS game.
I think is important to have guides and tutorial around it on full release so that users who might actively promote it can more easily get to love it and make it popular. Maybe also some basic useable templates to start people off. I like the idea of visual scripting and high performance which tend to be opposite ends of the spectrum.
There is a slight ambiguity in:
Modify the contents of the file named “TurretShootingSystem.cs” in the folder “Scripts/Systems” as follows:
+// Requiring the Shooting tag component effectively prevents this job from running
+// for the tanks which are in the safe zone.
+[WithAll(typeof(Shooting))]
[BurstCompile]
Being skilled in the art of getting things slightly wrong, I inserted the modification before the first instance of [BurstCompile]. Of course the tanks were not inhibited from shooting in the safe zone. It took me two iterations of creating the project to realize that what is meant (when I read the instructions carefully) is to insert the code before the second instance of [BurstCompile]. But thanks for this excellent example - I am enjoying learning ECS.
Are you talking about step 4 of this part?
I wouldn’t exactly say there’s ambiguity here, the context provided below that part of code - the whole TurretShoot job, actually - should be sufficient. It’s totally understandable to make mistakes like this when you’re over-eager (that’s usually a good state of mind).
I agree and perhaps it is the best way to learn. However, if some of the original context before [BurstCompile] had been provided, then there would have been no ambiguity, and my ‘digital correlator’ would have operated correctly, even when operating at zero lines of look-ahead awareness.
@Fabrice_Lete
Can you add a section using dynamic buffer ?
Something like I do with my DOTS training series where entities follow a path defined by a dynamic buffer ?
You asked for feedback. I’m still reading it through and testing. While it’s dense (and the initial setup not as smooth as I wished, but ti’s more my fault and configuration from unity hub fault), the whole is very digest and informative.
And on point 12, in the note it’s mentioned that the following step would use ComponentDataFromEntity with a link to the doc. The doc points to the correct method, but this one is documented as Obsolete, and indeed in the following code the method is not used. Reading the comment from the code and the note text I believe it should be updated (in the doc) to ComponentLookup?
If this is the case it would be great as well in the documentation of ComponentDataFromEntity to have a link mentioning that the correct replacement for this obsolete method is ComponentLookup.
Except for that, so far so good, really excellent tutorial!