MinaPecheux/UnityTutorials-RTS

Missing Wood and Gold

UnityAnthony opened this issue · 1 comments

When you create a worker in 2020.2 you get this error, it happens for wood and gold

ArgumentException: Requested value 'gold' was not found.
System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Enum.Parse (System.Type enumType, System.String value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UIManager._CheckBuyLimits () (at Assets/Scripts/UI/UIManager.cs:277)
UIManager._OnUpdateResourceTexts () (at Assets/Scripts/UI/UIManager.cs:311)
UnityEngine.Events.InvokableCall.Invoke () (at :0)
UnityEngine.Events.UnityEvent.Invoke () (at :0)
EventManager.TriggerEvent (System.String eventName) (at Assets/Scripts/Managers/EventManager.cs:93)
Unit.Place () (at Assets/Scripts/Units/Unit.cs:146)
CharacterManager.Start () (at Assets/Scripts/Units/Characters/CharacterManager.cs:25)

Hello,

and thanks for contributing to this project! Very nice catch :)
Looks like my Git had ignored me renaming the files with title casing, so the online version of the repo still contained icons named "gold.png" instead of "Gold.png"...

This should be fixed now!
(But depending on your Git configuration, perhaps simply re-pulling the changes won't be enough to properly rename the files with the proper casing. In that case, you can do it manually by going to the Assets/Resources/Textures/GameResources folder and adding uppercase on the first letter of each sprite...)

Thanks again - and feel free to tell me if you find any other bug!
Cheers :)