Closed 8Keep closed 9 years ago
Thanks for the heads-up. I'll get onto it. Should have a fix in a few hours.
Ive fixed it for my game, I don't know how to provide a dif (I just downloaded the zip of the repo, I didn't use git), but I know I changed in ConsoleUI the line where it subscribed to the onSubmit event of the inputfield to onEndEdit, because unity removed the onSubmit event in Unity 5 (I know, it makes absolutely no sense, you can read forum threads of many people complaining) . However, the onEndEdit will also be called when the user clicks outside of the field so it gets deselected. So in the method I wrapped everything around a Input.GetKeyDown (KeyCode.Return) if statement to only run if the enter key is pressed, so it behaves like the old onSubmit.
Oh and to fix the value issue, because inputfield no longer has a value field, I changed the line to access inputField.textComponent.text instead.
If there are any more problems I can check what I changed but I'm pretty sure this is all I changed. I should've used git and just submited diff's.
Yup I ended doing mostly the same thing. The new release (0.1.0) should work with Unity 5 now. I've fixed a few other things as well, you might want to check it out. Let me know how it goes.
Cheers!
Assets/UnityConsole/Console/Scripts/ConsoleUI.cs(121,36): error CS1061: Type
UnityEngine.UI.InputField' does not contain a definition for
value' and no extension methodvalue' of type
UnityEngine.UI.InputField' could be found (are you missing a using directive or an assembly reference?)Assets/UnityConsole/Console/Scripts/ConsoleUI.cs(44,36): error CS1061: Type
UnityEngine.UI.InputField' does not contain a definition for
onSubmit' and no extension methodonSubmit' of type
UnityEngine.UI.InputField' could be found (are you missing a using directive or an assembly reference?)Assets/UnityConsole/Console/Scripts/ConsoleUI.cs(38,36): error CS1061: Type
UnityEngine.UI.InputField' does not contain a definition for
onSubmit' and no extension methodonSubmit' of type
UnityEngine.UI.InputField' could be found (are you missing a using directive or an assembly reference?)Seems like the onSubmit isn't there or something. Im using unity 5.