Skip to content

youli42/Portals-URP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

116 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portals

SebLague/Portals 项目的升级,使其再 URP 中可以正常显示和使用

核心部分代码在 PortalCore 文件夹中,理论上可以直接迁移使用

请一定去观看原作者的视频,这是很棒的教程

测试中,使用安装 Blender4.3 的设备无法启动项目,进度会卡在加载 Blander 模型。但 Blender4.4 可以。

使用方法

传送门

创建一个空组件作为传送门时,他有一些必要配置,以确保传送门可以正常运行:

添加组件:

  1. Portal 脚本:获取传送门渲染能力,指定链接对象传送门显示区域
  2. Box Collider:【传送物体】或者其他碰撞体:勾选 是触发体,以正常传送物体。
  3. Rigidbody:取消重力

代码使用碰撞进行传送前检测

添加子对象:

  1. 摄像机对象:直接添加即可,会自动使用。
  2. 立方体模型:用作屏幕,需要使用 Portal 材质(作为示例,可以直接使用 M_PortalScreen

原始 Readme

Little test of portals in Unity.

Note: in the two worlds scene, you'll need to have Blender installed to view some of the models.

在Unity中对传送门进行的小型测试。

注:在双世界场景中,你需要安装Blender才能查看部分模型。

Watch video

Portals

About

Portals in Unity 6,URP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 71.1%
  • ShaderLab 28.9%