#It fails on the last node, when it has
1 messages · Page 1 of 1 (latest)
"its fails on the last node": do you mean you get a blueprint error after PIE ? Or it seems to do nothing but doesn't trigger any error ? Is it an error logged in the output log ?
can you share the overall logic ? aka when is this called ? how is this graph's owner linked to the quest panel ?
If you think it may be tied to order of initialization you can simply add prints to know what is executed first
It prints an error and aborts the function when playing in the editor. I'll grab a couple more screenshots in just a bit.
aborts the function ?? wdym ?
Here's the flow:
Any reference to ObjectiveListView turns out null and prints that error at the end. I've circled the spot where it's happening.
what your doing is a sequence so on the second then its failing because on the first you got is not valid but your not checking if it's valid on the second
Indeed, that was partly for the sake of testing. What I'm trying to figure out is why it's not valid.
As mentioned I'm assuming it's something to do with the fact that the views are nested.
It's a widget within a list view. The widget implements the User Object List Entry interface, allowing to be used as an entry for the list view.
are you trying to add a child to the list ?
what's the macro and how's the 1st method called ?
Yes, I'm adding a child to the list as shown in the second screenshot. Then, that child attempts to do the same thing for its own list view.
It's just assigning data to the widget.
This is in the HUD class:
so where do you set the variable ? you said its a widget inside a widget
where do you create the variable that is none ?
it's part of the widget, it shouldn't be null 🤔
well there is an isvalid check
Na he's not using it
Here's where the ObjectiveListView is. Theoretically it should be built into the widget and therefore always present.
And "refresh objective display" is part of HUD QuestEntry right ?
Correct, that's the function that's supposed to be adding children to the ObjectiveListView.
do you remove it or it's parent at any time ?
Damn that's weird, can you do a global research on where the ObjectiveListView is used ? It looks like you may be doing a Set on it to null
what bp is this in ?
(general concern: try to avoid Canvas Panel, especially on simple entries, you should have as few as possible. In this screenshot you have 2 canvas panels and I think none of them are necessary, you can probably use an hbox/vbox)
the add item, what bp is it in ? is it in the items bp itself ?
if so do you have a variable on the left with that name or something ?
AssignProgression and most graphs seem to be in the HUD Quest Entry, and the BeginPlay node is in the global HUd from what I understood
well if it's in the quest entry
you won't have access to to the widget stuff
so i wonder how that variable got there
because it's a seperate widget ?
that you create and add to the list
the widget stuff is in the quest entry
That's insightful, I'm still new to UI stuff in Unreal, I'm more familiar with Unity's.
are you trying to have quest entry in quest entry ?
It goes...
BP_DebugHUD -> Create HUD_QuestPanel -> AssignProgression
HUD_QuestPanel -> Create HUD_QuestEntry -> AssignQuest -> Add to QuestListView
HUD_QuestEntry -> Create HUD_QuestObjectiveEntry -> AssignTask -> Add to ObjectiveListView
"HUD_QuestObjectiveEntry" looks like new information there
no nvm
it can be ignored here I believe
Side note, here's what it all looks like visually:
that's the view from the designer right ? Not ingame ?
Right
and ingame it's empty ?
actually can you try to add one item at Construct in the quest entry's view list ? Just to see if it displays this one item in game
I've got a trigger volume to assign a quest. It adds the quest entry itself just fine, as seen here:
But the quest data and my debug messages say it should have one objective showing as well. I've confirmed the objective does exist and is listening to events as intened.
Wait, come to think of it... I just remembered another detail, one sec.
Ah ha! It appears that even the Quest Name text box is treated as null when assigning the data. This is in the DoAssignQuest macro:
it's probably the whole widget which is invalid
a way to debug this is to try to isolate the faulty thing and slowly add the overall context around it.
For example, you can add the faulty widget as a part of the global HUD (for debug purpose only), and try to add a hard-coded row when you press a key
see if that works, if it does, then the widget itself works fine, you can try to work your way up like this
This also points to your widget not being valid at all. e.g. it got destroyed at some point, or its parent isn't valid either (not sure this is possible). Check that CreateWidget does indeed create a valid widget, and add IsValid nodes alongs the way with prints to see when it becomes invalid
I added a free-floating one to the quest panel, off to the left. When the quest is added to the progress data, it correctly assigns the name and creates one objective entry, but now the objective entry's text is reporting null when attempting to set the text value.
"objective entry's text", is it the text displaying "Objective0/1" ?
Yes, that is reporting null in the objective widget's graph.
I just tried adding a delay to applying the name so it has time to initialize, but that doesn't seem to do it either. It appears as if anything in a list view always has null sub-widgets.
no, w/e is part of the widget in the hierarchy is always initialized when the "construct" node is called. If they're not, it means the owning widget is invalid
It seems like that's how it's behaving though. Anytime I construct something and add it to the list view, its widgets act as if they're null.
Though that does give me an idea for testing...
can you show the full macro ?
New update: Instead of adding the entries to the list views, I'm adding them directly to the viewport.
When these entries are added to the viewport and I immediately try to set the text values, it comes up with the same error. However, when I add a one-frame delay before trying to set the text values, they work fine.
No amount of delay works when they're part of a list view.
"When these entries are added to the viewport and I immediately try to set the text value"
as part of a list view right ?
No, I tried putting the quest entry on the viewport specifically, separate from the list view. With that, plus a one-frame delay, I was able to set the text and spawn the objective entry (also to the viewport).
It appears I may be doing this all wrong after all. Going to keep tinkering for a while.
Figured it out! Turns out I misunderstood the system a great deal. The data sits in the list, and the list swaps out widgets automatically as necessary.