Flicker
Flicker
Hi Tony
I have a question about the quest log again
I managed to get a split log as I asked about last time with entries to the left and description to the right. All is well and good in that regard!
BUT
When testing it, the questlog very briefly "flickers" when displaying entries. It is sorta like it fades in (also using your "Canvas Group Animator Controller") and then when it is "faded in" THEN it populates the quest log. (Or if the quest log is not empty, it destroys entries and rebuilds them). Is this by design or am a doing it wrong? It seems like the Demo scene behaves the same.
Best Regards
/Peter
I have a question about the quest log again
I managed to get a split log as I asked about last time with entries to the left and description to the right. All is well and good in that regard!
BUT
When testing it, the questlog very briefly "flickers" when displaying entries. It is sorta like it fades in (also using your "Canvas Group Animator Controller") and then when it is "faded in" THEN it populates the quest log. (Or if the quest log is not empty, it destroys entries and rebuilds them). Is this by design or am a doing it wrong? It seems like the Demo scene behaves the same.
Best Regards
/Peter
Re: Flicker
Hi Peter,
Try setting the main panel Canvas Group's Alpha value to 0.
When the quest log window opens, it activates the main panel GameObject. Then it plays the Show animation, which actually starts on the next frame. If the Canvas Group starts at Alpha 1 (visible), it will be visible for one frame before the Show animation starts playing.
If it's not flickering when the window opens, and instead is flickering some other time such as when you click on a quest to show its entries, please let me know.
Try setting the main panel Canvas Group's Alpha value to 0.
When the quest log window opens, it activates the main panel GameObject. Then it plays the Show animation, which actually starts on the next frame. If the Canvas Group starts at Alpha 1 (visible), it will be visible for one frame before the Show animation starts playing.
If it's not flickering when the window opens, and instead is flickering some other time such as when you click on a quest to show its entries, please let me know.
Re: Flicker
Hi Tony
Thanks for the reply.
The alpha is already on 0, and it lerps fine from 0-1 and back when closing. This "issue", if it could be called that, is also visible in the standard Unity gui Demo (SF Example Scene). What I see here is two things.
1. First when opening the quest log first time after getting a quest there is a short delay before the quest is loaded after which the quest display is refreshed.
2. Second whenever I close the quest log and open it again there is a short flicker after it opens. (After investigation I can see that the elements in the Quest Log are deleted and added again, this seems to happen even when pressing a quest to view the description).
This seems to happen with the unity ui only, when testing "Quest Example" scene with legacy UI all seems perfect
Do you experience the mentioned "issues" as well with the unity ui examples?
Best regards
/Peter
Thanks for the reply.
The alpha is already on 0, and it lerps fine from 0-1 and back when closing. This "issue", if it could be called that, is also visible in the standard Unity gui Demo (SF Example Scene). What I see here is two things.
1. First when opening the quest log first time after getting a quest there is a short delay before the quest is loaded after which the quest display is refreshed.
2. Second whenever I close the quest log and open it again there is a short flicker after it opens. (After investigation I can see that the elements in the Quest Log are deleted and added again, this seems to happen even when pressing a quest to view the description).
This seems to happen with the unity ui only, when testing "Quest Example" scene with legacy UI all seems perfect
Do you experience the mentioned "issues" as well with the unity ui examples?
Best regards
/Peter
Re: Flicker
Hi Peter,
I'll check it out and let you know later today.
I'll check it out and let you know later today.
Re: Flicker
Peter,
I believe this was fixed in 1.5.6.1 or the latest patch release. I just PM'ed you your download access info.
If this doesn't fix the issue, please let me know.
Thanks,
Tony
I believe this was fixed in 1.5.6.1 or the latest patch release. I just PM'ed you your download access info.
If this doesn't fix the issue, please let me know.
Thanks,
Tony
Re: Flicker
Hi Tony
I just tried updating (edit: to ver. 1.5.6.1) through asset store, and the result was still the same when running the default "SF Example Scene" in a blank project. Then I tried the Patch you supplied, and still the result was the same unfortunately.
Is it by design that the entries are removed and readded every time the quest log is shown or a quest entry is pressed? Because I guess this is what I am seeing the "flicker" for. Also when running the default example, the first time i open the quest log the content is empty but is "refreshed or added" after a second or something.
Best Regards
/Peter
I just tried updating (edit: to ver. 1.5.6.1) through asset store, and the result was still the same when running the default "SF Example Scene" in a blank project. Then I tried the Patch you supplied, and still the result was the same unfortunately.
Is it by design that the entries are removed and readded every time the quest log is shown or a quest entry is pressed? Because I guess this is what I am seeing the "flicker" for. Also when running the default example, the first time i open the quest log the content is empty but is "refreshed or added" after a second or something.
Best Regards
/Peter
Re: Flicker
Hi Peter,
Ah, I understand now. Sorry, I hadn't caught on to what you were describing before.
Yes, the default implementation works exactly the way you described. You can change this behavior.
The abstract QuestLogWindow class has a virtual method "OnQuestListUpdated()". Whenever the player clicks on a new quest heading, abandons a quest, or switches between active and completed categories, it calls this method.
The Unity UI subclass (UnityUIQuestLogWindow) overrides the OnQuestListUpdated() method. It destroys the contents of the quest table and then reinstantiates whatever quest templates are necessary. I went with this simple "clear everything and start over" approach to try to make it foolproof for the whole gamut of customer needs. In your subclass, you could override it with a more sophisticated implementation that works better for your specific case.
When the quest log window opens, it calls the virtual method "OpenWindow(Action openedWindowHandler)". The parameter is a delegate to a method that runs after the window is open; by default, this method populates the quest table.
The Unity UI subclass overrides OpenWindow to play the "Show" animation and then call the openedWindowHandler after the animation is done. If you want to populate the quest table before showing the window, you can override this method, too:
Ah, I understand now. Sorry, I hadn't caught on to what you were describing before.
Yes, the default implementation works exactly the way you described. You can change this behavior.
The abstract QuestLogWindow class has a virtual method "OnQuestListUpdated()". Whenever the player clicks on a new quest heading, abandons a quest, or switches between active and completed categories, it calls this method.
The Unity UI subclass (UnityUIQuestLogWindow) overrides the OnQuestListUpdated() method. It destroys the contents of the quest table and then reinstantiates whatever quest templates are necessary. I went with this simple "clear everything and start over" approach to try to make it foolproof for the whole gamut of customer needs. In your subclass, you could override it with a more sophisticated implementation that works better for your specific case.
Code: Select all
public override void OnQuestListUpdated() {
// Instead of destroying the contents of questTable, maybe
// you want to check for differences and minimally
// adjust only what's necessary.
}
The Unity UI subclass overrides OpenWindow to play the "Show" animation and then call the openedWindowHandler after the animation is done. If you want to populate the quest table before showing the window, you can override this method, too:
Code: Select all
public override void OpenWindow(Action openedWindowHandler) {
OnQuestListUpdate();
base.OpenWindow(openedWindowHandler);
}
Re: Flicker
Hi Tony
Thanks for the reply again
I thought it might be by design but wanted to be sure before tampering with it since it seems to work differently in the older examples, where I could not reproduce this experience.
I will have a look at making it a bit more specific for the needs of my project. Thanks a lot for pointing in the right direction, will report back when I have had a look at it, or if I should need another pointer
Best Regards
/Peter
Thanks for the reply again
I thought it might be by design but wanted to be sure before tampering with it since it seems to work differently in the older examples, where I could not reproduce this experience.
I will have a look at making it a bit more specific for the needs of my project. Thanks a lot for pointing in the right direction, will report back when I have had a look at it, or if I should need another pointer
Best Regards
/Peter
Re: Flicker
Got it working, no more flickering for me thanks!