Vixen
dd8b0a81
csharp
public readonly record struct BehaviorPopulation

How many instances of one behaviour type a BehaviorStore is holding.

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

Remarks

Deliberately not carrying the [DataContract] alias, though a report wants one: a behaviour with no alias is not registered at all and there would be nothing to put in the field, and asking SceneBehaviorRegistry per row would make a count depend on a registry that has nothing to do with counting. Whoever prints this resolves the name it wants to show.

Fields and properties (3)

  • public Type BehaviorType

    The concrete type the bucket is keyed by — the static type at the Add<T> call site, which is not always the runtime type. See Behavior.BucketKey.

  • public int Total

    How many there are, enabled or not.

  • public int Enabled

    How many are in the bucket's enabled prefix, which is what the update loop walks. ⚠ That is a property of the *loop* rather than of the authoring: a behaviour attached since the last lifecycle drain has not been activated yet and counts as disabled here while Enabled on it says otherwise.

Methods (1)

  • public BehaviorPopulation(Type BehaviorType, int Total, int Enabled)

    How many instances of one behaviour type a BehaviorStore is holding.

Used by (3)

  • BehaviorStoreVixen.Engine
  • BehaviorTestsVixen.Engine.Tests
  • EditorApplicationVixen.Editor.App