- Learning C# by Developing Games with Unity 5.x(Second Edition)
- Greg Lukosek
- 119字
- 2021-07-09 20:03:35
Assigning values while declaring a variable
Add some more variables to LearningScript
using the types shown in the previous chart. While declaring the variables, assign them values as shown in the following screenshot. See how they are presented in the Inspector panel. These are all public variables, so they'll appear in the Inspector panel.

This screenshot shows what Unity presents in the Inspector panel:

The variables are displayed in the Inspector panel with the values set by default in the code. Remember that from now on, the value in the Inspector panel will override the value in the code, so if you decide to change your code a little, the value in Inspector will stay as it was initially.
推薦閱讀
- Learning Single:page Web Application Development
- 零基礎(chǔ)搭建量化投資系統(tǒng):以Python為工具
- Visual Basic程序設(shè)計教程
- Instant 960 Grid System
- 網(wǎng)頁設(shè)計與制作教程(HTML+CSS+JavaScript)(第2版)
- Mastering Apache Spark 2.x(Second Edition)
- Visual Basic程序設(shè)計教程
- 51單片機(jī)C語言開發(fā)教程
- Everyday Data Structures
- Python青少年趣味編程
- QlikView Unlocked
- 青少年學(xué)Python(第2冊)
- Mastering Bootstrap 4
- Clojure for Finance
- Learn C Programming