Skip to content

LevelEdit: an entity edit is found by its guid alone; at is needed only for a model swap - #333

Closed
Kharote wants to merge 1 commit into
mainfrom
fix/level-edit-entity-guid
Closed

Kharote wants to merge 1 commit into
mainfrom
fix/level-edit-entity-guid

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

What this changes

LevelEdit.apply({ kind: 'entity', guid, hidden: true }) threw LevelEdit at must be a finite Vector3, although the docs say an entity is found by its EntityGuid. The client finds an entity edit by its guid; at is used only for the stand-in of a model swap.

  • at is optional for kind: 'entity'. Without it the edit hides, moves or re-materials the entity found by its guid.
  • A model swap without at (in apply or through edit.model) throws a clear error: the stand-in needs a place.
  • toJSON() leaves at out for such an edit.
  • Docs: LevelEdit.apply says when at is optional; C# SDK regenerated.

How it was tested

  • level.test.cjs: new test, an entity edit by guid alone hides and moves; a model swap without at is refused in both ways; 13 pass.

Checklist

  • I read CONTRIBUTING.md and agree that my contribution is licensed as it says.
  • The change is my own work: no code, assets or dumps that are not mine or that come from the game.
  • python Dev/tools/format_source.py --check passes.
  • Tests cover the change, and the checks of this pull request pass.
  • Public behaviour that changed is documented (KCD-Synced/KCDS-DOCS) or needs no docs.

@Kharote Kharote mentioned this pull request Nov 24, 2026
5 tasks done
@Kharote

Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Shipped in 1.2.1 (#349, release v1.2.1).

@Kharote Kharote closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant