Skip to content

Commit b139518

Browse files
Added more Test scenes and helpers
1 parent 532bc24 commit b139518

15 files changed

+2827
-171
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Converter/__pycache__/
44
Converter/.venv/
55
Converter/Sequence_Converter_UI.spec
66

7-
GSS_UnityStore
7+
GSS_UnityStore
8+
Unity_Test_Project/Assets/TextMesh Pro/
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.SceneManagement;
5+
6+
public class Scripts : MonoBehaviour
7+
{
8+
public List<string> sceneNames = new List<string>();
9+
10+
public float switchintervallSeconds = 10;
11+
float lastSwitchTimeSeconds = 0;
12+
int sceneIndex;
13+
14+
// Start is called before the first frame update
15+
void Start()
16+
{
17+
DontDestroyOnLoad(gameObject);
18+
lastSwitchTimeSeconds = Time.time;
19+
}
20+
21+
// Update is called once per frame
22+
void Update()
23+
{
24+
if(sceneNames.Count > 1)
25+
{
26+
if(Time.time - lastSwitchTimeSeconds > switchintervallSeconds)
27+
{
28+
lastSwitchTimeSeconds = Time.time;
29+
sceneIndex++;
30+
31+
if (sceneIndex >= sceneNames.Count)
32+
sceneIndex = 0;
33+
34+
SceneManager.LoadScene(sceneNames[sceneIndex]);
35+
}
36+
}
37+
}
38+
}

Unity_Test_Project/Assets/AutoSceneLoader.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)