官术网_书友最值得收藏!

Time for action – Make the ball re-appear

  1. Double-click on the DisappearMe script. MonoDevelop will open up and display the script.
  2. Change the word false to true.
  3. Save the script.
  4. Click on the Play button to test your game.

    Your script should look like this:

    function Update () {
       renderer.enabled = true;
    }

Bingo! The Ball started out invisible and then magically appeared. That means that the Mesh Renderer component and the renderer that we referred to in our script are the same thing. And the checkbox in the Inspector panel is actually the enabled property in checkbox form—instead of true and false, it shows us checked and unchecked states! In fact, you can even keep an eye on the checkbox when you click on Play and see it change states. That tingling sensation means it's working.

主站蜘蛛池模板: 二连浩特市| 互助| 柳江县| 抚宁县| 故城县| 松原市| 河津市| 驻马店市| 城步| 德格县| 老河口市| 定南县| 五华县| 宕昌县| 封开县| 莒南县| 浦城县| 凤凰县| 泰兴市| 柏乡县| 望城县| 文安县| 东兰县| 乌鲁木齐市| 博客| 瑞丽市| 武夷山市| 鱼台县| 巴中市| 遂溪县| 惠水县| 嵊泗县| 平遥县| 乌鲁木齐市| 西安市| 綦江县| 定远县| 开远市| 高雄市| 余干县| 满洲里市|