Announcement

Collapse
No announcement yet.

Where is GameActivity.java stored before setup?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Where is GameActivity.java stored before setup?

    Hi

    I'm using UE built from sources and need to make changes to GameActivity.java

    After engine is set up this file is stored in Engine\Build\Android\Java\src\com\epicgames\ue4\

    But it is being overwritten every time engine is installed


    So my questions are

    - Where does the engine gets GameActivity file?

    - Where is the best place to do changes to GameActivity.java,
    to put them under source control
    so I can share the code with the team?

    Thanks in advance

    #2
    The template GameActivity.java is in Engine/Build/Android/Java/src/com/epicgames/ue4 but a new version is generated any time you package or launch on. This one ends up in Intermediate/Android/APK/src/com/epicgames/ue4.

    The best way to make changes to GameActivity.java is to use UPL (Unreal Plugin Language). There are sections within GameActivity which you may insert code documented in UnrealPluginLanguage.cs. All you need to do is register your UPL XML file in a Build.cs for the Android target. Look at GearVR.Build.cs and GearVR_APL.xml for examples.

    Comment

    Working...
    X