Open mpmxyz opened 8 months ago
I think the Unbox node does this however it does not output a boolean, only the casted value
Oh, my bad!
Why do we have both ValueToObjectCast
and Box
, though? They are basically the same with different visuals, right?
Edit: Reopened the issue until this question is answered.
My guess is that since the ValueToObjectCast
is a Cast
node it can be auto-created when needed whereas the Box
node is just a dedicated node. They do seem to do exactly the same thing functionally.
box needs to be balanced with an unbox in the code I bet
Seeking feedback from @Frooxius or @ProbablePrime on this one.
Is your feature request related to a problem? Please describe.
We have
ValueToObjectCast
but we don't have the reverse operation to get a primitive value out of an object. (specific use case: transmitting values via dynamic impulses where there is code between sender and receiver which is type independent)Describe the solution you'd like
A new node
ObjectToValueCast
, which outputs a primitive value and a boolean to indicate if the cast was successfulDescribe alternatives you've considered
A current workaround is to use
ToString
followed byParseX
. Note:ToString
.InvariantCulture
to be put into both nodes. Otherwise it may fail at certain data types.Additional Context
No response
Requesters
No response