Scene.FromFile

FromFile(string, FileFormat, CancellationToken)

Opens the scene from given path using specified file format.

public static Scene FromFile(string fileName, FileFormat format, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
fileNameStringFile name.
formatFileFormatFile format.
cancellationTokenCancellationTokenCancellation token to the load task

Examples

The following code shows how to create a scene from a file

var cts = new CancellationTokenSource();
Scene scene = Scene.FromFile("input.fbx", FileFormat.FBX7400ASCII, cts.Token);

See Also


FromFile(string, LoadOptions, CancellationToken)

Opens the scene from given path using specified file format.

public static Scene FromFile(string fileName, LoadOptions options, 
    CancellationToken cancellationToken = default)
ParameterTypeDescription
fileNameStringFile name.
optionsLoadOptionsMore detailed configuration to open the stream.
cancellationTokenCancellationTokenCancellation token to the load task

Examples

The following code shows how to create a scene from a file

var cts = new CancellationTokenSource();
var opt = new FbxLoadOptions();
opt.LookupPaths.Add("textures");
Scene scene = Scene.FromFile("input.fbx", opt, cts.Token);

See Also


FromFile(string)

Opens the scene from given path

public static Scene FromFile(string fileName)
ParameterTypeDescription
fileNameStringFile name.

Examples

The following code shows how to create a scene from a file

Scene scene = Scene.FromFile("input.fbx");

See Also


FromFile(string, CancellationToken)

Opens the scene from given path

public static Scene FromFile(string fileName, CancellationToken cancellationToken)
ParameterTypeDescription
fileNameStringFile name.
cancellationTokenCancellationTokenCancellation token to the load task

Examples

The following code shows how to create a scene from a file

var cts = new CancellationTokenSource();
Scene scene = Scene.FromFile("input.fbx", cts.Token);

See Also