Scripting API

Scripting API

ChildrenView

Struct in Abyss.Core, from Abyss.Core.

The entities under one entity, in the order the hierarchy lists them: a view of Bevy's Children where Bevy keeps it, which a system is given a row at a time.

public readonly ref struct ChildrenView

Remarks

Read, never written: children change as each child's parent does, through CommandBuffer.SetParent and CommandBuffer.ClearParent, which keep the hierarchy whole. Good while the system that was given it runs, as a chunk's spans are; a ref struct, so it cannot be kept longer.

Properties

Count

public int Count { get; }

How many children there are.

Indexers

this[]

public ulong this[int index] { get; }

The child at index, first first.

Parameters

  • index

Exceptions

  • IndexOutOfRangeException: There is no child there.

Methods

AsSpan

public ReadOnlySpan<ulong> AsSpan()

The children as a span.

GetEnumerator

public ReadOnlySpan<ulong>.Enumerator GetEnumerator()

Walks the children, first first: foreach (ulong child in children).