mirror of
https://github.com/evgen-app/steampunk-quest.git
synced 2025-02-07 18:00:32 +03:00
17 lines
500 B
C#
17 lines
500 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AboutQuestClickHandle : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Canvas _overlayLayout;
|
|
public void handleClick() {
|
|
Camera mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();
|
|
Canvas a = Instantiate(_overlayLayout, Vector3.zero, Quaternion.identity).GetComponent<Canvas>();
|
|
a.renderMode = RenderMode.ScreenSpaceCamera;
|
|
a.worldCamera = mainCamera;
|
|
}
|
|
|
|
}
|