PDA

View Full Version : Object XML UI problems



AgentElrond
07-24-2018, 02:48 PM
The XML UI system is really nice, but I have a couple major problems which are practically showstoppers.


1. If you have an XML UI attached to an object via setXml(), and you update it with setXml(), it does not update until a player changes color (e.g. switching to spectator). Is there any workaround to force this update? Using setXml() on the global UI instantly updates.


2. If you have an XML UI attached to an object via setXml(), any player who joins the room after that object was created will not load in the texture assets required for the UI. Instead, they will see white rectangles. This is a big deal to me because it means:

2a. I can't ever reliably support specators, or

2b. I can't ever use the XML UI system attached to objects, or

2c. I have to delete and recreate the objects every single time a player joins the room, modifying the XML UI and/or creating a new XML UI for each player, meaning I could have 8 redundant UI copies so that all late joining players properly load the textures.


If there is anything I might be missing, please let me know. If any developer sees this and would like more details, an example JSON, or whatever, please let me know.

AgentElrond
07-24-2018, 03:13 PM
Followup:

I tried using the onload() method to call setXml() and set the object XML UI. I also made sure my global UI had both a <Button> and an <Image> using the Steam cloud URL for the texture in question.

When someone joined my room and sat down after loading, they could see the onscreen button and image with no problems -- the texture showed up for them there. However, the object XML still showed a white rectangle instead of the texture, even though it was in the global UI and their computer clearly loaded it.

Toxijuice
10-20-2018, 05:36 AM
I'm having very similar issues. Not calling setXml() from Lua, but am trying to use XML UI.
Upon loading, all custom UI is white boxes, except one will always be what appears to be a font atlas.

The only thing close to a workaround I have is if I:
1. Open the UI Assets menu
2. Delete one of the UI Assets I need to use
3. Save & Play (I check and load in the missing UI Assets via script)
4. Save & Play again.

This will display everything as it needs to be... Until I close the UI Assets window. Then everything turns into a black box this time.

When it's working the Custom UI Assets seem great, but unfortunately that seems quite rare at the moment.