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

12 lines
238 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CanvasCameraSetter : MonoBehaviour
{
private void Awake()
{
GetComponent<Canvas>().worldCamera = Camera.main;
}
}