Author: James Clarke
Posted on 7/14/2023
This week I focused on making the UI for the player's inventory more player friendly. One big part of the display I struggled with is the filtering of excess words, symbols, and numbers . Most of the time it was me just trying to remember how modifying strings and chars work in C#. The rest of it was trying not to get "index out of range" and "null" exceptions.
Thanks to a teammate I was able to figure out what I needed to use and how I needed to modify my code to work properly. most of it was just a simple use of a few different functions than the ones I tried using. Instead of using the "Remove" function for strings, I found that Split worked way better and was way easier to use for cutting off excess chars in strings. I was also told about the "Replace" function that was also apart of the string class which helped me turn "_" into spaces. After that all I needed to do was configure the uses to my code and it worked really well.
Code snippet of the solution
Issue Result
Solution Result
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.