37 lines
717 B
C#
37 lines
717 B
C#
using PhxhSDK;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Playables;
|
|
|
|
[DisallowMultipleComponent]
|
|
public class ShowTimelineController : MonoBehaviour
|
|
{
|
|
private Dictionary<int, GameObject> dic = new();
|
|
|
|
private void OnEnable()
|
|
{
|
|
foreach (GameObject go in dic.Values)
|
|
{
|
|
go.SetActive(true);
|
|
}
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
foreach (GameObject go in dic.Values)
|
|
{
|
|
go.SetActive(false);
|
|
}
|
|
}
|
|
|
|
public void Add(GameObject go)
|
|
{
|
|
dic[go.GetInstanceID()] = go;
|
|
}
|
|
|
|
public void Remove(GameObject go)
|
|
{
|
|
dic.Remove(go.GetInstanceID());
|
|
}
|
|
} |