Set up a simple Play Mode test for LostCrypt.
Assets/Scripts
directory, and spend some time exploring the scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More infoAssets/Tests
.PlayModeTests
. You should end up with Assets/Tests/PlayModeTests
.SceneSetupTests.cs
.Scenes/Main.unity
look for GameObject FX - Day.
SceneSetupTests.cs
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using UnityEngine.SceneManagement;
public class SceneSetupTests
{
[UnityTest]
public IEnumerator MainScene_LoadsCorrectlyAndItsDaytime()
{
SceneManager.LoadScene("Assets/Scenes/Main.unity", LoadSceneMode.Single);
yield return null;
var fxDay = GameObject.Find("FX - Day");
Assert.IsTrue(fxDay != null, "should find the 'FX - Day' object in the scene");
}
}