In fact in "NewBehavior2" you need to create a member that points to "NewBehavior1" (or a component on it's component ring, such as the vkActor, then do a component cast).
Why? Because there can be many instances of this behavior with the members all configured differently and you need to point to a specific instance in order to get the value of the member.
I updated your project to illustrate this point. It now has 3 instances of "Behavior1" and the "m_Name" member is configured differently for each one. In the "Behavior2" I create members to point to each instance, then in the task I print out each of the "m_Name" values.
Does this help clarify?
Attachments
-
Sample.zip (9.2 KB, 1 downloads) 1 year old
WARNING: Files uploaded in the forums are not monitored by 3DVIA and therefore might contain content that is malicious or offensive. Download at your own risk