3DTD/Assets/Scripts/Utilities/CanvasCameraSetter.cs

12 lines
238 B
C#
Raw Permalink Normal View History

2024-04-21 01:45:54 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CanvasCameraSetter : MonoBehaviour
{
private void Awake()
{
GetComponent<Canvas>().worldCamera = Camera.main;
}
}