Files
adriadri6972 d3d9c5f833 upload project
2025-07-31 15:21:08 +02:00

27 lines
798 B
C#

#if UNITY_EDITOR
using UnityEditor;
namespace UnityEngine.XR.Simulation.Tests
{
/// <summary>
/// This scene manager is used for testing purposes and allows for the
/// overriding of the SimulationSceneManager's method for retrieving
/// the simulation environment prefab to use.
/// </summary>
class SimulationTestSceneManager : SimulationSceneManager
{
private string environmentPrefabPath { set; get; }
internal SimulationTestSceneManager(string environmentPrefabPath)
{
this.environmentPrefabPath = environmentPrefabPath;
}
protected override GameObject GetOrCreateEnvironmentPrefab()
{
return PrefabUtility.LoadPrefabContents(environmentPrefabPath);
}
}
}
#endif //UNITY_EDITOR