Hello Everyone.
I was busy Creating an editor script when I got a seemingly unrelated error message:
“pptr cast failed when dereferencing
Casting from DefaultAsset to Shader!”.
Since this error message the game view is completely blanked out with a default blue color making it impossible to test the game.
- I removed the script that I was working on when the error occurred but nothing changed.
- I have a camera in the scene that is rendering to the default render texture. It’s preview shows all the game objects as expected.
- I have set the camera’s background to white but the game view still stays the default blue.
- The camera’s culling mask is set to “Everything”.
- The camera’s tag is “MainCamera”.
- I have restarted Unity and the computer multiple times.
This error seems to be a known issue with Unity but I cant find any reports of it affecting the editor. The error may just be a coincidence but that seems unlikely.
How can I fix the game view? Am I missing something obvious?
Any help would be greatly appreciated. ![]()
Thanks - Ross