forked from Unity-Technologies/com.unity.netcode.gameobjects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSceneMenuManager.cs
More file actions
29 lines (25 loc) · 813 Bytes
/
SceneMenuManager.cs
File metadata and controls
29 lines (25 loc) · 813 Bytes
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
using System.Collections.Generic;
/// <summary>
/// The scene menu manager that accepts only SceneReference types
/// </summary>
public class SceneMenuManager : MenuManager<SceneReference>
{
public static List<SceneMenuManager> SceneMenuManagers = new List<SceneMenuManager>();
public List<List<string>> GetAllSceneReferences()
{
var allSceneReferences = new List<List<string>>();
foreach (var keypair in m_SceneMenuReferencesByDisplayName)
{
allSceneReferences.Add(new List<string>(keypair.Value.GetReferencedScenes()));
}
return allSceneReferences;
}
protected override void OnAwake()
{
SceneMenuManagers.Add(this);
}
protected override void OnDestroyInvoked()
{
SceneMenuManagers.Remove(this);
}
}