Vixen
dd8b0a81
csharp
public sealed class ProvidesAttribute

Says a contribution puts a service into the session, so others can be sorted after it.

Read the guide page for this →

As a annotation

Valid on
Class, repeatable

Remarks

The declaration that was a comment. EditorApplication registers PlayPhysics before any module activates, and the reason is written above the call: "which is also what lets the terrain module's collider contribution find the scene this one provides". That is a real dependency held together by the sequence of two registrations in two assemblies — and EditorModules.Standard's own comment says its order is *not* about a dependency, which is true of the list and not of the frame.

⚠ The service, not the contribution, and that is the point rather than a shortcut. PlayTerrainColliders lives in Vixen.Editor.Terrain.Physics and PlayPhysics in Vixen.Editor.App, which is above it — so a [RunsAfter(typeof(PlayPhysics))] could not be written at all without a reference that would invert the layering. Both already name PhysicsScene, because that is what one hands over and the other asks for.

⚠ And it is checked rather than believed. A contribution that declares this and does not call Provide``1 is named in PlayModeController.Ordering — the session is asked, after the contribution has attached, whether the service is actually there. A declaration nothing verifies is the one that goes stale and reorders a frame for a service that stopped existing.

Fields and properties (1)

  • public Type Service

    The service type.

Methods (1)

  • public ProvidesAttribute(Type service)

    Says a contribution puts a service into the session, so others can be sorted after it.

Used by (6)

  • DeclaredProviderVixen.Editor.SceneView.Tests
  • LyingProviderVixen.Editor.SceneView.Tests
  • PlayDiagnosticsVixen.Editor.App
  • PlayPhysicsVixen.Editor.App
  • PlaySystemOrderVixen.Editor.SceneView
  • SpawningProviderVixen.Editor.SceneView.Tests