

I am assuming that because even when the ghost container is in absolute mode it's still absolute in relation to it's parent element. By reparenting the ghost container to the top visual element it started working. This was because the x,y that we were setting the ghost container to was being sent relative to the inventory container, not the entire UI. In this case I had an inventory container inside a character sheet visual element as a direct child of it (I have not tested if this works when you are using a template), and as soon as I initiated the drag the ghost container would appear in a weird spot and not over the mouse. The two big gotchas that I had to struggle through might be worth adding to the tutorial?ġ) When inserting your inventory container into another visual element the ghost object needs to be reparented to the outer window. This was super helpful and really well laid out.


I've just put out a new tutorial that covers how to use UI Toolkit and the UI Builder when creating an in-game inventory system with drag/drop functionality.Ī great UI is one of the most important parts of any game.
