SetRenderTexture() public method

public SetRenderTexture ( RenderTexture renderTexture ) : void
renderTexture UnityEngine.RenderTexture
return void
        private void DrawCreateRenderTextureButton(PixelCamera2D pixelCamera2D)
        {
            if (GUILayout.Button("Create RenderTexture Asset"))
            {
                RenderTexture renderTexture = CreateNewRenderTexture(pixelCamera2D.BaseWidth, pixelCamera2D.BaseHeight);

                SaveNewRenderTexture(renderTexture, DeterminePath());

                pixelCamera2D.SetRenderTexture(renderTexture);
            }
        }
Example #2
0
        private void DrawCreateRenderTextureButton(PixelCamera2D pixelCamera2D)
        {
            if (GUILayout.Button("Create RenderTexture Asset"))
            {
                RenderTexture renderTexture = CreateNewRenderTexture(pixelCamera2D.BaseWidth, pixelCamera2D.BaseHeight);

                SaveNewRenderTexture(renderTexture, DeterminePath());

                pixelCamera2D.SetRenderTexture(renderTexture);
            }
        }