Source Academy Modules
    Preparing search index...

    Function update_text

    • Updates the text of the TextGameObject.

      Parameters

      • textGameObject: TextGameObject

        TextGameObject reference

      • text: string

        The updated text of the TextGameObject

      Returns GameObject

      the GameObject reference passed in

      Error if not a TextGameObject is passed in

      update_text(create_text('Hello world!'), 'Goodbye world!');