I have an event on a script that looks like this: event Action<UnitDeathInfo>. In NodeCanvas, I subscribe to this event in a condition task and save the UnitDeathInfo parameter associated with the event into a blackboard variable. The UnitDeathInfo class is just a regular class with some public fields. It is not derived from Monobehaviour. See attached image of the code for this class.
The trouble I am having is that I cannot do anything with the fields in this class in NodeCanvas. Specfically I am trying to do a ‘Check Field’ condition task on one of the public fields in the saved blackboard variable, however the blackboard variable does not appear in the list of variables in the dropdown on the condition task. I have added all relevant class types to the preferred types editor. Nothing I seem to do makes the fields within blackboard variable accessible to condition tasks.
You are not really doing anything wrong, but it is just that right now tasks (and thus Check Field as well), only work with Component derived types for the “target” of that task. It is planned howerver to change this so that this is no longer a requirement and so that tasks can work with all types for their “target” in the future.
I hope this works for you. Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.