Source Academy Modules
    Preparing search index...

    Function query_id

    • Queries the id of the GameObject. The id of a GameObject is in the order of creation, starting from 0.

      Parameters

      • gameObject: GameObject

        GameObject reference

      Returns number

      the id of the GameObject reference

      const id0 = create_text('This has id 0');
      const id1 = create_text('This has id 1');
      const id2 = create_text('This has id 2');
      queryGameObjectId(id2);