Class Scene
The scene root object that contains a hierarchy of actors.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class Scene : Actor, ISerializable
Constructors
Scene()
Fields
AssetTypename
The scene asset typename. Type of the serialized scene asset data. Hidden class for the scene assets. Actors deserialization rules are strictly controlled under the hood by the C++ core parts. Mostly because scene asset has the same ID as scene root actor so loading both managed objects for scene asset and scene will crash (due to object ids conflict).
Declaration
public const string AssetTypename = "FlaxEngine.SceneAsset"
Field Value
|
System.String
|
EditorPickerTypename
The scene asset typename used by the Editor asset picker control. Use it for asset reference picker filter.
Declaration
public const string EditorPickerTypename = "FlaxEditor.Content.SceneItem"
Field Value
|
System.String
|
Properties
DataFolderPath
Gets path to the scene data folder
Declaration
[Unmanaged]
public string DataFolderPath { get; }
Property Value
|
System.String
|
Filename
Gets filename of the scene file
Declaration
[Unmanaged]
public string Filename { get; }
Property Value
|
System.String
|
LightmapSettings
Gets or sets the lightmap settings (per scene).
Declaration
[EditorDisplay("Lightmap Settings", "__inline__")]
[Unmanaged]
public LightmapSettings LightmapSettings { get; set; }
Property Value
|
LightmapSettings
|
Path
Gets path to the scene file
Declaration
[Unmanaged]
public string Path { get; }
Property Value
|
System.String
|
Methods
BuildCSG(Single)
Builds the CSG geometry for the given scene.
Declaration
[Unmanaged]
public void BuildCSG(float timeoutMs = 50F)
Parameters
|
System.Single
timeoutMs
The timeout to wait before building CSG (in milliseconds). |
Remarks
Requests are enqueued till the next game scripts update.
ClearLightmaps()
Removes all baked lightmap textures from the scene.
Declaration
[Unmanaged]
public void ClearLightmaps()
GetAssetReferences()
Gets the asset references (scene asset). Supported only in Editor.
Declaration
[Unmanaged]
public Guid[] GetAssetReferences()
Returns
|
System.Guid[]
The collection of the asset ids referenced by this asset. |