Added 3d pseduo canvas
This commit is contained in:
19
Assets/Scripts/ExternalCamera.cs
Normal file
19
Assets/Scripts/ExternalCamera.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InterfaceOff.WorldScene
|
||||
{
|
||||
public class ExternalCamera : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Camera ExternalCam;
|
||||
private RenderTexture RenderTexture;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
RenderTexture = new RenderTexture(width: 1920, height: 1080, depth: 16);
|
||||
ExternalCam.targetTexture = RenderTexture;
|
||||
}
|
||||
|
||||
public Texture GetTexture() => RenderTexture;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user