Talking to the Rubber Duck

This might be getting a bit off topic but Dondi’s comment brings a question to mind. Is it important to learn C# and .NET end to end to be good at programming in Unity? Or is it enough to go to Unity docs, click on scripting, and learn everything within the framework of Unity’s documentation as it relates to scripting?

As an example, if I go to indeed.com and an employer is looking for a Unity Developer. Wall to wall C# skills, or within the context of what Unity provides in docs?

I know this is more of a rubber duck area so if I need to start a new post let me know. Thanks.

Probably the more in-depth you can go the better for an employer. For them it means you can just throw more tools at a problem. But generally speaking the Unity subset is the most useful for these kinds of app.

1 Like

Ok, sounds good. Maybe then at some point a high level overview of C#, then focus on the Unity subset, and eventually on to digging deeper. Thanks.

1 Like

We had a broom with a silly hat. Talk to the broom.

Ok let me tell you about my game.

You start out lost and you have to find your way home by moving in one of four directions using the cursor keys.

Overall the game works but the problem that I currently have is that when you finally arrive at home is that the game does not end, you can go out again and while that would be fine if I wanted to pass a series of locations, it is not what I want.

The only solution that I can see is to put in a stop command to end the game when the player reaches the home location.

I think I will try void Stop()

No that doesn’t work, I know that I have to do, it is just figuring out the command to end the program at a set variable.

First we need to set our variable so that the program knows what we are referring to at all times.
For the void Start () area we can put the intro for our game since this will begin as soon as our game has started. Next, the void Update section will continuously check for input from the 4 keys we have specified. If input is found it will either add or subtract in the x or y direction depending on what direction the player will be moving. So far we have the movement being calculated but it still needs to be printed. Therefor, we check to see if a button is being pressed and then update the player location and print the new distance from home.

Currently, we are missing something that tells the program to stop checking for updates once we have made it home. In other words, we need to somehow exit the script. We can do this by somehow checking if the playerlocation is equal to homelocation.

Privacy & Terms