Version Hell of DOTS

Is there any Guide or Tutorial of DOTS which really works? Even with Unity 2022.2.0b8 ?
Or is out there a example, from the “Get Started Tutorial”, which works with Unity 2022.2.0b8 ?

For example: I’m evaluating this post:

Ok, I added the Package
“Netcode for Entities 1.0.0-exp.8 · September 27, 2022”
In the Package Manager I click on Documentation, it leads to this manual:
https://docs.unity3d.com/Packages/com.unity.netcode@1.0/manual/getting-started.html

This manual says:
To identify the Cube Prefab, create a simple component with the following code:

using Unity.Entities;
using Unity.NetCode;

[GenerateAuthoringComponent]
public struct MovableCubeComponent : IComponentData
{
}

Assets\Scripts\MovableCubeComponent.cs(6,4): error CS0246: The type or namespace name ‘GenerateAuthoringComponentAttribute’ could not be found (are you missing a using directive or an assembly reference?)

It seems the documentation is not updated. Later on I found the information that “GenerateAuthoringComponent” is removed. But don’t have a glue how to deal with that.

Additional confusions:

  1. Why there can be found a “Netcode for GameObjects” vs “Netcode for Entities”, is there something different, which to use?
1 Like

There’s plenty of guides that are up-to-date for 0.51 in 2020 and 2021 LTS. That API was fairly consistent over the course of 2 years. However, the 1.0 experimental release in 2022 is extremely new and includes a ton of breaking changes that invalidated a lot of the old learning material. I would best describe it as “promising, but messy”. I already have a multi-page document of issues I discovered so far while migrating my framework tech over.

4 Likes

Maybe u need to make a monobehavior version of each icomponentdata script and when converting the gameobject to a entity check every possible monobehavior and if it has it attach the equivalent icomponendata to the new entity + its variables.

That’s roughly what Bakers do.

Thanks for the replies. But even the MonoBehaviour approach didn’t work.

I even have evaluated this tutorial some days ago:

Using com.unity.netcode.gameobjects with 2021.3 LTS

Doing this Tutorial (using MonoBehaviour):
compile clean: Your Netcode "Hello World" Project | Unity Multiplayer Networking
build error: Golden Path Module One | Unity Multiplayer Networking

update:
Latest version of the Tutorial “goldenpath_one” now is compile clean, but
NullReferenceException: Object reference not set to an instance of an object
at HelloWorld.HelloWorldManager.SubmitNewPosition () [0x000ab] in D:\NetCodeTutorial\Assets\Scripts\HelloWorldManager.cs:55
at HelloWorld.HelloWorldManager.OnGUI () [0x00051] in D:\NetCodeTutorial\Assets\Scripts\HelloWorldManager.cs:20

Hello,

I’m working on a tutorial series that will take you to make a tower defense protype.

Unfortunately, I started a few weeks before 1.0-exp release so the 3 first episodes are using 0.51. and the fourth take you through the changes and upgrade of that tutorial project t o1.0-exp.

Still if you are completely new to DOTS and ECS? I feel like right now it’s a good starting point, most of what is discussed in the beginning of the series is still relevant and I pointed out the main change impacting each video as pinned comment in the video.

So, if you want to give it a try, you can start with that. I have a bakers/baking system video coming, hopefully, this weekend.

1 Like

I agree, currently is probably the worst time to learn to use DOTS.

If you are only interested in the Entities package, unity did a very great job with the following tutorial:

https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/DOTS_Guide/ecs_tutorial/README.md

But if you want to go further and use the physics package or the Netcode one, you will be in for a rough ride. If you had a project in 0.51, you probably will figure out what to do to make it work, but if you are starting now, it will be painful.

I would advise probably starting with 0.51, using the documentation and examples of that version, or waiting for a few more weeks until everything is up to date.

Currently, I can’t make any working build (neither on windows nor android) with the netcode package, so it’s currently in a very experimental stage, as it should be.

It is great that unity shared with us this early version, so we can give feedback and advice to improve their current direction and we can offer them a multitude of perspectives and concerns, but for learning maybe wait a little longer.

2 Likes

The ECS Tutorial that Occuros linked was very helpful. I definitely recommend starting with it!

I made a tutorial a couple of months ago about using Unity DOTS to replace the bullet system of a traditional game prototype. I provided the code in the different stages ready to run. Unless something huge has changed in 2 months the whole thing should be ready to download and play:

  • Bullet system with MonoBehavior: Dropbox
  • Bullet system using DOTS ECS: Dropbox

In case that you wanted to try the lesson here are the slides and the video tutorial:

1 Like

Holy batman! The entire Library and obj folders are included in the zip file!!