ExtendRealityLtd / VRTK

An example of how to use the Tilia packages to create great content with VRTK v4.
https://www.vrtk.io/
MIT License
3.69k stars 993 forks source link

CameraColorOverlay Black OnEnable #2112

Closed podgypig120 closed 3 years ago

podgypig120 commented 4 years ago

Environment

VRTK Tilia Repo

2020.1b

Oculus Rift S

Oculus Utilities/Integration

Steps to reproduce

When in Runtime, switching on any of the new movement prefabs in Tilia which call their own CameraColorOverlay causes the cameraColorOverlay to generate a new material which takes over the camera, making it black. This is an issue as I have a menu for the player to switch between Snap or Smooth rotate and Teleport or Vertical-smooth move.

The Teleporter and SnapRoate have their own CameraColourOverlay "Blink" children which causes this issue whenever they are enabled in the scene.

Expected behavior

When enabling SnapRotate or Teleporters Prefab or Vertical Blink (or any Tilia package with a Blink child), there is no affect on the camera view.

Current behavior

Tilia prefab for each movement is enabled, the camera goes fully black as the OnEnable generates a new material which overtakes the camera image. In default, this makes the camera go fully black with a new black material. A bool in the CameraColorOverlay inspector saying "generate new material on enable?" or similar would probably fix this problem.

thestonefox commented 4 years ago

I can't recreate.

I added a teleporter and the SnapRotate axis move to a scene, disabled the SnapRotate gameobject

started the scene then turned off the teleporter and then turned on the SnapRotate gameobject

I saw no fade.

podgypig120 commented 4 years ago

Strange! It happens consistently for me, its 100% the OnEnable create new material. Anyway, you can ignore it and I can just extend the base scripts and overwrite if I need to I suppose

thestonefox commented 4 years ago

you need to provide clear steps to reproduce it