diff --git a/Nautilus/Assets/Gadgets/GadgetExtensions.cs b/Nautilus/Assets/Gadgets/GadgetExtensions.cs
index cb3b14ef..48166129 100644
--- a/Nautilus/Assets/Gadgets/GadgetExtensions.cs
+++ b/Nautilus/Assets/Gadgets/GadgetExtensions.cs
@@ -217,9 +217,9 @@ public static ICustomPrefab SetSpawns(this ICustomPrefab customPrefab, params Sp
{
customPrefab.AddOnRegister(() =>
{
- foreach ((Vector3 position, Vector3 eulerAngles) in spawnLocations)
+ foreach (var spawnLocation in spawnLocations)
{
- CoordinatedSpawnsHandler.RegisterCoordinatedSpawn(new SpawnInfo(customPrefab.Info.ClassID, position, eulerAngles));
+ CoordinatedSpawnsHandler.RegisterCoordinatedSpawn(new SpawnInfo(customPrefab.Info.ClassID, spawnLocation.Position, spawnLocation.EulerAngles, spawnLocation.Scale));
}
});
diff --git a/Nautilus/Assets/SpawnLocation.cs b/Nautilus/Assets/SpawnLocation.cs
index 48d1be38..5b46a188 100644
--- a/Nautilus/Assets/SpawnLocation.cs
+++ b/Nautilus/Assets/SpawnLocation.cs
@@ -7,4 +7,21 @@ namespace Nautilus.Assets;
///
/// The world position.
/// Euler angles for the rotation the spawned object will appear with.
-public record SpawnLocation(Vector3 Position, Vector3 EulerAngles = default);
\ No newline at end of file
+public record SpawnLocation(Vector3 Position, Vector3 EulerAngles = default)
+{
+ ///
+ /// The scale that the object is spawned at. If default (0, 0, 0) will be resolved to (1, 1, 1).
+ ///
+ public Vector3 Scale { get; init; }
+
+ ///
+ /// Defines the spawn location with world position and optional euler angles. Used in the Coordinated Spawns system.
+ ///
+ /// The world position.
+ /// Euler angles for the rotation the spawned object will appear with.
+ /// The scale that the object is spawned at. If default (0, 0, 0) will be resolved to (1, 1, 1).
+ public SpawnLocation(Vector3 Position, Vector3 EulerAngles, Vector3 Scale) : this(Position, EulerAngles)
+ {
+ this.Scale = Scale;
+ }
+}
\ No newline at end of file
diff --git a/Nautilus/Handlers/CoordinatedSpawnsHandler.cs b/Nautilus/Handlers/CoordinatedSpawnsHandler.cs
index bd12dc50..1efc1fe2 100644
--- a/Nautilus/Handlers/CoordinatedSpawnsHandler.cs
+++ b/Nautilus/Handlers/CoordinatedSpawnsHandler.cs
@@ -45,7 +45,7 @@ public static void RegisterCoordinatedSpawns(List spawnInfos)
/// The spawn locations to spawn in. Euler angles are optional.
public static void RegisterCoordinatedSpawnsForOneTechType(TechType techTypeToSpawn, params SpawnLocation[] spawnLocations)
{
- var spawnInfos = spawnLocations.Select(spawnLocation => new SpawnInfo(techTypeToSpawn, spawnLocation.Position, spawnLocation.EulerAngles)).ToList();
+ var spawnInfos = spawnLocations.Select(spawnLocation => new SpawnInfo(techTypeToSpawn, spawnLocation.Position, spawnLocation.EulerAngles, spawnLocation.Scale)).ToList();
RegisterCoordinatedSpawns(spawnInfos);
}
}