namespace Sandbox;
public class SceneLoadOptions
{
SceneFile scene;
///
/// Internal property to mark this scene as being a system scene. It should only be set in
/// .
///
internal bool IsSystemScene { get; set; }
public bool ShowLoadingScreen { get; set; } = true;
public bool IsAdditive { get; set; } = false;
///
/// If true, on load we'll even delete objects that are marked as DontDelete
///
public bool DeleteEverything { get; set; } = false;
public Transform Offset { get; set; } = Transform.Zero;
public SceneFile GetSceneFile() => scene;
public bool SetScene( SceneFile sceneFile )
{
scene = sceneFile;
return true;
}
public bool SetScene( string sceneFileName )
{
var file = ResourceLibrary.Get( sceneFileName );
if ( file is null )
{
Log.Warning( $"LoadFromFile: Couldn't find {sceneFileName}" );
return false;
}
SetScene( file );
return true;
}
}