diff --git a/Assets/Scripts/Gameplay/Configuration/NameGenerationData.cs b/Assets/Scripts/Gameplay/Configuration/NameGenerationData.cs index 141ba1817..6eb68de73 100644 --- a/Assets/Scripts/Gameplay/Configuration/NameGenerationData.cs +++ b/Assets/Scripts/Gameplay/Configuration/NameGenerationData.cs @@ -1,4 +1,3 @@ -using System; using UnityEngine; using Random = UnityEngine.Random; @@ -19,8 +18,8 @@ public class NameGenerationData : ScriptableObject public string GenerateName() { - var firstWord = FirstWordList[Random.Range(0, FirstWordList.Length - 1)]; - var secondWord = SecondWordList[Random.Range(0, SecondWordList.Length - 1)]; + var firstWord = FirstWordList[Random.Range(0, FirstWordList.Length)]; + var secondWord = SecondWordList[Random.Range(0, SecondWordList.Length)]; return firstWord + " " + secondWord; } diff --git a/CHANGELOG.md b/CHANGELOG.md index 10f2b3465..34d2dc25d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ Additional documentation and release notes are available at [Multiplayer Documen * Fixed error logged when attempting to despawn an already despawned LoadingProgressTracker NetworkObject (#907) * Fixed error logged when a Melee action was acted on a Breakable object (#908) * Internal standards job fix (#915) +* Fixed last index of names not being used (#922) ## [2.5.0] - 2024-04-18