I’m getting a class array from a function, assigning it to a variable and then doing some looping around it.
If the class is valid, processing will continue, but a reference error will occur in subsequent processing even if the class is Valid.
The error doesn’t occur if the class is assigned directly to the variable, so I think it’s probably caused by an incomplete dynamic variable assignment. I understand that since it is an array of classes it will take some time to process.
The problem is that I can’t find a way to know when a Array is fully assigned.
The class names is displayed correctly in Print String and IsValid is true, but a reference error occurs.
How can I solve this?
If a variable passes the “is valid” check it is valid. There are no stages.
The blueprint you show should work. Can you show the “subsequent processing” that fails?
If sequential checks fail it means it was invalidated in the meantime. Check your other code if something is invalidating the variable you refer to. Check also if you are referring to the correct variable.
Well, not many things.
Simply, the created widget is added to the slot.
If there is a problem in this part, it should fail even with the predefined variables (Added directly to the Classes variables).
Ok… Where do you get the reference error you were talking about in your original post? (and what does it say)
The error occurred on Add Child and Content was empty.
This means that the widget creation failed (or it is destroyed immediately after it is created).
But this only happens if it receive an array from outside.
This array is always valid and its contents can be output in a Print String.
As you say, this should work.
For some reason this is not the case. Weird…
Oh wait. After trying a few things it started to work.
Place an array clear node at the beginning of the process.
Create an array to store the created widgets.
Stop using Class Default and pass the class directly to the widget.
Something worked…
But I still don’t understand. These seem unrelated to the problem.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.