{"id":21898093,"url":"https://github.com/jakobbbb/unitynativeandroidcmake","last_synced_at":"2026-04-17T10:02:07.374Z","repository":{"id":259073770,"uuid":"876160650","full_name":"jakobbbb/UnityNativeAndroidCMake","owner":"jakobbbb","description":"CMake-based setup for developing native Unity plugins for Android","archived":false,"fork":false,"pushed_at":"2024-11-22T16:24:32.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T06:11:58.619Z","etag":null,"topics":["android","cmake","native-plugin","unity"],"latest_commit_sha":null,"homepage":"","language":"Mathematica","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakobbbb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T13:55:20.000Z","updated_at":"2024-11-22T16:24:36.000Z","dependencies_parsed_at":"2024-11-21T16:32:01.633Z","dependency_job_id":"f09a7453-9069-4538-b64e-a1f97a8f4166","html_url":"https://github.com/jakobbbb/UnityNativeAndroidCMake","commit_stats":null,"previous_names":["jakobbbb/unitynativeandroidtest","jakobbbb/unitynativeandroidcmake"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobbbb%2FUnityNativeAndroidCMake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobbbb%2FUnityNativeAndroidCMake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobbbb%2FUnityNativeAndroidCMake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobbbb%2FUnityNativeAndroidCMake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakobbbb","download_url":"https://codeload.github.com/jakobbbb/UnityNativeAndroidCMake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244908483,"owners_count":20530049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","cmake","native-plugin","unity"],"created_at":"2024-11-28T14:23:35.151Z","updated_at":"2026-04-17T10:02:02.312Z","avatar_url":"https://github.com/jakobbbb.png","language":"Mathematica","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnityNativeAndroidCMake\n\nThis repo contains a simple CMake-based setup for developing native\nUnity plugins for Android as well as Linux and Windows.\n\nThe `./NativePlugin` directory contains code to build a sample plugin,\nwhile `./UnityProject` contains a sample Unity project for this plugin.\nBefore opening the project, you must first compile the native plugin.\n\n## Setup\n\nThis repo is configured to work out of the box with the included plugin\nand Unity project, as well as given that your Unity Editor is installed\nvia Unity Hub at the default location and with NDK (i.e. Android Build\nSupport) included.  If this is not the case on your system, or you wish\nto adapt the CMake setup for your own needs, please consider the\nfollowing:\n\nA Unity project into which the plugin is to be installed must be\nspecified.  This is set to `./UnityProject` by default and can be\noverridden by setting the `UNITY_PROJECT_DIR` CMake flag.\n\nGiven the Unity project, the CMake setup will extract the project's\nUnity version and attempt to locate both the Unity Editor (for inclusion\nof the Unity header files) as well as the NDK (for native compilation on\nAndroid).\n\nIf your Unity editor is not installed at the default location\n(`~/Unity/Hub/Editor/\u003cVERSION\u003e/Editor` on Linux,\n`C:/Program Files/Unity/Hub/Editor/\u003cVERSION\u003e/Editor\"` on Windows),\nset the `UNITY_EDITOR` flag accordingly.  Note that the directory this\npoints to should contain the Unity executable.\n\nIf you're not using the NDK supplied with Unity, you must set the\n`ANDROID_NDK` flag to the NDK directory.  Note that this is the\ndirectory containing the `ndk-build` and `ndk-gdb` scripts, among\nothers.\n\n\n## Building on Linux\n\nThe following will build the plugin and copy it to the Unity project's\nplugin directory:\n\n```bash\ncd NativePlugin\nmake clean \u0026\u0026 make\n```\n\nYou can specify CMake flags for the Unity project directory, as well as\nthe Unity Editor and NDK locations as follows:\n```bash\nmake CMAKE_FLAGS=\"-DUNITY_PROJECT_DIR=/path/to/project -DUNITY_EDITOR=/path/to/Editor -DANDROID_NDK=/path/to/NDK\"\n```\n\n### Building for Android on Linux\nInstead of just running `make`, run `make anrdoid`.  You may have to run\n`make clean` beforehand.\n\n## Note: Installation to the Unity Project\n\nThe plugin will be installed into the Unity project, e.g. at\n`Assets/Plugins/Linux/libNativePlugin.so` or\n`/Assets/Plugins/Windows/NativePlugin.dll`.\nNote that each plugin must have an associated `.meta` file specifying\nwhich platforms to run the plugin on.\nThese are located in `NativePlugin/meta` and copied to the project's\n`Assets` directory along with the native library itself.\n\nThis is done because Unity will automatically delete any `.meta` files\nreferencing files that do not exist.  That is, opening the project on\nLinux would auto-delete `NativePlugin.dll.meta`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobbbb%2Funitynativeandroidcmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakobbbb%2Funitynativeandroidcmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobbbb%2Funitynativeandroidcmake/lists"}