using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NeonTea.Quakeball.Util {
    public class RenderTextureSetter : MonoBehaviour {
        public RenderTexture RenderTextureToCopy;
        public Camera Camera;
        public MeshRenderer Renderer;
        public int MaterialIndex;

        private void Awake() {
            RenderTexture RenderTexture = new RenderTexture(RenderTextureToCopy);
            Camera.targetTexture = RenderTexture;
            Renderer.materials[MaterialIndex].SetTexture("Texture2D_471BDC5", RenderTexture);
        }
    }
}
