Hello, I’m relatively new to unity and the tutorial I’m following uses the line below to declare a variable
public TMP_Text tmpro => tmpro_ui != null ? tmpro_ui : tmpro_world;
The problem is I’m getting an error in unity saying:
error CS0173: Type of conditional expression cannot be determined because there is no implicit conversion between ‘TMPro.TextMeshProUGUI’ and ‘TMPro.TextMeshPro’
I assume that this is about the version of c# used in unity 2020. Is there a way to write the same line of code in different way? For example:
if (tmpro_ui != null) public TMP_Text tmpro = tmpro_ui; else public TMP_Text tmpro = tmpro_world;
Sorry If this is dumb. If you can help me with transforming that line of code ti will be very very helpful. Thank you.