-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify in docs that variabletype needs to be set in Toolbox XML when using typed variables #2422
Comments
How are you creating the 'hero' variable? Are you calling createVariable with the optional type set to Actor? |
Hello @RoboErikG , No, I am using |
Ah, gotcha. You need to add a type attribute to the toolbox xml.
We should probably update the documentation at the least to make this clearer. We could potentially infer the type when it's in the toolbox, but there are a lot of corner cases where that could cause problems. |
Brilliant @RoboErikG It's works perfectly ! Many thanks. |
Oh yeah, the lack of camel casing is because attributes get forced to lowercase in |
Toolbox page will get a new section on variables next week. |
Great ! Many thanks ! |
This problem lead me to craziness :-) I think it is a bug.
A want to create a custom type called 'Actor' to manage some object in my game engine.
But if I setup the type of the field_variable as well :
And I want to setup the value of this field within the tookbox definition (I also tried with a shadow block, same issue) :
NB: the block definition is into a dynamic category, so the 'hero' variable exists at the block definition time :-)
Even if 'hero' is an Actor object, it's lead to this error
I turn around from a long time with that and searched on google to find solutions, but nothing.
I know that defaultType is mandatory and everything seems OK, that's why I think it is a bug.
Here is the 'actor_create' definition :
The text was updated successfully, but these errors were encountered: