GithubHelp home page GithubHelp logo

firebase / firebase-unity-sdk Goto Github PK

View Code? Open in Web Editor NEW
194.0 48.0 31.0 12.65 MB

The Firebase SDK for Unity

Home Page: http://firebase.google.com

License: Apache License 2.0

CMake 4.53% Python 13.76% SWIG 9.89% C# 67.31% C++ 3.46% Shell 0.39% Objective-C 0.24% JavaScript 0.05% Kotlin 0.10% Swift 0.26%
firbase-database firebase firebase-analytics firebase-auth firebase-authentication firebase-cloud-messaging firebase-firestore firebase-functions firebase-remote-config firebase-storage

firebase-unity-sdk's Introduction

Firebase Unity Open Source Development

The repository contains the Firebase Unity SDK source, with support for Android, iOS, and desktop platforms. Note that desktop is only supported for development purposes. It includes the following Firebase libraries:

Firebase is an app development platform with tools to help you build, grow and monetize your app. More information about Firebase can be found at https://firebase.google.com.

More information about the Firebase Unity SDK can be found at https://firebase.google.com/docs/unity/setup. Samples on how to use the Firebase Unity SDK can be found at https://github.com/firebase/quickstart-unity.

Table of Contents

Getting Started

You can clone the repo with the following command:

git clone https://github.com/firebase/firebase-unity-sdk.git

Prerequisites

Please follow Firebase C++ SDK Prerequisites first.

  • Swig, version 4 or newer

Install Unity

  • Unity, version 2019 or newer

While installing through UnityHub, when you decide which version to install, it will pop up a dialog to select necessary support modules. Please check the boxes based on your dev machine OS and dev platform. For most common case while dev on macOS, we should select Android + Android SDK & NDK Tool, iOS Build Support and Mac Build Support (IL2CPP)

Building

Under the repo root folder, call

python scripts/build_scripts/build_zips.py --platform=<target platform>

Note: Supported target platform names: linux,macos,windows,ios,android

Expected output artifact is [Repo Root]/<platform_unity, eg macos_unity>/firebase_unity-< version >-< platform >.zip

Note:

  • Linux zip requires linux machine to build.
  • Windows zip requires windows machine to build
  • macOS, iOS and android zips can be built by mac.(Although android zip could be built on both linux and windows machine as well, but we recommend to run it with mac, to get align with our CI)

Building for certain library

python scripts/build_scripts/build_zips.py --platform=<target platform> --targets=<lib1> --targets=<lib2>

Note: Supported library names: analytics, app_check, auth, crashlytics, database, dynamic_links, firestore, functions, installations, messaging, remote_config, storage

Packaging

We can package the built artifacts to better imported by Unity Editor.

Packaging unitypackage

Copy the zip file for each platforms to one folder, referred to as assets_zip_dir below, for example usually looks like this

  • firebase_unity-< version >-Android.zip
  • firebase_unity-< version >-Darwin.zip
  • firebase_unity-< version >-Linux.zip
  • firebase_unity-< version >-iOS.zip
  • firebase_unity-< version >-win64.zip

And then run:

python scripts/build_scripts/build_package.py --zip_dir=<assets_zip_dir> --output=<output dir>

Packaging tgz

With the same assets_zip_dir, we can run:

python scripts/build_scripts/build_package.py --zip_dir=<assets_zip_dir> --output=<output dir> --output_upm=True

Packing for certain library

If we build only certain subset of the libraries like in Building for certain library, we can copy the built artifacts into assets_zip_dir, and then run:

python scripts/build_scripts/build_package.py --zip_dir=<assets_zip_dir> --output=<output dir> --apis=<lib1,lib2>

Including in Project

We can refer to Firebase Unity Installation Options to learn how to import the unitypacakge or tgz files that packaged.

Contributing

We love contributions, but note that we are still working on setting up our test infrastructure, so we may choose not to accept pull requests until we have a way to validate those changes on GitHub. Please read our contribution guidelines to get started.

License

The contents of this repository is licensed under the Apache License, version 2.0.

Your use of Firebase is governed by the Terms of Service for Firebase Services.

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.