Skip to content

Archetypes and Collection Ids not supported for arrays #3213

Description

@Eideren

Release Type: After #3212

Version: See above

Platform(s): Gamestudio

Describe the bug
Arrays cannot currently derive from their source in a base prefab or have collection ids attached.

To Reproduce
Steps to reproduce the behavior:

  1. Define an array with a non zero size in a component
  2. Add the component to a scene
  3. Save the scene
  4. Open the Yaml
  5. Notice the lack of collection Ids

Additional context
Some of the support for that already exists, we can attach Ids to arrays, but some of the internal logic called through AssetPropertyGraph.ReconcileWithBaseNode work with the expectation that collections processed support addition and removal. Arrays are fixed size, they don't support such operations. We would have to rewrite some of that logic to either work on replacing items or setup a specific path for arrays.

Additionally, a safeguard has been placed here
https://github.com/Eideren/xenko/blob/f3238d95c039e8f5163a984a510b60096b78e5ff/sources/assets/Stride.Core.Assets/CollectionIdGenerator.cs#L113-L117
To ensure no ids are generated before we fix the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions