- Unity 3.x Game Development by Example Beginner's Guide
- Ryan Henson Creighton
- 270字
- 2021-04-02 18:34:11
It's all Greek to me
First, we created a JavaScript script. Unity scripts are written in three languages that are somewhat like English: JavaScript, C#, and Boo. You may have already dabbled in JavaScript if you've tried your hand at web development. Unity's version of JavaScript (called "UnityScript") is a bit different because it talks about Unity-related things and runs much faster than your father's JavaScript.
In this book, we'll use JavaScript because it's the simplest of the three languages to learn. For this reason, many of the online Unity scripting tutorials you'll find are also written in JavaScript.
Tip
Stay sharp
JavaScript may be the best learning language for Unity beginners, but if you end up getting serious about developing games with this software, consider learning C#. It's much closer to a "real" programming environment, and it gives you certain organizational advantages that you won't get with JavaScript.
The first thing that we did was to write a line of code between two curly braces. I like to think of curly braces as delicious sandwich buns that group code together. The single lines of code are like the thin layers of salami or tomato in the sandwich. Above the curly braces is the description, or declaration, of the sandwich. It's like saying: We are now going to make a hoagie—top sandwich bun, yummy ingredients, bottom sandwich bun.

In more technical, less sandwich terms, the area grouped by the buns is called a statement block. The layers between the buns are called statements. And the type of sandwich we're making, the Update sandwich, is known as a function.
- Python零基礎快樂學習之旅(K12實戰訓練)
- 高級C/C++編譯技術(典藏版)
- Expert Android Programming
- Building Minecraft Server Modifications
- Building a Quadcopter with Arduino
- INSTANT OpenNMS Starter
- ArcGIS By Example
- Windows Phone 7.5:Building Location-aware Applications
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Learning iOS Security
- 算法圖解
- Exploring SE for Android
- Building Slack Bots
- C語言從入門到精通(第5版)
- Python自動化運維:技術與最佳實踐