Esempio n. 1
0
    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
        QuestionController2 questionController2 = (QuestionController2)target;

        QuestionController2[] allQuestionController2Components = questionController2.gameObject.GetComponents <QuestionController2>();//obtem todos os QuestionController2 no objeto
        if (allQuestionController2Components.Length > 1)
        {
            Debug.LogError("AR Educational Framework Message: The GameObject: " + questionController2.name + " has several QuestionController2 component, multiple QuestionController2 component in the same GameObject is not supported. please remove and add one of them in other GameObject.");
        }
    }
Esempio n. 2
0
    [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 <QuestionController2>();
    }