Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

(Suggestion for ECS) Allow TransformSystem to account for generic use of only "Position".

Discussion in 'Entity Component System and C# Job system' started by Mr-Mechanical, Nov 9, 2018 at 5:18 AM.

  1. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    81
    Here's what I mean by a "generic" use of "Position"...

    Normally TransformSystem will add LocalToWorld matrix to any entity with Position or Rotation or Scale. This makes sense. However, there are use cases when users will use just "Position" alone to describe something and it doesn't require a hierarchy transformation matrix. The problem is you'll have an extra 4x4 float matrix per entity.

    Obviously, this is just a minor thing. I really like what Unity is doing with ECS. Seriously amazing how easy it is to get performant code with ECS.

    For more details, I mention this somewhere in this thread: https://forum.unity.com/threads/how...d-for-meshinstacerenderer-in-pure-ecs.579268/
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    574
    I don’t understand your problem, just not use it, if you don’t want TransformSystem, write your own MyPosition and use it, or create your World and use Position on entities in your world (which not be used in default world thus TS not use it).
     
    Mr-Mechanical likes this.
  3. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    81
    It's a good option and I had mentioned it in the thread. But yeah, I just like the idea of reusing unity's Position (this is definitely a bit nit-picky).