Skip to content

SceneInfo struct ​

Namespace Lustral · Assembly Lustral.Api

A Unity scene, represented without Unity types so that it is identical on every backend.

csharp
public readonly struct SceneInfo : IEquatable<SceneInfo>

Constructors ​

SceneInfo(string, int) ​

csharp
public SceneInfo(string name, int buildIndex)

Initializes a scene description.

Properties ​

BuildIndex ​

csharp
public int BuildIndex { get; }

The scene's index in the game's build settings, or -1 for scenes loaded from asset bundles.

Name ​

csharp
public string Name { get; }

The scene's name, as listed in the game's build settings.

Methods ​

Equals(SceneInfo) ​

csharp
public bool Equals(SceneInfo other);

Returns whether both scenes have the same name and build index.

Equals(object) ​

csharp
public override bool Equals(object? obj);

Whether the other value is equal to this one.

GetHashCode() ​

csharp
public override int GetHashCode();

A hash code for this value.

ToString() ​

csharp
public override string ToString();

Returns Name (#BuildIndex).

Operators ​

operator == ​

csharp
public static bool operator ==(SceneInfo left, SceneInfo right)

Returns whether both scenes have the same name and build index.

operator != ​

csharp
public static bool operator !=(SceneInfo left, SceneInfo right)

Returns whether the scenes differ in name or build index.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.