Show 3D objects in your UI. Ideal for inventories, NPC portraits or Mini-maps.
⚠️ This asset is for the new UI TOOLKIT, not the default uGUI. If you want to use it in uGUI then please check out the uGUI asset instead.
Use Cases
You want to show your 3D items in an inventory UI?
Add the PrefabInstantiator to the WorldObjectRenderer and you are done.
Want to have a 3D portrait of an NPC?
Simply drag in the transform of the NPC into the list of world objects.
You need a top-down mini-map of the level?
Empty the list of world objects and then use “Camera Look At” and “Camera position” to have the camera high up in the sky looking down.
Compatible with Built-In, URP and HDRP
Works the almost* the same in all render pipelines.
Lots of examples & documentation
Check out Kamgam/UIToolkitWorldImage/Examples.
✔️ Full Source Code
I publish this asset with full source code because as a developer I know how annoying it is to not have source code access. If you like it then please remind others to purchase the plugin. Don’t just copy and paste it everywhere. Thank you ❤️
✔️ Supports Unity 2021.3+, 2022, 2023, Unity 6, … LTS
It may work with earlier versions too but those are not tested anymore.
⚠️ Transparent objects work right out of the box but there are some caveats. Please check the “Transparency” section in the manual for more details.
✍️ Usage
1) Create a WorldObjectRenderer in the scene and give it an ID.
2) Drag in the WorldImage element from the UI Builder Library
3) Enter the renderer ID
4) Done
HINT 1:
Disable “Use Render Textures” to use camera stacking instead of render textures.
HINT 2:
Use the PrefabInstantiator to instantiate and destroy prefabs on demand.
HINT 3:
Multipe image can display the same renderer (simpy set them all to the same Renderer ID).