Video 66 asks to “enable package registry” to be selected when in the package manager. This option is not available to me. How can I get it?
Sorry to get back to you so late. I figured out the registry problem and I was able to import the Input System Package as recommended in the video. Now my player doesn’t move at all despite my code looking exactly like Ben’s for Lesson 13, Section 2 of the C# Unity Game Developer 3D. Any suggestions?
Welcome back and good job on fixing the issue so far!
Regarding the remaining problem, have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Maybe there is a typo somewhere. C# is case-sensitive, so make sure that the Unity method names are spelt correctly.
Thanks, Nina. I was able to get that working. Now for something that has thoroughly confused me. I started the course not knowing there were two versions of the course in the same course, one for version 2017 and one for 2020. So I was doing Terminal Hacker. After jumping into Project Boost in 2017 I accidentally selected Project Boost in 2020 and realized some things were different. While I know that teh 2017 version has been archived, it got me really confused.
In Terminal Hacker, I learned how to input a string and have the computer interpret and manipulate this input to some degree. This doesn’t work the same way in 2020. In short, I am creating an educational game wherein the user must input numbers. I know I’m new at this, but finding information on this is INSANE!!! Please help me. I only want the user to be able to input what I think are floats (decimals/rational numbers, still trying to grasp that), not just integers. Any direction you can provide will be greatly appreciated.
I’m sorry for the confusion. We moved the original content to an archive course a couple of days ago. You can find a free coupon and a link in lecture “Coupon For Original Course Content (Created In Unity (2017-2019)” (currently #201 on Udemy).
It does. However, Ben and Rick provided a bunch of classes in their old course to process the user input. Unity does not have a built-in function for that. What you could do is to duplicate Ben’s and Rick’s original Terminal Hacker project and modify it as you need it for your educational game.
Alternatively, if you would like to implement input fields, look for tutorials on “Unity input field” on Youtube. This way, you don’t need Ben’s and Rick’s classes. Once you have the user input as a string, you can process it yourself.
Look up the Single.TryParse method in the C# API. “System.Single” is the C# type, the equivalent of “float”. Use float as you know it but if you want to look the built-in methods up, look for “Single”. There is a lot more functionality which you could use, for instance, if float values are written differently in another language. In German, 3.12 would be written as 3,12.
Admittedly, the example in the C# API can be a bit overwhelming. TryParse returns a bool. If the conversion was successfull, the returned value is true, and the method saves the float value in a variable.
Take a look at the example for the int version on DotNetPerls. The float version works the same way.
https://www.dotnetperls.com/parse
Last but not least, I’d suggest not to start developing your game right away. Hard-code some user input (string) and try to process is as needed. Once this works, you could develop your game even if logging the actual user input does not work yet. Keep your game modular in this respect, then you’ll be able to add functionality without having to edit all your existing code.
Hopefully, this helped you a bit.
Thanks a bunch, Nina. I really appreciate your help and insight.
Next question: How do I find the UI Builder for 2019.4?
You mean this?
https://docs.unity3d.com/Packages/com.unity.ui.builder@1.0/manual/index.html
Maybe in the Package Manager.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.