Skip to content

feat: support component and attribute-backed board variables - #26

Merged
Zanzavar merged 5 commits into
mainfrom
feat/component-board-variable-attributes
Sep 2, 2026
Merged

Zanzavar merged 5 commits into
mainfrom
feat/component-board-variable-attributes

Conversation

@Zanzavar

@Zanzavar Zanzavar commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • import scalar board and component attributes as scoped Arcscript variables using attribute IDs and container custom IDs
  • sync C# interpreter enumeration and reset behavior with feat: integrate component and board variables arcscript-interpreters#19
  • include scoped variables in lookup, mutation, reset, save/load, and current/default serialization
  • display global, board-scoped, and component-scoped variables separately in the project inspector
  • support the Unity 6000.5 EntityId editor API while retaining compatibility with earlier versions
  • document the Unity UI package required by the bundled demo

Compatibility policy

This change intentionally does not provide an upgrade path for data serialized by earlier plugin releases:

  • after upgrading, users must delete and reimport every existing ArcweaveProjectAsset from a current Arcweave export or API response; if recreating an asset changes its Unity GUID, scene and prefab references must be reassigned
  • strings produced by earlier versions of SaveVariables() are unsupported and must be discarded; runtime saves must be recreated after upgrading
  • legacy Arcweave export formats are unsupported; generate a fresh export with the current Arcweave exporter

Related work

Testing

  • Unity 6000.5.7f1 Windows CLI, fresh sample project with com.unity.ugui 2.0.0: 5 EditMode tests passed
  • Unity PlayMode demo-scene smoke test: lifecycle events, seven imported variables, null-string normalization, and distinct global/board/component interpreter changes passed
  • standalone Windows player: build succeeded, launched headlessly, emitted ARCWEAVE_SMOKE_PASS, and exited with code 0
  • external .NET compile harness using the bundled parser sources and Antlr4.Runtime.Standard.dll: 5 tests passed
  • validated the fixture and assembly-definition JSON before removing these temporary test assets from the deliverable
  • git diff --check

Live staging end-to-end verification

  • created the Game Engine Example from the template on the arcweave/arcweave#1735 staging deployment (pr-1735, deployment commit e159def7bf7e1975a2f220c22822e1240b1fd174)
  • added a Starting Board string attribute board_message = "BOARD_OK" and a Drake Miles component string attribute manual_message = "COMPONENT_OK", referenced both with Arcscript in the starting element, and downloaded a fresh Export for Unity archive
  • verified the untouched final staging project.json contains the correct boards/components ownership, container IDs, custom IDs, values, and executable scoped references
  • installed this PR branch and its updated vendored interpreter into a clean Unity 6000.5.7f1 project, then imported the staging export through ArcweaveProjectAsset.ImportProject
  • verified 12 eligible component-attribute variables, 1 board-attribute variable, and 3 globals (16 total), including scoped Arcscript reads/writes keyed by the original attribute IDs, state application, reset, save/load, the export's own Arcscript content, and both playable starting paths
  • EditMode: 7/7 passed (5 focused board/component tests and 2 live-export tests)
  • PlayMode: 1/1 passed using the bundled ArcweavePlayer against the live export
  • standalone Windows player: build succeeded, the serialized imported project launched headlessly, emitted ARCWEAVE_STAGING_E2E_PASS project=Game Engine Example variables=16 componentVariables=12 boardVariables=1 options=2, and exited with code 0
  • visible Windows demo test: rendered BOARD_OK and COMPONENT_OK, loaded all three exported portraits, traversed both NPC branches, acquired and consumed the potion, applied the health and boolean scripts, reached Wanda's recovered dialogue, exercised the demo Save/Load controls, and logged no runtime exceptions
  • the demo Save/Load control restores its documented current element and variable state; it does not persist element visit history, which is existing demo behavior and is outside this PR

@Zanzavar
Zanzavar marked this pull request as draft August 10, 2026 10:53
@leocity

leocity commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator
  • Delete the "Test" folder.

  • When inspecting the Arcweave Project Asset, update the variable visualization to reflect the current state of the plugin. In this PR only global variables are shown; on main they're divided into categories, with all of them displayed.

@Zanzavar

Zanzavar commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author
  • Delete the "Test" folder.
  • When inspecting the Arcweave Project Asset, update the variable visualization to reflect the current state of the plugin. In this PR only global variables are shown; on main they're divided into categories, with all of them displayed.

fixed

…variable-attributes

# Conflicts:
#	Assets/Arcweave/Plugin/Editor/ArcweaveProjectAssetInspector.cs
@Zanzavar
Zanzavar marked this pull request as ready for review September 1, 2026 09:56
@Zanzavar
Zanzavar merged commit 38661eb into main Sep 2, 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.

3 participants