Table of Contents

Struct SpawnInfo

Namespace
Nautilus.Handlers
Assembly
Nautilus.dll
A basic struct that provides enough info for the CoordinatedSpawnsHandler System to function.
public struct SpawnInfo : IEquatable<SpawnInfo>
Implements
Inherited Members

Constructors

SpawnInfo(string, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.

SpawnInfo(string, Vector3, Quaternion)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition, Quaternion rotation)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.

SpawnInfo(string, Vector3, Quaternion, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition, Quaternion rotation, Vector3 scale)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.
scale Vector3
Scale to spawn with.

SpawnInfo(string, Vector3, Quaternion, Vector3, Action<GameObject>)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition, Quaternion rotation, Vector3 scale, Action<GameObject> onSpawned)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.
scale Vector3
Scale to spawn with.
onSpawned Action<GameObject>
Callback that is used when the object is successfully spawned.

SpawnInfo(string, Vector3, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition, Vector3 rotation)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Vector3
Rotation to spawn at.

SpawnInfo(string, Vector3, Vector3, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(string classId, Vector3 spawnPosition, Vector3 rotation, Vector3 scale)

Parameters

classId string
ClassID to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Vector3
Rotation to spawn at.
scale Vector3
Scale to spawn with.

SpawnInfo(TechType, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.

SpawnInfo(TechType, Vector3, Quaternion)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition, Quaternion rotation)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.

SpawnInfo(TechType, Vector3, Quaternion, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition, Quaternion rotation, Vector3 scale)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.
scale Vector3
Scale to spawn with.

SpawnInfo(TechType, Vector3, Quaternion, Vector3, Action<GameObject>)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition, Quaternion rotation, Vector3 scale, Action<GameObject> onSpawned)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Quaternion
Rotation to spawn at.
scale Vector3
Scale to spawn with.
onSpawned Action<GameObject>
Callback that is used when the object is successfully spawned.

SpawnInfo(TechType, Vector3, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition, Vector3 rotation)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Vector3
Rotation to spawn at.

SpawnInfo(TechType, Vector3, Vector3, Vector3)

Initializes a new SpawnInfo.
public SpawnInfo(TechType techType, Vector3 spawnPosition, Vector3 rotation, Vector3 scale)

Parameters

techType TechType
TechType to spawn.
spawnPosition Vector3
Position to spawn into.
rotation Vector3
Rotation to spawn at.
scale Vector3
Scale to spawn with.

Methods

Equals(SpawnInfo)

Indicates whether the current SpawnInfo is equal to another.
public bool Equals(SpawnInfo other)

Parameters

other SpawnInfo
The other SpawnInfo.

Returns

bool
true if the current SpawnInfo is equal to the other parameter; otherwise false.

Remarks

It is worth noting that we use Unity's UnityEngine.Vector3.operator ==(UnityEngine.Vector3, UnityEngine.Vector3) and UnityEngine.Quaternion.operator ==(UnityEngine.Quaternion, UnityEngine.Quaternion) operator comparisons for comparing the SpawnPosition and Rotation properties of each instance, to allow for an approximate comparison of these values.

Equals(object)

Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)

Parameters

obj object
The object to compare with the current instance.

Returns

bool
true if obj is a SpawnInfo and represents the same value as this instance; otherwise, false.

Remarks

It is worth noting that we use Unity's UnityEngine.Vector3.operator ==(UnityEngine.Vector3, UnityEngine.Vector3) and UnityEngine.Quaternion.operator ==(UnityEngine.Quaternion, UnityEngine.Quaternion) operator comparisons for comparing the SpawnPosition and Rotation properties of each instance, to allow for an approximate comparison of these values.
See Also

GetHashCode()

A custom hash code algorithm that takes into account the values of each property of the SpawnInfo instance, and attempts to reduce diagonal collisions.
public override int GetHashCode()

Returns

int
A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(SpawnInfo, SpawnInfo)

Indicates whether two SpawnInfo instances are equal.
public static bool operator ==(SpawnInfo a, SpawnInfo b)

Parameters

a SpawnInfo
The first instance to compare.
b SpawnInfo
The second instance to compare.

Returns

bool
true if the SpawnInfo instances are equal; otherwise, false.
See Also

operator !=(SpawnInfo, SpawnInfo)

Indicates whether two SpawnInfo instances are not equal.
public static bool operator !=(SpawnInfo a, SpawnInfo b)

Parameters

a SpawnInfo
The first instance to compare.
b SpawnInfo
The second instance to compare.

Returns

bool
true if the SpawnInfo instances are not equal; otherwise, false.
See Also