No project code is in Assembly-CSharp any more. Five assemblies: Core (no dependencies), Locomotion.Math, Skills, Game (everything else under Scripts), and StarterAssets. Game is one assembly rather than one per area, which is what the plan assumed. Measuring the dependency graph first found three cycles, all through UI — CharacterPanelView reaches into Dialogue, PlayerControlLock into Player, and UILayerBootstrap into Cinematics — plus two edges a using-scan cannot see, because NPCStandIn is in the global namespace. Assemblies cannot be circular, so splitting further means relocating those three files. That is a code-movement task, not an asmdef task, and nothing needs it yet. StarterAssets had to get an assembly of its own. It had none, so it lived in Assembly-CSharp, and an asmdef assembly cannot reference the predefined assemblies — four runtime files use it, and all four would have stopped compiling. The payoff is immediate: BootstrapTests no longer needs reflection to reach NPCStandIn and CinemachineFollowsPlayer, which is exactly why Phase 3 wanted this. Assets/Editor/PlayerBuild.cs is the headless build entry point. It reads the enabled scenes, asserts Bootstrap is scene 0 because the player opens scene 0 on launch, honours the -buildOutput the CLI forwards from -o, and calls EditorApplication.Exit(1) on anything short of Succeeded — without which Unity exits 0 on a build that produced nothing and CI goes green on it. Verified end to end: a 172MB .app in about two minutes. Two renames, both different from what the plan described. DialougueSkillComparison.cs contains a class called SkillFunctions — the filename never matched the type, so it is now SkillFunctions.cs. The two .yarn files with spaces in their names lost the spaces rather than becoming kebab-case, which would have made them inconsistent with Bartender.yarn and SC101.yarn; spaces were the actual problem. Both renames preserved their .meta GUIDs, and the yarnproject graph keys and the two character sheets were updated. EditMode 42/42, PlayMode 5/5, YarnCheck 9 files / 35 nodes, make build green. Co-Authored-By: Claude Opus 5 <[email protected]>
69 lines
3.0 KiB
Makefile
69 lines
3.0 KiB
Makefile
# Nightclub Arcadia — common commands.
|
|
#
|
|
# Everything here is documented in CLAUDE.md; this file exists so the exact
|
|
# invocations live in one place instead of being retyped from memory.
|
|
|
|
UNITY_CLI ?= /Users/lennart/.unity/bin/unity
|
|
UNITY ?= /Applications/Unity/Hub/Editor/6000.5.8f1/Unity.app/Contents/MacOS/Unity
|
|
PROJECT ?= $(CURDIR)/NightclubArcadia
|
|
RESULTS ?= $(CURDIR)/.test-results
|
|
SMARTMERGE ?= /Applications/Unity/Hub/Editor/6000.5.8f1/Unity.app/Contents/Helpers/UnityYAMLMerge
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
.PHONY: help check yarn yarn-play voices voices-sync test test-play build lock clean-results merge-driver
|
|
|
|
help: ## Show this help
|
|
@grep -hE '^[a-z-]+:.*?## ' $(MAKEFILE_LIST) \
|
|
| awk 'BEGIN {FS = ":.*?## "} {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
|
|
@echo ""
|
|
@echo " Unity must be CLOSED for test/build — run 'make lock' to check."
|
|
|
|
check: yarn voices test test-play ## Everything a change should pass before commit
|
|
|
|
yarn: ## Compile every Yarn script (seconds, no Unity)
|
|
@cd tools/YarnCheck && DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet run -- ../../NightclubArcadia/Assets/Dialogue
|
|
|
|
yarn-play: ## Play a node: make yarn-play NODE=Bartender_Talk PICKS="2 2 0 0"
|
|
@cd tools/YarnCheck && DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
|
dotnet run -- ../../NightclubArcadia/Assets/Dialogue $(NODE) $(PICKS)
|
|
|
|
voices: ## Check writing/voices/*.md against skill_bible.json
|
|
@python3 tools/writing/sync_voices.py --check
|
|
|
|
voices-sync: ## Fold edited voice prose into skill_bible.json
|
|
@python3 tools/writing/sync_voices.py --to-json
|
|
|
|
test: lock ## Run the EditMode suite
|
|
@mkdir -p $(RESULTS)
|
|
@$(UNITY_CLI) test $(PROJECT) --no-banner --mode EditMode \
|
|
--output $(RESULTS)/editmode.xml --timeout 900 || true
|
|
@python3 tools/ci/report_tests.py $(RESULTS)/editmode.xml
|
|
|
|
test-play: lock ## Run the PlayMode suite (bootstrap + scene split)
|
|
@mkdir -p $(RESULTS)
|
|
@$(UNITY_CLI) test $(PROJECT) --no-banner --mode PlayMode \
|
|
--output $(RESULTS)/playmode.xml --timeout 900 || true
|
|
@python3 tools/ci/report_tests.py $(RESULTS)/playmode.xml
|
|
|
|
build: lock ## Build a macOS player into build/
|
|
@$(UNITY_CLI) build $(PROJECT) --no-banner --target StandaloneOSX \
|
|
--execute-method NightclubArcadia.EditorTools.PlayerBuild.BuildMacOS \
|
|
-o $(CURDIR)/build/NightclubArcadia.app
|
|
|
|
lock: ## Fail if the Unity Editor has the project open
|
|
@if pgrep -fl "Unity.app/Contents/MacOS/Unity" | grep -v AssetImportWorker | grep -q .; then \
|
|
echo "The Unity Editor is running — close it first (only one instance per project)."; \
|
|
exit 1; \
|
|
fi
|
|
|
|
merge-driver: ## One-time: teach git to merge Unity YAML with UnityYAMLMerge
|
|
@test -x "$(SMARTMERGE)" || { echo "UnityYAMLMerge not found at $(SMARTMERGE)"; exit 1; }
|
|
@git config merge.unityyamlmerge.name "Unity SmartMerge"
|
|
@git config merge.unityyamlmerge.driver "'$(SMARTMERGE)' merge -p --force --fallback none %O %B %A %A"
|
|
@git config merge.unityyamlmerge.recursive binary
|
|
@echo "configured: $$(git config merge.unityyamlmerge.name)"
|
|
|
|
clean-results: ## Remove local test results
|
|
@rm -rf $(RESULTS)
|