Game.EditorAssetCategoryOverrideData
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
An empty/tag component used to mark prefab assets in the editor whose category should be overridden. The struct is explicitly laid out with Size = 1 to ensure a stable, minimal native representation (blittable). It implements IComponentData so it can be attached to Entities and IQueryTypeParameter so it can be used in query type parameter contexts.
Fields
This type has no instance fields
This struct is intentionally empty; it acts as a marker/tag component. The [StructLayout(LayoutKind.Sequential, Size = 1)] attribute ensures the type has a defined size (1 byte) for native interop and memory layout reasons.
Properties
None
There are no properties on this type.
Constructors
public EditorAssetCategoryOverrideData()
The default parameterless constructor is used (implicitly provided). As a value type with no fields, it can be created with "new EditorAssetCategoryOverrideData()" or default(EditorAssetCategoryOverrideData).
Methods
None
The struct does not declare methods. Behavior is conveyed by systems that check for the presence/absence of this tag component.
Usage Example
// Add the tag to an existing entity
EntityManager.AddComponentData(someEntity, new EditorAssetCategoryOverrideData());
// Query to find entities marked for category override
Entities
.WithAll<EditorAssetCategoryOverrideData>()
.ForEach((Entity e) =>
{
// handle entities whose asset category should be overridden
}).Schedule();
Additional notes: - Use this component as a simple marker; systems should detect its presence to apply editor-specific category override logic. - The small fixed size and sequential layout are useful for deterministic layout and potential native code interactions.