Giter Site home page Giter Site logo

vlad-zumer / godotandroidplugindemo Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 847 KB

This is a demo of how to create a custom android plugin. Use this as a baseline for your plugins.

License: MIT License

Java 76.89% GAP 23.11%
godot godot-plugin android godot-android

godotandroidplugindemo's Introduction

GodotAndroidPluginDemo

This is a demo of how to create a custom android plugin.

Use this as a baseline for your plugins.

Structure


  • AndroidPlugin - Android studio project that builds the plugin
    • DemoLib - The actual library to be built
  • GodotPlugin - Files to necessary for Godot to recognise the plugin
  • GodotProject - Sample Godot project that shows how tot use plugin

Setup


1. Building the library and running the Godot project

  1. Replace GodotAndroidPluginDemo\AndroidPlugin\godot-lib.release\godot-lib.release.aar with the Godot engine library of your choosing
    1. Download the Godot engine library
    2. Copy to the specified location
    3. Delete current godot-lib.release.aar
    4. Rename the downloaded file to godot-lib.release.aar
  2. Run gradlew build in GodotAndroidPluginDemo\AndroidPlugin
  3. Copy GodotAndroidPluginDemo\AndroidPlugin\DemoLib\build\outputs\aar\DemoLib-release.aar to GodotAndroidPluginDemo\GodotPlugin
  4. Rename DemoLib-release.aar to DemoPlugin.aar
  5. Copy both files from GodotAndroidPluginDemo\GodotPlugin to GodotAndroidPluginDemo\GodotProject\android\plugins
  6. Follow these steps to set up Godot to build for android
  7. Build the godot project and run
    • Export apk and install on phone
    • Activate developer mode on android and enable USB debugging in developer options

2. Customizing the project

  1. Open GodotAndroidPluginDemo\AndroidPlugin project in Android Studio
  2. Modify AndroidPlugin\DemoLib\AndroidManifest.xml for requirements
  3. Modify AndroidPlugin\DemoLib\src\main\java\com\gd\android\demolib\InstantiateSingleton.java for functionality

Maintenance


In GodotAndroidPluginDemo\AndroidPlugin\DemoLib\src\main\AndroidManifest.xml change android:name in the <meta-data\> tag to point to the latest version (e.g. godotengine.plugin.v##.[Name])

godotandroidplugindemo's People

Contributors

vlad-zumer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.