浏览代码

Merge pull request #16 from Wilfrid-Unity/srp-api-changes

Update SRP API
/main
GitHub 6 年前
当前提交
c932b398
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Packages/com.verasl.water-system/Scripts/Rendering/PlanerReflections.cs

4
Packages/com.verasl.water-system/Scripts/Rendering/PlanerReflections.cs


GameObject go =
new GameObject("Planar Refl Camera id" + GetInstanceID() + " for " + currentCamera.GetInstanceID(),
typeof(Camera), typeof(Skybox));
AdditionalCameraData lwrpCamData =
go.AddComponent(typeof(AdditionalCameraData)) as AdditionalCameraData;
LWRPAdditionalCameraData lwrpCamData =
go.AddComponent(typeof(LWRPAdditionalCameraData)) as LWRPAdditionalCameraData;
lwrpCamData.renderShadows = false; // turn off shadows for the reflection camera
var reflectionCamera = go.GetComponent<Camera>();
reflectionCamera.transform.SetPositionAndRotation(transform.position, transform.rotation);

正在加载...
取消
保存