You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
I want clear UI (not effected by post-process FX). So I folowed HeroCrab's tutorial here: https://github.com/herocrab/StrideCleanUI. At the same time a need to generate entities with UIComponent and UIPage at runtime using code. So this was my attemp:
When it was called inside Start() method or in first run of Update() method, it works. But when it is called in Update() method later in the lifetime of the script, UI doesn't render. Then @tebjan said on Discord:
You can't change render groups after the game has started running. You need to set them before the start.
And also based on @tebjan and other suggestions I tried to create UIComponent with 'new' statement (insted of GetOrCreate), set all paprameters, add it to entity only afterwards and add entity to scene tree at last. But that didn't work either.
Discord user SolarChrome suggested working workaround by changing GraphicsCompositor:
I've played around with that HeroCrab and saw the same issue. I suspect there's some bug in UIRenderFeature where it's not detecting new entities on the second render stage.
Anyway, this version works with new entities (see the bottom two screenshots), which is simpler: https://github.com/Basewq/XenkoProofOfConcepts/tree/master/GameScreenManagerExample
Basically the difference from HeroCrab's solution is there's no new render stage, ie:
Reset UIRenderFeature (ie. only 1 SimpleGroupToRenderStageSelector), have all RenderGroups ticked
In the second Camera Renderer where the SingleStageRenderer had UiStage, change to Transparent
Remove UiStage render stage
You don't need another camera.
The text was updated successfully, but these errors were encountered:
Release Type: Official Release
Version: 4.1.0.1948
Platform(s): Windows
Describe the bug
When adding new UIComponent using code only (at runtime) with specific RenderGroup, UI doesn't render.
Expected behavior
Visible UI.
Log and callstacks
Not working RenderCompositor:
GraphicsCompositor.txt
Additional context
I want clear UI (not effected by post-process FX). So I folowed HeroCrab's tutorial here: https://github.com/herocrab/StrideCleanUI. At the same time a need to generate entities with UIComponent and UIPage at runtime using code. So this was my attemp:
When it was called inside Start() method or in first run of Update() method, it works. But when it is called in Update() method later in the lifetime of the script, UI doesn't render. Then @tebjan said on Discord:
And also based on @tebjan and other suggestions I tried to create UIComponent with 'new' statement (insted of GetOrCreate), set all paprameters, add it to entity only afterwards and add entity to scene tree at last. But that didn't work either.
Discord user SolarChrome suggested working workaround by changing GraphicsCompositor:
The text was updated successfully, but these errors were encountered: