Search Unity

trying to feed in an individual GOs value into the OnUpdate of a JobComponentSystem

Discussion in 'Entity Component System' started by uani, Feb 28, 2019.

  1. uani

    uani

    Joined:
    Sep 6, 2013
    Posts:
    232
    Hello,

    1: a ComponentSystem is setting a value in a component assigned to a GameObject (1 CS : n GO).

    2: I have another ComponentSystem which should act with those values, but individually.

    3: For this reason I thought of creating a World per GO in (1) and adding the CS of (2) to each of these World.

    4: Now I'm thinking of feeding in the value form the component of the GO in (1) to the OnUpdate of the "CS per World" of (3) -- or let this OnUpdate access that value.

    Is this possible? How? If not, is this already ruled out as an application of ECS or might support for such a setup be added in the future?


    Background:

    the CS of (1) calculates "in view" data (distance,dot product). the CS of (3) is supposed to Schedule a Job to perform an animation (not a Unity Animation but custom changes to transform of GO) if "in view". If not I would schedule a Job having an empty Execute function and/or a not existing Component as parameter.