HeavenStudioPlus/Assets/Scripts/LevelEditor/Editor.cs

41 lines
1 KiB
C#
Raw Normal View History

2022-01-03 22:42:43 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace RhythmHeavenMania.Editor
{
public class Editor : MonoBehaviour
{
private Initializer Initializer;
2022-01-06 00:11:33 +00:00
[SerializeField] private Canvas MainCanvas;
2022-01-03 22:42:43 +00:00
[Header("Rect")]
[SerializeField] private RenderTexture ScreenRenderTexture;
[SerializeField] private RawImage Screen;
2022-01-06 00:11:33 +00:00
[Header("Components")]
[SerializeField] private Timeline Timeline;
2022-01-03 22:42:43 +00:00
private void Start()
{
Initializer = GetComponent<Initializer>();
2022-01-06 00:11:33 +00:00
MainCanvas.gameObject.SetActive(false);
print("d");
}
public void Init()
{
2022-01-03 22:42:43 +00:00
GameManager.instance.GameCamera.targetTexture = ScreenRenderTexture;
GameManager.instance.CursorCam.targetTexture = ScreenRenderTexture;
Screen.texture = ScreenRenderTexture;
2022-01-06 00:11:33 +00:00
MainCanvas.gameObject.SetActive(true);
Timeline.Init();
2022-01-03 22:42:43 +00:00
}
}
}