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

public class SetCameraCanvas : MonoBehaviour
{
    Canvas canvas;

    void Start()
    {
        canvas = GetComponent<Canvas>();

        canvas.worldCamera = Camera.main;
    }

    private void Update()
    {
        if (canvas.worldCamera == null) canvas = GetComponent<Canvas>();
    }
}
