add vr test camera, only create render texture if it doesn't exist yet

This commit is contained in:
2022-10-08 00:48:32 +02:00
parent dd13f1f928
commit 29b604d769
6 changed files with 134 additions and 15 deletions

View File

@@ -36,7 +36,7 @@ namespace Escape_Room_Engine.Portal
if (!playerCamera) throw new Exception("No camera initialised.");
// create render texture
_texture = new RenderTexture(Screen.width, Screen.height, 24, RenderTextureFormat.ARGB32);
if (!_texture) _texture = new RenderTexture(Screen.width, Screen.height, 24, RenderTextureFormat.ARGB32);
}
private void Start()