Scripting API
Scripting API
AbyssListAttribute
Class in Abyss.Core, from Abyss.Core.
Marks a plain-data struct as the item of a list component: an entity carrying it holds a list of them, as many as it needs, which grows and shrinks.
public sealed class AbyssListAttribute : AttributeRemarks
The list is the component. A component is plain data the engine copies as bytes — a spawn, a command buffer, a scene and Play's snapshot all do — so a list cannot be one of its fields: it would be shared by every copy. The engine keeps each entity's items itself instead, frees them as the component goes, and copies them where an entity is copied. Code reaches them through a DynamicList<T>, a view it cannot keep: in a system from its chunk (Chunk.GetLists), and elsewhere through World.ListOf.
The item is described as a component is, its fields shown in the Inspector as a list's elements and saved by a scene. For a short list of a size known in advance, a FixedList8<T> field in a component is plain data, and needs none of this.
[AbyssList]public partial struct Waypoint{ public Vector3 Position; public float Wait;}
ListType<Waypoint> path = Waypoint.Register(world);world.ListOf<Waypoint>(entity).Add(new Waypoint { Position = target });Properties
Name
public string? Name { get; set; }The name the engine knows the list by; defaults to the type's.
Page
public string? Page { get; set; }The page that documents the list, which the ? on its header in the editor's Inspector opens: a whole address, or a page of the Abyss Manual by its path there. See AbyssComponentAttribute.Page.
