Vixen
dd8b0a81
csharp
public record class ImportDiagnostic

Something an importer said about an asset.

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

Remarks

Carried out of the import rather than logged from inside it, so that the editor can show it against the asset in the inspector, the CLI can print it, and a build can fail on it — three consumers that a call to a logger inside the importer would have served none of.

⚠ Path is what turns a build-plan message into an entry an IDE can open, and it is last and defaulted because an importer never has to supply one: an importer is already running on an asset, and ImportExecutor knows which. What did not know was BuildPlanner, which walks every asset in the project and used to name the one it was talking about only inside the sentence — so vixen --format msbuild emitted its errors with no file, MSBuild attributed them to the project, and the IDE's jump-to-file went nowhere. The sentence still names the asset, because a person reading a log has no error list to click.

⚠ Empty is a real answer and not a missing one. "Some assets name no group", "this is a server build and nothing is marked includeInServerBuild: false", and the collision in which several assets claim one address are all statements about the project rather than about a file — and the last of those deliberately keeps its path empty even though it holds several, because naming one of them would be deciding the very question the message says cannot be decided.

Fields and properties (3)

  • public ImportSeverity Severity

    How much attention it needs.

  • public string Message

    What it says, in a sentence a person can act on.

  • public string Path

    Which asset it is about, project-relative, or empty when it is about the project as a whole.

Methods (1)

  • public ImportDiagnostic(ImportSeverity Severity, string Message, string Path = "")

    Something an importer said about an asset.

Used by (46, showing 40)

  • AuthoredContentMmo.Content.Tests
  • AddressableGroupsViewVixen.Editor.AssetEditors
  • AnimationClipImporterTestsVixen.Editor.Assets.Tests
  • AudioImporterTestsVixen.Editor.Assets.Tests
  • BuildPlanVixen.Editor.Assets
  • BuildPlannerVixen.Editor.Assets
  • BuildPlannerTestsVixen.Editor.Assets.Tests
  • ClipMetadataTestsVixen.Editor.Assets.Tests
  • CompilerPoolVixen.AssetCompiler
  • CompilerPoolTestsVixen.AssetCompiler.Tests
  • ConstraintAuthoringImporterTestsVixen.Editor.Assets.Tests
  • ContentBuildResultVixen.Editor.Assets
  • ContentBuilderVixen.Editor.Assets
  • ContentBuilderTestsVixen.Editor.Assets.Tests
  • ContentPipelineVixen.Editor.Assets
  • CreateMenuTestsVixen.Editor.App.Tests
  • DdsImportTestsVixen.Editor.Assets.Tests
  • DefinitionImporterTestsVixen.Editor.Assets.Tests
  • ExecutedImportVixen.Editor.Assets
  • HarnessPlanImporterTestsVixen.Editor.Assets.Tests
  • HdrImportTestsVixen.Editor.Assets.Tests
  • ImportContextVixen.Editor.Assets
  • ImportOutcomeVixen.Editor.Assets
  • ImportResolveTestsVixen.Editor.Assets.Tests
  • ImportResultVixen.Editor.Assets
  • ImporterTestsVixen.Editor.Assets.Tests
  • ImporterUnknownKeyTestsVixen.Editor.Assets.Tests
  • LooseContentVixen.Editor.Assets
  • MaterialImporterTestsVixen.Editor.Assets.Tests
  • MixerImporterTestsVixen.Editor.Assets.Tests
  • ModelImporterTestsVixen.Editor.Assets.Tests
  • ModelRetopologyTestsVixen.Editor.Assets.Tests
  • MoveSetImporterTestsVixen.Editor.Assets.Tests
  • NativeFormatImporterTestsVixen.Editor.Assets.Tests
  • NavMeshImporterTestsVixen.Editor.Assets.Tests
  • NetworkRulesImporterTestsVixen.Editor.Assets.Tests
  • PluginImporterTestsVixen.AssetCompiler.Tests
  • ProxyShapeImporterTestsVixen.Editor.Assets.Tests
  • SceneImporterTestsVixen.Editor.Assets.Tests
  • TerrainAssetImporterTestsVixen.Editor.Assets.Tests