mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:47:39 +02:00
Initialize game with one script
This commit is contained in:
26
Assets/Scripts/LevelEditor/Editor.cs
Normal file
26
Assets/Scripts/LevelEditor/Editor.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
public class Editor : MonoBehaviour
|
||||
{
|
||||
private Initializer Initializer;
|
||||
|
||||
[Header("Rect")]
|
||||
[SerializeField] private RenderTexture ScreenRenderTexture;
|
||||
[SerializeField] private RawImage Screen;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Initializer = GetComponent<Initializer>();
|
||||
|
||||
GameManager.instance.GameCamera.targetTexture = ScreenRenderTexture;
|
||||
GameManager.instance.CursorCam.targetTexture = ScreenRenderTexture;
|
||||
Screen.texture = ScreenRenderTexture;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user