Skip to content

Commit 9a2b56e

Browse files
authored
Merge pull request godotengine#10758 from WSQS/patch-1
Update android_library.rst
2 parents 482b646 + 69ef020 commit 9a2b56e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tutorials/platform/android/android_library.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,19 @@ Below we break-down the steps used to create the GLTF Viewer app.
179179
to the Android app's ``assets`` directory.
180180
Using this approach requires passing the ``--main-pack <pck_or_zip_filepath_relative_to_assets_dir>`` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() <https://github.com/godotengine/godot/blob/6916349697a4339216469e9bf5899b983d78db07/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java#L45>`_.
181181

182+
Example:
183+
184+
.. code-block:: java
185+
186+
@Override
187+
public List<String> getCommandLine(){
188+
List<String> results = new ArrayList<>();
189+
results.addAll(super.getCommandLine());
190+
results.add("--main-pack");
191+
results.add("res://foo.pck");
192+
return results;
193+
}
194+
182195
The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory.
183196

184197

0 commit comments

Comments
 (0)