This asset is part of the UI Toolkit Bundle.
Render 3D world objects or prefabs in your UI.
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.
Supports Unity 2021.3+, 2022, 2023, Unity 6, ... LTS
It may work with earlier versions too but those are not tested anymore.
Things you should know (Read this before you buy):
There is an intro section in the manual. Please read it first.
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.
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).
此资产是UI工具包捆绑包的一部分。
在UI中渲染3D世界对象或预制件。
此资源用于新的UI TOOLKIT,而不是默认的uGUI。如果你想在uGUI中使用它,那么请查看uGUI资产。
用例
您想在库存UI中显示您的3D项目吗?
将预制实例化器添加到WorldObjectRenderer中,就完成了。
想要一个NPC的3D肖像吗?
只需将NPC的变换拖动到世界对象列表中即可。
你需要一张自上而下的小地图吗?
清空世界对象列表,然后使用“相机注视”和“相机位置”让相机在天空中俯视。
兼容内置、URP和HDRP
在所有渲染管道中的工作方式几乎相同。
大量示例和文档
查看Kamgam/UIToolkitWorldImage/示例。
完整源代码
我用完整的源代码发布这个资产,因为作为一名开发人员,我知道没有源代码访问权限是多么烦人。如果你喜欢它,请提醒其他人购买该插件。不要到处复制粘贴。
支持Unity 2021.3+、2022、2023、Unity 6、。..结果
它可能也适用于早期版本,但这些版本不再经过测试。
您应该知道的事情(购买前请阅读此内容):
手册中有一个介绍部分。请先阅读。
此资源用于新的UI TOOLKIT,而不是默认的uGUI。如果你想在uGUI中使用它,那么请查看uGUI资产。
透明对象可以开箱即用,但有一些注意事项。请查看手册中的“透明度”部分以了解更多详细信息。
使用
1) 在场景中创建WorldObjectRenderer并为其指定ID。
2) 从UI生成器库中拖动WorldImage元素
3) 输入渲染器ID
4) 完成
提示1:
禁用“使用渲染纹理”以使用相机堆叠而不是渲染纹理。
提示2:
使用预制实例化器按需实例化和销毁预制件。
提示3:
Multipe图像可以显示相同的渲染器(只需将它们全部设置为相同的渲染程序ID)。
|
|