How to get in runtime the android "version name" string setted in export.cfg ?

linkoboylinkoboy Posts: 4Member

Hi, I would like to show the android version name in the title screen of my app compiled for android. Is there a way to get the version name string setted in export.cfg in [platform:Android] section ?

[platform:Android]
.....
version/code=2
version/name="0.1"
Tagged:

Tags :

Answers

  • kow__kow__ Posts: 13Member
    Answer ✓

    Just open engine.cfg with a text editor and add the strings you want, like:

    [platform.android]

    version="0.1"
    code_version="2.0"

    Then, in game, you can access those using Globals.get("platform.android/version") and Globals.get("platform.android/code_version").

    Of course you can name the section and the keys however you want, just treat it like a normal .cfg file.

    (Sorry for the quote tag instead of the code one, but I don't know what is the code for multiline code)

  • linkoboylinkoboy Posts: 4Member

    Thanks, I'll do this way.

Sign In or Register to comment.