mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
parent
f46f32df55
commit
531e202bbe
@ -508,6 +508,12 @@ public static void RegisterStartPosition(Transform start)
|
||||
{
|
||||
if (LogFilter.Debug) Debug.Log("RegisterStartPosition: (" + start.gameObject.name + ") " + start.position);
|
||||
startPositions.Add(start);
|
||||
|
||||
// reorder the list so that round-robin spawning uses the start positions
|
||||
// in hierarchy order. This assumes all objects with NetworkStartPosition
|
||||
// component are siblings, either in the scene root or together as children
|
||||
// under a single parent in the scene.
|
||||
startPositions = startPositions.OrderBy(transform => transform.GetSiblingIndex()).ToList();
|
||||
}
|
||||
|
||||
public static void UnRegisterStartPosition(Transform start)
|
||||
|
Loading…
Reference in New Issue
Block a user