#[Feedback] DOTS is great but wasting potential in mainstream adoption

1 messages · Page 1 of 1 (latest)

livid cipher
#

I know there are pro's out there who already know the ins and outs of DOTS and who have no problem using it. But this feedback is more from the view of the average unity dev, who come from MonoWorld and OOP. If you are not that type of dev, then you may not agree with the following.

TLDR;
DOTS is great tech, no doubt- and switching to DOD paradigm also makes sense! But in the current state (1.0), DOTS is still way to inconvenient to use. I believe many would immediately switch over to DOTS and accept DOD as new paradigm, or atleast hybrid... but DOTS is lacking premade methods/functions that allow for easy access.

Example:
here we see a guy who simply wanted to access info from a GameObject in MonoWorld, and apply this info to an Entity.

This is how people would expect it to work:

var valueForEntity = MonoWorld.SomeGameObjectOrPublicVariable.Value;

But here is how its currently implemented:

    public class PlayerTracker : MonoBehaviour
    {
        private void Start()
        {
            var em = World.DefaultGameObjectInjectionWorld.EntityManager;
            var entity = em.CreateEntity();
            em.SetName(entity, name);
            em.AddComponentObject(entity, this);
        }
    }
     
    [UpdateInGroup(typeof(TransformSystemGroup), OrderLast = true)]
    public partial class PlayerTrackerSystem : SystemBase
    {
        protected override void OnUpdate()
        {
            if (!SystemAPI.TryGetSingletonEntity<PlayerTag>(out var playerEntity))
                return;
     
            var localToWorld = SystemAPI.GetComponent<LocalToWorld>(playerEntity);
     
            Entities.ForEach((PlayerTracker tracker) =>
            {
                tracker.transform.SetPositionAndRotation(localToWorld.Position, localToWorld.Rotation);
            }).WithoutBurst().Run();
        }
    }

(source: https://forum.unity.com/threads/entities-1-0-0-pre-15-ecs-cinemachine.1383159/)

#
All this much lines of code for a simple fetch of one value...

There are more such examples. I believe this is due to the early stage of DOTS, and i hope (and tbh expect) from unity devs that they quickly provide functions or libraries that allow for more easy access, like in the first example i provided.

Me personally, i will continue the heavily burdened pilgrim of learning DOTS, but i believe unity is currently scaring away lots of other Mono game devs, that are open and WANT to move to DOTS, but cant find access to the tech as it is to over-complicated.

Here are my suggestions how this could be countered:

=> before adding NEW features to DOTS, get the base stable (if not already) and then integrate functions that ease up the access to basic functionality we know from MonoWorld

=> please add support for animation, currently we have to use workarounds. Here is a great overview of current available methods: https://forum.unity.com/threads/dots-animation-options-wiki.1339196/

=> Provide more examples, basic ones like "move object from a to b", or "access value from GameObject in MonoWorld", things like that.

=> Pay youtubers to flood youtube with DOTS tutorials, maybe complemented by examples from unity theirselfes.. this unity dev @cyan wraith for example, demonstrated cool stuff in a video (https://www.youtube.com/watch?v=BNMrevfB6Q0) but unfortunately it is out of date. He seems fluent with dots and just goes "click here, boom there, easy" to get working examples in a 20 minutes talk (this version of the video: https://www.youtube.com/watch?v=QbnVELXf5RQ) ..a few tuts of this guy could already help alot, complementing already existing tutorials, which are still only a few.

...

I believe after these major points have been solved, adoptance of DOTS may triple up.

I know DOTS is in early stage and still to be improved in future, but i hope that the above mentioned are changes we will see soon.

#

[Feedback] DOTS is great but wasting potential in mainstream adoption

iron marsh
#

you are meant to access Mono from System

#

not vice versa

#

there can be multiple ecs worlds, but mono world is one and only

#

so it makes way more sense to either use static singleton or Object.Find<>