- Learning C# 7 By Developing Games with Unity 2017(Third Edition)
- Micael DaGra?a Greg Lukosek
- 170字
- 2021-07-02 19:59:37
Click Play!
Quite an exciting moment! Go back from MonoDevelop to Unity and click the Play button. Unity should print out two lines on the Console tab, looking like this:

Unity executed the code in the variableScript component on the GameObject just after you clicked Play. We can see two lines printed on the Console window. We wrote a piece of code asking Unity to print these two values the Console window. Let's look again at lines 11 and 13. Everything inside the brackets in the Debug.Log function will be printed to the Unity Console. It can be a number, text, or even an equation:

So, line 11 is asking, "Hey Unity, print the result of 2 + 9 on the console!" Line 14 is using the myNumber variable's value directly and adding it to the number 11.
Thus, the point of this exercise is to demonstrate that you can store and use whatever values you want using variables, and use their names directly to perform operations.
- 黑客攻防從入門到精通(實戰秘笈版)
- C# 7 and .NET Core Cookbook
- Python科學計算(第2版)
- PaaS程序設計
- Java Web及其框架技術
- C語言程序設計實踐教程
- Hands-On Microservices with Kotlin
- 算法訓練營:提高篇(全彩版)
- Java:High-Performance Apps with Java 9
- FPGA Verilog開發實戰指南:基于Intel Cyclone IV(進階篇)
- Lighttpd源碼分析
- 圖數據庫實戰
- 細說Python編程:從入門到科學計算
- Java并發編程之美
- Instant Apache Camel Messaging System