Vixen
02b45cc4
csharp
public sealed class SceneFile

A scene file.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The authoring format — what Assets/**/*.vxscene holds and what a person diffs. The runtime does not read this: a content build compiles it, which is why nothing here is shaped for fast loading and everything is shaped for being read by a human and merged by git.

The version is written and is read. A format with no version is one that cannot be changed without guessing what it is looking at, and the cheapest moment to add the field is before the first file exists. Current is what a writer stamps; a reader that meets a higher one says so rather than binding half of it.

It lives here rather than beside the viewport because two things read it: the panel that edits a scene, and the importer that compiles one into the asset a player loads. Neither should have to reference the other, and a second binding of one format is a second thing to keep in step — which is how a file comes to mean one thing when it is saved and another when it is built.

Fields and properties (6)

  • public const int Current

    The version this reader and writer speak.

  • public const string Extension

    What a scene is written as.

  • public const string PrefabExtension

    What a prefab is written as — the same format, with one root.

  • public int Version

    Which version of the format this file is.

  • public string Name

    What the scene is called.

  • public List<SceneEntityData> Roots

    The entities with no parent, in order, each carrying its own subtree.

Methods (3)

  • public static SceneFile FromYaml(string yaml)

    Reads YAML into a file.

  • public string ToYaml()

    Writes it as YAML.

  • public IEnumerable<SceneEntityData> All()

    Every entity in the file, roots first and then depth-first under each.

Used by (15)

  • BlockoutBooleanTestsVixen.Editor.Blockout.Tests
  • BlockoutCreateTestsVixen.Editor.Blockout.Tests
  • BlockoutSurfaceTestsVixen.Editor.Blockout.Tests
  • CompiledSceneViewVixen.Editor.AssetEditors
  • EditMeshSceneTestsVixen.Editor.SceneView.Tests
  • LightTestsVixen.Editor.SceneView.Tests
  • PrefabVixen.Editor.AssetEditors
  • PrefabInstanceTestsVixen.Editor.AssetEditors.Tests
  • PrimitiveShapeTestsVixen.Editor.SceneView.Tests
  • SceneCompilerVixen.Editor.Assets
  • SceneEditorFactoryVixen.Editor.AssetEditors
  • SceneImporterVixen.Editor.Assets
  • SceneRenderComponentTestsVixen.Editor.Assets.Tests
  • SceneSerializerVixen.Editor.SceneView
  • TypeRegistrationVixen.Editor.Core