Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by SecretAgentMango · Oct 04, 2017 at 04:23 PM · c#scripting problemscriptingbasics

I seriously cannot learn how to script. What do I do?

The main thing I struggle with in Unity is using C# to script. Every time I look up a video tutorial, it is either incredibly basic or incredibly difficult (i.e. someone defining a variable versus someone making a full game at a very fast pace). When I see other people with this same problem, the community always answers with "you should just try to do something and learn scripting relative to that instead of just mindlessly doing tutorials"; this doesn't work either! I literally spent 9 1/2 hours one weekend trying to get grid-based movement in my 2D game with no success because I have no idea what I'm doing! When I go on the forums people provide me with advice that goes over my head. The only thing preventing me from learning how to make games is a fundamental understanding of how to script in C#. How do I get there?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image toddisarockstar · Oct 04, 2017 at 04:31 PM 1
Share

I am now a very fast and efficient programmer. what you are describing is something i went through too for many months when i started. getting frustrated is just part of the learning process. learning program$$anonymous$$g is not easy. when i started i would just try to write scripts a very little bit at a time.

avatar image Bunny83 toddisarockstar · Oct 04, 2017 at 05:18 PM 0
Share

But that's exactly the point. You spent month, he spent 9.5 hours. I started leaning program$$anonymous$$g at the age of 11. Now 22 years later I'm still learning something new almost on a daily basis. Yes, it would be nice if we lived inside the $$anonymous$$atrix and could just download some knowledge into our brains, however that's not how the world works.

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by TharosTheDragon · Oct 04, 2017 at 04:32 PM

If you want to take the most leisurely route, you can start learning programming concepts with an easier language. Languages like Basic exist for this purpose.

I also recommend taking actual C# classes and reading actual C# books rather than just doing tutorials. Just keep in mind that there are some differences between how Unity uses C# and how C# is typically used (with the .NET framework). But since you seem to have a good grasp of Unity apart from the C# scripting, I think you'll be all right.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SecretAgentMango · Oct 04, 2017 at 04:34 PM 0
Share

I'm actually just started my Computer Science major and I'm learning C++ right now. Do you think if I'm patient I'll start to grasp the concepts in C# in Unity better?

avatar image TharosTheDragon · Oct 04, 2017 at 04:39 PM 0
Share

If you're majoring in computer science then I would think you'll be taking the kinds of classes that will help you, yes. I think C++ may be the most difficult language out there, and it's certainly harder than C#.

avatar image kaplica TharosTheDragon · Oct 04, 2017 at 04:51 PM 0
Share

I wouldn't say C++ is the most difficult language... Have you ever tried assembler? After writing my own OS in assembler on a 8086 CPU, C++ is a breeze.

avatar image Bunny83 kaplica · Oct 04, 2017 at 05:38 PM 1
Share

I think you mix the difficulty / complexity of a language with the difficulty / complexity of achieving a certain goal in that language. The 8086 assembler is very simple and straight forward. When program$$anonymous$$g assembler you usually struggle the most with hardware specific stuff. You have to know the hardware on a very low level. However that's not part of the language, it's part of the problem you want to solve.

While C++ abstracts a lot of the basic hardware layer stuff (hence we call it a high level language) the language itself is several factors more complicated than assembly. There are some language features (templates is one of them) which allows you to create such complicated structures it's almost imposslbe to actually understand what you're doing. $$anonymous$$ulti-base class inheritance can also be quite confusing at times.

avatar image
2

Answer by Kishotta · Oct 04, 2017 at 05:05 PM

A lot of people get stuck in this spot (there's probably a name for it at this point) in their programming adventure where they can readily read and understand most code you put in front of them, but they aren't able to create the code themselves.

I'm convinced this is due to the misconception on how the programming workflow should actually work. My compsci teachers, throughout my degree program, asserted that programmers spend ~90% of their time THINKING about writing code. Breaking down your problem into simpler ones, figuring out which structures and patterns work best, naming things, justifying decisions. Then once the general idea is all fleshed out (if not for the whole program, at least for a single module or class), you can worry about the details of how exactly to write it all down when you sit down to code.

This approach has worked pretty well for my classmates and I.

Maybe that workflow isn't conducive to gamedev. I'm really not sure. As far as learning your language of choice (this applies to pretty much any language), so long as you have the basic concepts of programming understood (variables, flow control, inheritance and polymorphism if using OOP, lamdas, callbacks, etc.), reading the language specification/documentation can answer TONS of questions.

I'm finishing my degree this semester and just last night I had to look up "c++ stoi" because I could't remember what value was returned when you try to convert an empty string "" to an integer. You'll never know it all. You'll always need a reference (or stackoverflow/unityanswers). Don't feel too bad about it.

Whew, that was longer than I meant it to be. Sorry if it's not helpful.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by archieval23 · Oct 04, 2017 at 05:26 PM

First things first. Read and understand the documentation of Unity It will help you understand what will you do in your codings Link of Documentation below https://docs.unity3d.com/Manual/index.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by SFoxx28 · Oct 04, 2017 at 05:08 PM

Learning C# really does consist of the basics of what are variables, objects, classes, and other concepts. After you learn the basics try reading other people's code and understand what it does and how it works one line at a time. Then try to mimic that in your code. TBH I'm still learning a lot about programming in Unity3D C# and there many advanced concepts I need to learn. But my advice is after you grasped the basics that those tutorials provide, dive right in and refer back to those tutorials if you get stuck or ask for help.

Also, if programming is a challenge for you then you may want to look into Unity Playmaker as an alternative. You can find it in the asset store. It allows you to code via blueprints without ever writing a single line. I tried it myself and thought it was handy but there's still a learning curve. I come from a programming background and between Playmaker and writing C# myself I prefer C# as a personal preference.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

428 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Attaching sound to ImageTarget issues 0 Answers

Collision Detection Not Working (Unity 5.2.3) 5 Answers

Should I inherit from Monobehaviour if the use of my C# script is only to hold script references? 2 Answers

Interchangeable animations in a script? 0 Answers

OnCollisonEnter2D Not Firing after checking collider 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges