- 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.
推薦閱讀
- 數據科學實戰手冊(R+Python)
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- Python 3破冰人工智能:從入門到實戰
- MATLAB 2020從入門到精通
- Mastering AWS Security
- Serverless Web Applications with React and Firebase
- Mastering VMware Horizon 7(Second Edition)
- Java Hibernate Cookbook
- Keil Cx51 V7.0單片機高級語言編程與μVision2應用實踐
- Test-Driven iOS Development with Swift
- MySQL數據庫教程(視頻指導版)
- Swift Essentials(Second Edition)
- Java程序設計基礎教程
- The Python Apprentice
- Python大數據與機器學習實戰