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
        useMarker                = serializedObject.FindProperty("useMarker");
        marker                   = serializedObject.FindProperty("marker");
        useQuestionObjects       = serializedObject.FindProperty("useQuestionObjects");
        questionObjects          = serializedObject.FindProperty("questionObjects");
        typeOfAnswerAlternatives = serializedObject.FindProperty("typeOfAnswerAlternatives");
        texts                         = serializedObject.FindProperty("texts");
        images                        = serializedObject.FindProperty("images");
        correctAnswerIndex            = serializedObject.FindProperty("correctAnswerIndex");
        alternativesDependingOfMarker = serializedObject.FindProperty("alternativesDependingOfMarker");
        useTextBackGround             = serializedObject.FindProperty("useTextBackGround");
        textBackGroundImage           = serializedObject.FindProperty("textBackGroundImage");
        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");
        correctAnswerImage2           = serializedObject.FindProperty("correctAnswerImage2");
        additionalElements3           = serializedObject.FindProperty("additionalElements3");

        //MENSAGEM DE ERRO
        QuestionController1 questionController1 = (QuestionController1)target;

        QuestionController1[] allQuestionController1Components = questionController1.gameObject.GetComponents <QuestionController1>();//obtem todos os QuestionController1 no objeto
        if (allQuestionController1Components.Length > 1)
        {
            Debug.LogError("AR Educational Framework Message: The GameObject: " + questionController1.name + " has several QuestionController1 component, multiple QuestionController1 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()
    {
        questionController1 = gameObject.GetComponent <QuestionController1>();
    }