Hi,
I've read the documentation on Dynamic Variables, but can't yet figure out how to use them properly.
Clicking the small white circle in the Inspector of a shared variable in a custom Action task, selecting "Dynamic", and then and entering a name was fine. However, after setting the value of this variable from inside OnAwake() of this custom task, I can't use the set variable in a sibling task by using the same dynamic variable name.
Here's the code of the custom Task, where I declare the SharedFloat TestVariable, which I want to use as the the WaitTime in a Wait task.
Here's the BT with the DynamicVariableTest task, and the TestVariable set as a Dynamic variable named "DynamicVar".
When I try to set the Wait tasks's WaitTime field to the "DynamicVar" Dynamic variable which was already created, this variable isn't shown in the drop down. So. I thought of selecting "Dynamic" and then entering the same name "DynamicVar". However, it doesn't work, and WaitTime ends up with a value of 0.
I'd really appreciate if you tell me what I'm doing wrong, and possibly point me to any existing examples, or give me some step-by-step instructions on how to test the usage of dynamic variables, for learning purposes.
Thank you.
I've read the documentation on Dynamic Variables, but can't yet figure out how to use them properly.
Clicking the small white circle in the Inspector of a shared variable in a custom Action task, selecting "Dynamic", and then and entering a name was fine. However, after setting the value of this variable from inside OnAwake() of this custom task, I can't use the set variable in a sibling task by using the same dynamic variable name.
Here's the code of the custom Task, where I declare the SharedFloat TestVariable, which I want to use as the the WaitTime in a Wait task.
Here's the BT with the DynamicVariableTest task, and the TestVariable set as a Dynamic variable named "DynamicVar".
When I try to set the Wait tasks's WaitTime field to the "DynamicVar" Dynamic variable which was already created, this variable isn't shown in the drop down. So. I thought of selecting "Dynamic" and then entering the same name "DynamicVar". However, it doesn't work, and WaitTime ends up with a value of 0.
I'd really appreciate if you tell me what I'm doing wrong, and possibly point me to any existing examples, or give me some step-by-step instructions on how to test the usage of dynamic variables, for learning purposes.
Thank you.