BITFALL/Assets/Artists/Scripts/HotFix/WorldCanvasCameraService.cs

22 lines
336 B
C#
Raw Normal View History

2024-03-29 00:58:24 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITFALL.HotFix
{
public class WorldCanvasCameraService : MonoBehaviour
{
[SerializeField] private Canvas canvas;
private void Update()
{
if (!canvas.worldCamera)
{
canvas.worldCamera = Camera.main;
}
}
}
}