MENU

Fun & Interesting

Create Powerful UI with UI Toolkit in Unity World Space

git-amend 10,245 2 months ago
Video Not Working? Fix It Now

World Space UI is a powerful way to display interactive elements in a 3D scene, and in this video, we explore how to create it using UI Toolkit in Unity. We demonstrate a practical implementation with a Damage Numbers spawner, building a reusable WorldSpaceUIDocument class that renders UI Toolkit elements onto a RenderTexture. This allows for floating UI elements that integrate seamlessly into world space. The system leverages Unity Object Pooling for efficient instantiation and performance, and we discuss key considerations like shader selection, panel scaling, and rendering optimizations. By the end, you'll have a solid understanding of how we can use UI Toolkit in world space. Vote for Unity to build full support for World Space UI here: https://portal.productboard.com/rcczqdfvurr8zuws3eth2ift/c/290-display-ui-in-world-space Want to support me? 😀 Buy me a coffee! https://ko-fi.com/adammyhre 🔔 Subscribe for more Unity Tutorials https://youtube.com/@git-amend Discord: https://discord.gg/FDRZGQBBUC #unity3d #gamedev #indiedev ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬ 0:00 WorldSpaceUIDocument 7:35 Damage Number Spawner 9:47 Enemy Class *Source code:* https://gist.github.com/adammyhre/a0f2d1bf0e3e24d6649a1839636d52d0 More Useful Code: https://github.com/adammyhre?tab=repositories Unity Utility Library: https://github.com/adammyhre/Unity-Utils Lock Inspector Hotkey: https://gist.github.com/adammyhre/4754f731a93bf1cab0d1385ccfa23642 Assets Shown In This Video (Affiliate Links) Dungeon Mason Tiny Hero Duo: (FREE): https://assetstore.unity.com/packages/3d/characters/humanoids/rpg-tiny-hero-duo-pbr-polyart-225148?aid=1101lw3sv MeshTint Burrow (FREE): https://assetstore.unity.com/packages/3d/characters/creatures/meshtint-free-burrow-cute-series-184837?aid=1101lw3sv Beautify - https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-3-advanced-post-processing-233073?aid=1101lw3sv Umbra Soft Shadows - https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/umbra-soft-shadows-better-directional-contact-shadows-for-urp-282485?aid=1101lw3sv Shader Control - https://assetstore.unity.com/packages/vfx/shaders/shader-control-74817?aid=1101lw3sv Wingman - https://assetstore.unity.com/packages/tools/utilities/wingman-your-inspector-s-best-friend-303181?aid=1101lw3sv Logwin - https://assetstore.unity.com/packages/tools/utilities/logwin-log-debug-values-tracker-149558?aid=1101lw3sv TimeScale Toolbar - https://assetstore.unity.com/packages/tools/utilities/timescale-toolbar-291564?aid=1101lw3sv Odin - https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041?aid=1101lw3sv Odin Validator - https://assetstore.unity.com/packages/tools/utilities/odin-validator-227861?aid=1101lw3sv Hot Reload: https://assetstore.unity.com/packages/tools/utilities/hot-reload-edit-code-without-compiling-254358?aid=1101lw3sv Hierarchy Icons: https://assetstore.unity.com/packages/tools/utilities/better-hierarchy-272963?aid=1101lw3sv Better Transform: https://assetstore.unity.com/packages/tools/utilities/better-transform-size-notes-global-local-workspace-child-parent--276554?aid=1101lw3sv Better Mesh Filter: https://assetstore.unity.com/packages/tools/utilities/better-mesh-filter-266489?aid=1101lw3sv Editor Console Pro: https://assetstore.unity.com/packages/tools/utilities/editor-console-pro-11889?aid=1101lw3sv Any Object Finder: https://assetstore.unity.com/packages/tools/utilities/any-object-finder-286455?aid=1101lw3sv Clipper PRO: https://assetstore.unity.com/packages/tools/utilities/clipper-pro-the-ultimate-clipboard-277112?aid=1101lw3sv *Follow me!* https://linktr.ee/gitamend

Comment