private void OnEnable() { active = serializedObject.FindProperty("active");//NOTA-SE QUE ESTA SE ACESSANDO AO CAMPO active E NAO A PROPRIEDADE Active marker = serializedObject.FindProperty("marker"); answerAlternatives = serializedObject.FindProperty("answerAlternatives"); correctAnswerIndex = serializedObject.FindProperty("correctAnswerIndex"); leftButton = serializedObject.FindProperty("leftButton"); rightButton = serializedObject.FindProperty("rightButton"); checkButton = serializedObject.FindProperty("checkButton"); resetButton = serializedObject.FindProperty("resetButton"); useNextQuestionButton = serializedObject.FindProperty("useNextQuestionButton"); nextQuestionButton = serializedObject.FindProperty("nextQuestionButton"); nextQuestion = serializedObject.FindProperty("nextQuestion"); usePreviousQuestionButton = serializedObject.FindProperty("usePreviousQuestionButton"); previousQuestionButton = serializedObject.FindProperty("previousQuestionButton"); previousQuestion = serializedObject.FindProperty("previousQuestion"); randomOptions = serializedObject.FindProperty("randomOptions"); correctAnswerImage = serializedObject.FindProperty("correctAnswerImage"); wrongAnswerImage = serializedObject.FindProperty("wrongAnswerImage"); useTime = serializedObject.FindProperty("useTime"); timeDependingOfMarker = serializedObject.FindProperty("timeDependingOfMarker"); totalTime = serializedObject.FindProperty("totalTime"); timeText = serializedObject.FindProperty("timeText"); useAlertTime = serializedObject.FindProperty("useAlertTime"); alertTime = serializedObject.FindProperty("alertTime"); newTextColor = serializedObject.FindProperty("newTextColor"); additionalElements0 = serializedObject.FindProperty("additionalElements0"); additionalElements1 = serializedObject.FindProperty("additionalElements1"); additionalElements2 = serializedObject.FindProperty("additionalElements2"); useAnswerButton = serializedObject.FindProperty("useAnswerButton"); answerButton = serializedObject.FindProperty("answerButton"); useDefaultAnswer = serializedObject.FindProperty("useDefaultAnswer"); additionalElements3 = serializedObject.FindProperty("additionalElements3"); //MENSAGEM DE ERRO I_QuestionController2 I_QuestionController2 = (I_QuestionController2)target; I_QuestionController2[] allI_QuestionController2Components = I_QuestionController2.gameObject.GetComponents <I_QuestionController2>();//obtem todos os I_QuestionController2 no objeto if (allI_QuestionController2Components.Length > 1) { Debug.LogError("AR Educational Framework Message: The GameObject: " + I_QuestionController2.name + " has several I_QuestionController2 component, multiple I_QuestionController2 component in the same GameObject is not supported. please remove and add one of them in other GameObject."); } }
[HideInInspector] public bool firstTime = true; //variavel para executar uma unica ves o codigo, lembrando que está sendo usado [ExecuteInEditMode] private void Awake() { questionController2 = gameObject.GetComponent <I_QuestionController2>(); }