public override void OnInspectorGUI() { AskQuestionType4 askQuestion = (AskQuestionType4)target; if (GUILayout.Button("Demander une question")) { askQuestion.Ask_Question(); } base.OnInspectorGUI(); }
// Use this for initialization void Start() { GameData = GameObject.Find("Game Data"); DataScript = GameData.GetComponent <GameData>(); isAnsweringQuestion = false; askQuestionType1 = gameObject.GetComponent <AskQuestionType1>(); askQuestionType2 = gameObject.GetComponent <AskQuestionType2>(); askQuestionType3 = gameObject.GetComponent <AskQuestionType3>(); askQuestionType4 = gameObject.GetComponent <AskQuestionType4>(); askQuestionType5 = gameObject.GetComponent <AskQuestionType5>(); TexteScore.text = "Score: 0"; DisableMessageText(); QuestionCanvas.enabled = false; NbQuestion = 1; TexteScore.enabled = true; }