Search Unity

how to force unity inspector to update?

Discussion in 'Editor & General Support' started by FalsAlarm, Nov 15, 2017.

  1. FalsAlarm

    FalsAlarm

    Joined:
    Dec 12, 2016
    Posts:
    21
    I have attached a script to my gameobject in the inspector. I've added some public properties. How do I force the inspector to update and see the public properties as they haven't yet updated to show the public properties so I can assign Text objects to them?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.UI;
    5. using UnityEngine.SceneManagement;
    6.  
    7. public class StartSceneManager : MonoBehaviour {
    8.  
    9.     //the below public fields do not show up in Unity inspector yet?
    10.     public Text startText;
    11.     public Text quitText;
    12.  
    13.     // Use this for initialization
    14.     void Start () {
    15.        
    16.     }
    17.    
    18.     // Update is called once per frame
    19.     void Update () {
    20.        
    21.     }
    22.  
    23.     void StartTextClickHandler()
    24.     {
    25.         SceneManager.LoadScene("GameScene");
    26.     }
    27.  
    28.     void QuitTextClickHandler()
    29.     {
    30.         Application.Quit;
    31.     }
    32. }
    33.  
     
  2. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    357
    There's an error in your script. Line 30 should be;
    Code (CSharp):
    1. Application.Quit();
     
  3. FalsAlarm

    FalsAlarm

    Joined:
    Dec 12, 2016
    Posts:
    21
  4. FalsAlarm

    FalsAlarm

    Joined:
    Dec 12, 2016
    Posts:
    21
    why didnt the IDE notify me?