Hi,
we use a similar logic to the ArrayMaker addon for PM, but as a general component also use-able from script. We call this "gameobject links" and u can perform certain actions using those editor setup links.
While trying to create a "SendEventToLinked" action, i noticed that the "FsmEvent" type has some special logic tied up regarding the existence of a "FsmEventTarget" field inside a action?
It seems that by default the editor looks for those types and automatically ties them up, so if u select a external gameobject/fsm it shows only global events, while if selected self or similar, it will list only local events in the event dropdown.
While this logic is fine in itself, it looks specially hardcoded, since i cant see any special attribute that would link a FsmEvent field to a FsmEventTarget field, yet just adding a field changes the behavior?
Is there a way to manually override this logic or tie it up to a FsmOwnerDefault type? The problem is in our case, it makes no sense to have to full FsmEventTarget options visible/selectable, since the target object is just the object that has the "link" component to-be used?
We would like to use PM default SendEventToFsmOnGameObject() call, so all the eventdata and check options for a normal FsmEvent are available/setup.
Thx Andy
PS: I tried to reset the Event field to:
sendEvent = new FsmEvent("") {IsGlobal = true};
but i still don't get a drop-down list of all available global events?
We also get a "Event not used by this state or any global transition!" error, which seems to indicate that maybe FsmEvent is not designed in a way that it can be used as standalone type? This error message also seem to indicate some special logic regarding the Event type, since its not inside the ErrorCheck() call? Is there a way to disable this error check?