mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-27 15:57:59 +01:00
25 lines
497 B
C#
25 lines
497 B
C#
using Fie.Manager;
|
|
using UnityEngine;
|
|
|
|
namespace Fie.UI
|
|
{
|
|
public class FieUICameraCapture : MonoBehaviour
|
|
{
|
|
private Canvas selfCanvas;
|
|
|
|
private bool isInitialized;
|
|
|
|
private void Start()
|
|
{
|
|
selfCanvas = base.gameObject.GetComponent<Canvas>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (!isInitialized && !(selfCanvas == null) && !(FieManagerBehaviour<FieGUIManager>.I.uiCamera == null))
|
|
{
|
|
selfCanvas.worldCamera = FieManagerBehaviour<FieGUIManager>.I.uiCamera.camera;
|
|
}
|
|
}
|
|
}
|
|
}
|