From f969bb1348178f048312bf301188e3d0914b75ca Mon Sep 17 00:00:00 2001 From: Harvey Buchan Date: Fri, 3 Oct 2014 15:25:02 +0100 Subject: [PATCH] Tested with Unity 4.5 and bug seems to be fixed. We're also using a Unity camera without Syphon, and the GUI.DrawTexture method renders on top of this camera in the Game window even with different camera depth settings. --- .../SyphonServerTextureCustomResolution.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonServerTextureCustomResolution.cs b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonServerTextureCustomResolution.cs index c0e7fdc..4dbb6a8 100644 --- a/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonServerTextureCustomResolution.cs +++ b/Syphon Implementations/Unity3D/Unity3D-3_5/SyphonUnityExample/Assets/Plugins/SyphonTexture-AdvancedUsers/SyphonServerTextureCustomResolution.cs @@ -117,8 +117,6 @@ void OnGUI () { } if(Event.current.type.Equals(EventType.Repaint)){ - //clear with a black background (GL.Clear adds weird artifacts if called here...dunno why, unity bug?) - GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), Syphon.NullTexture, ScaleMode.ScaleAndCrop, false, 0); //draw the scene rendertexture, but fit it to the window. if(drawScene) GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), customRenderTexture, ScaleMode.ScaleToFit, false, 0);