using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; [ExecuteInEditMode] public class CubemapRender : MonoBehaviour { public RenderTexture cubeMap; int faceMask = 63; Camera cam; void Start() { cam = GetComponent(); } void Update() { if (cubeMap != null) { // Render the scene to the cubemap cam.RenderToCubemap(cubeMap, faceMask); } } }