Why don’t object variables, when used in expressions, have separate ‘value’ and ‘string’ versions?
Global and scene variables do:
Using a string object variable in this way results in:
ToString(OBJECT.Variable(VARIABLE)). Whereas using a string scene variable with ‘Text of a scene variable’ results in:
So without typing it manually, is there no way to get
What do you mean? How would you expect the expression to work? Here’s what I get :
When you type the expression manually, yes, it works and shows the available options in the drop down. But when you use the Expression Editor it only shows the option to use the variable ‘value’, not the ‘string’ as well.
So I guess I’m wanting my first screenshot to show the same sort of options as my second screenshot.
It seems both string / numerical versions are intended to be used in the expression editor, as
two options show up when searching, but both yield the numerical expression:
Ah, interesting! Thanks for pointing this out
@OongusBoongus. They do seem to be different, as selecting each one gives a slightly different result:
I.e. One uses
VariableString() while the other uses
ToString(). So presumably the former is the string version and the latter is the value version.
So this appears to be a bug in that they both don’t show up in the main list…
Yeah I never tested them, just assumed based on name they were both numerical. Good to know it is just a display issue! Just filed a bug report:
@OongusBoongus. I just filed my own bug report, mainly because I wanted to provide a PR as well:
12:52AM - 25 Aug 22 UTC
## Describe the bug
When using the Expression Editor to add an object variable
EDIT: Marking this as solved as we found the issue and I’m sure it’ll be fixed in due course.