19 lines
477 B
C#
19 lines
477 B
C#
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;
|
|
}
|
|
} |