Ship S2: the prototype root is kept across scenes only in play mode
DontDestroyOnLoad throws outside play mode, so the edit-mode play smoke failed before it reached assembly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e9195763b6
commit
48cabc5f85
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ public static class ShipModShips
|
|||
throw new InvalidOperationException($"The ship mod template prefab ({ShipModTemplate.Key}) is not loadable.");
|
||||
var root = new GameObject("Mod Ship Prototypes");
|
||||
root.SetActive(false);
|
||||
Object.DontDestroyOnLoad(root);
|
||||
// DontDestroyOnLoad is play-mode only; the edit-mode play smoke builds the same prototypes
|
||||
// without it, and nothing there loads scenes.
|
||||
if (Application.isPlaying) Object.DontDestroyOnLoad(root);
|
||||
foreach (var hull in hulls)
|
||||
{
|
||||
var package = ShipModCatalog.PackageOf(catalog, hull, modsRoot);
|
||||
|
|
|
|||
Loading…
Reference in a new issue