- 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.
推薦閱讀
- SpringMVC+MyBatis快速開發(fā)與項目實戰(zhàn)
- PHP程序設(shè)計(慕課版)
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- PySide GUI Application Development(Second Edition)
- Python數(shù)據(jù)分析從0到1
- Visual Basic程序設(shè)計上機(jī)實驗教程
- 響應(yīng)式架構(gòu):消息模式Actor實現(xiàn)與Scala、Akka應(yīng)用集成
- Java并發(fā)編程:核心方法與框架
- 零基礎(chǔ)學(xué)HTML+CSS第2版
- SAP Web Dynpro for ABAP開發(fā)技術(shù)詳解:基礎(chǔ)應(yīng)用
- Python趣味創(chuàng)意編程
- 輕松學(xué)Scratch 3.0 少兒編程(全彩)
- Python程序設(shè)計現(xiàn)代方法
- Selenium Essentials
- Opa Application Development