- Home /
Question by
Divinitize1 · Jun 26, 2019 at 06:28 PM ·
gameobjectarraystrings
Trying to set text equal to a gameobject array value but it's including (unityengine.gameobject) in the text
The title says it all
nextLevelTMP.text = save.LevelUpPrizes[save.level +1].ToString();
Is returning "object (unityengine.gameobject) instead of just "object"
Never dealt with editing strings etc in c# before, anyone know how to resolve?
Comment
Best Answer
Answer by Divinitize1 · Jun 26, 2019 at 08:52 PM
Solved using Split
string[] output = save.LevelUpPrizes[save.level +1].ToString().Split('(');
nextLevelTMP.text = output[0];
Your answer
Follow this Question
Related Questions
Making an array "spread" out evenly? 1 Answer
Add prefabs from a folder to array as GameObject 2 Answers
how to check for GameObject is null in array with random 1 Answer
Use an objects (from array) position to focus a camera on 3 Answers
Cannot convert 'UnityEngine.Collider[]' to 'UnityEngine.gameObject[]' using OverlapSphere 3 Answers