Beginner question, why goodValue does not return anything? already assigned text
float GoodAttrb = 10;
float BadAttrb=0;
public Text textGood;
public Text textBad;
void Start () {
GoodBadStatus(GoodAttrb,BadAttrb);
}
void GoodBadStatus(float good, float bad)
{
good = good * 0.01f;
bad = bad * 0.01f;
float badValue = 1 - good;
float goodValue = good;
textGood.text = "Your value is " + goodValue;
textBad.text = "Your value is " + badValue;
return ;
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612132004im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why does my camera rotate on the x axis because of this script? What is wrong with the script? 0 Answers
How Do I Create a List of Two Strings? C# 1 Answer
How to remove flashing screen when changing Canvas Render Modes 0 Answers
Can’t keep the position 0 Answers
[C#] Enum not working properly 2 Answers