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 ?
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:
Why there can be found a “Netcode for GameObjects” vs “Netcode for Entities”, is there something different, which to use?
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.
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.
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
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.
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.
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: