- Unity Game Optimization
- Dr. Davide Aversa Chris Dickinson
- 214字
- 2021-06-24 12:12:59
Verifying script presence
Sometimes, there are things we expect to see, but don't. These are usually easy to spot because the human brain is very good at pattern recognition and spotting differences we didn't expect. However, there are also times where we assume that something has been happening, but it didn't. These are generally more difficult to notice, because we're often scanning for the first kind of problem, and we’re assuming that the things we don't see are working as intended. In the context of Unity, one problem that manifests itself this way is verifying that the scripts we expect to be operating are actually present in the scene.
Script presence can be quickly verified by typing the following into the Hierarchy window textbox:
t:<monobehaviour name>
For example, typing t:mytestmonobehaviour (note that it is not case-sensitive) into the Hierarchy textbox will show a shortlist of all GameObjects that currently have at least one MyTestMonoBehaviour script attached as a component.
We should also double check that the GameObjects they are attached to are still enabled, since we may have disabled them during earlier testing since someone or something may have accidentally deactivated the object.
- Clojure Programming Cookbook
- 小程序?qū)崙?zhàn)視頻課:微信小程序開發(fā)全案精講
- Rust編程:入門、實戰(zhàn)與進(jìn)階
- 少年輕松趣編程:用Scratch創(chuàng)作自己的小游戲
- Python數(shù)據(jù)分析從0到1
- Go并發(fā)編程實戰(zhàn)
- Jenkins Continuous Integration Cookbook(Second Edition)
- jQuery炫酷應(yīng)用實例集錦
- 用戶體驗可視化指南
- Java程序員面試筆試寶典(第2版)
- 案例式C語言程序設(shè)計實驗指導(dǎo)
- PHP 7從零基礎(chǔ)到項目實戰(zhàn)
- Arduino Wearable Projects
- 寫給大家看的Midjourney設(shè)計書
- Java自然語言處理(原書第2版)