- Home /
bolt errors
I'm having trouble finding any information on this InvalidConversionException: Cannot convert from 'System.String' to 'UnityEngine.UI.Text'. InvalidConversionException: Cannot convert from 'System.Single' to 'UnityEngine.UI.Slider'.
Answer by CodeMonkeyYT · Apr 24 at 10:05 AM
On the Slider problem, it looks like you defined the variable hpSlider of type int instead of slider.
On the String problem, you probably made the variable nameTxtPlayer of type string
By the way Bolt automatically replaces the Type of a variable when you set it. So perhaps you do have the definitions correct but in your logic you're doing Set Variable and accidentally changing the type.
In the string image, after the red node you have a Set Variable where you're setting nameTxtPlayer to the string that comes out of Set Text which will convert that variable to String
Your answer
Follow this Question
Related Questions
Split string in C#? 1 Answer
Looking for a javascript unity implementation of FromCharCode? 0 Answers
Separating two strings 1 Answer
Multiple Rich Text Not Working 1 Answer