I'm trying to put an enum name into a SharedString variable that is then passed to a behavior tree reference as a variable but it's not working.
In the same script, the SharedString could also be set to a regular string variable - when that happens, everything works fine but as soon as I try to set the SharedString to a [enum].ToString() it doesn't work. In the behavior tree, the SharedString remains empty / (null).
Edit: Just for more clarification, after I set the [SharedString].Value to the [enum].ToString() I did a debug.Log and printed out the value of the shared string to make sure it wasn't null and I got a value back it's just that it does not get transferred properly to the external tree. Like I said, the exact same code works when I put a regular string into the SharedString value instead of using enum ToString.
Edit: Ah, I put this in the wrong forum. This is for Behavior Designer
In the same script, the SharedString could also be set to a regular string variable - when that happens, everything works fine but as soon as I try to set the SharedString to a [enum].ToString() it doesn't work. In the behavior tree, the SharedString remains empty / (null).
Edit: Just for more clarification, after I set the [SharedString].Value to the [enum].ToString() I did a debug.Log and printed out the value of the shared string to make sure it wasn't null and I got a value back it's just that it does not get transferred properly to the external tree. Like I said, the exact same code works when I put a regular string into the SharedString value instead of using enum ToString.
Edit: Ah, I put this in the wrong forum. This is for Behavior Designer
Last edited: