-
Notifications
You must be signed in to change notification settings - Fork 419
/
VidHelper.cs
41 lines (36 loc) · 813 Bytes
/
VidHelper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DLS.ChipCreation;
using UnityEngine.InputSystem;
namespace DLS.VideoTools
{
[DefaultExecutionOrder(1000)]
public class VidHelper : MonoBehaviour
{
public bool expandWorkArea;
public bool showGrid;
[Header("References")]
public RectTransform grid;
ChipEditor editor;
ProjectManager manager;
void Start()
{
manager = FindObjectOfType<ProjectManager>();
editor = manager.ActiveEditChipEditor;
manager.ViewedChipChanged += NewEditor;
NewEditor(manager.ActiveViewChipEditor);
}
void Update()
{
grid.gameObject.SetActive(showGrid);
}
void NewEditor(ChipEditor viewedEditor)
{
if (expandWorkArea)
{
manager.ActiveViewChipEditor.WorkArea.VidHelper_ExpandView();
}
}
}
}