Configure AI spawning and player spawn points in multiplayer minigames#466
Open
Shombith03 wants to merge 6 commits into
Open
Configure AI spawning and player spawn points in multiplayer minigames#466Shombith03 wants to merge 6 commits into
Shombith03 wants to merge 6 commits into
Conversation
…itializerWithAI Both scenes were using the base ServerPlayerVesselInitializer which lacks DomainAssigner.Initialize(), AI backfill spawning, and had empty playerSpawnPoints. Upgraded to ServerPlayerVesselInitializerWithAI (matching HexRace) and wired spawn points, AI player prefab, AI init data templates, and AI profile list. https://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ
…enes Both scenes were missing the Reflex ContainerScope prefab instance that HexRace has, causing all [Inject] fields (gameData, etc.) to be null. This produced NullReferenceExceptions in OnNetworkSpawn for ServerPlayerVesselInitializerWithAI, NetworkScoreTracker, NetworkVolumeUIController, and MultiplayerMiniGameControllerBase. https://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ
The Game GameObject had a MonoBehaviour referencing a deleted script (GUID 9f7a7af0f6bd4545ba6e0f5f622342c0, had a cellData field). This caused the "referenced script on this Behaviour" warning on scene load. https://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ
…mode When RequestedTeamCount=1, NormalizeHumanDomains() was building a validDomains set containing only Jade (TeamDomains[0]), rejecting the player's chosen domain (e.g. Ruby) and defaulting everyone to Jade. Fix: when teamCount=1, accept whatever domain the human player chose. Also updated BuildTeamCounts() to include the player's actual domain in single-team mode so AI backfill joins the correct team. https://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ
Cell.cs was converted from [SerializeField] GameDataSO to [Inject], but OnEnable() runs before Reflex injection (which happens between Awake and Start). gameData was null in OnEnable(), so the OnInitializeGame subscription never happened and Initialize() never ran — preventing flora/gyroid spawning. Added deferred subscription pattern: try in OnEnable(), retry with duplicate guard in Start() when the injected field is available. https://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ
…on timing" This reverts commit 34e8a1d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated two multiplayer minigame scenes to configure AI player spawning and define player spawn points. This enables AI opponents to spawn automatically when the server is ready.
Key Changes
60055a52b62641648a575758553575f7to46ca9ae8ce99408c800f5e10c8691427in both scenesspawnAIOnServerReadyflag in both scenesImplementation Details
IsAI: 1andAllowSpawning: 1flagshttps://claude.ai/code/session_01XtEPzN4njxYA1CPfZSg1HQ