Giter VIP home page Giter VIP logo

google-services-unity's Introduction

Google Service Unity Plugin

Google Service Unity Plugin is a Unity Plugin For Google Service.Include Google Admob Unity,Firebase Analytic Unity,Google Game API Unity. Login,Achievement,Leaderboard,Event,Quest,Snapshot,RealTimePlayGame,TurnbasedPlayGame API are supported and easy to use with c# or js.

Unity Plugin Wiki and Documentation

Quick Start

Installation Google Play Game Service Unity Plugin

  1. Open your project in the Unity editor.
  2. Navigate to Assets -> Import Package -> Custom Package.
  3. Select the google_service_unity_plugin.unitypackage file.
  4. Import all of the files for the plugins by selecting Import. Make sure to check for any conflicts with files.playgamedemo.cs and game.unity is demo file can be ignored.
  5. replace all "com.google.demo" with your app package id in AndroidManifest.xml
  6. replace app_id content with your google play game id,replace google_app_id content with your google firebase app id in ids.xml
  7. replace google-services.json with your json file

Show Admob Ads in Unity game

using admob;
Admob.Instance().initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910");
Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 30, "defaultBanner");

just 2 line code,admob banner will been shown on screen.for more usage Unity Admob Tutorial

Analytic Unity game with firebase Analytic

using google.service.game;
FirebaseAnalytic.Instance().logEvent("appstart", "{\"time\":\"112222\",\"name\":\"demouser\"}");

Log Event with Firebase Analytic.For more usage about Firebase Analytic Unity Unity Firebase Analytic Tutorial

Using Google Play Game Achievements and Leaderboards in Unity game

  1. Login with google play service
	using google.service.game;
	GoogleGame.Instance().login (true, false);
  1. You can call google play game api after login success such as show Leaderboards with default UI
	GoogleGame.Instance().showLeaderboards();
  1. Show Google play game Achievements with default UI
	GoogleGame.Instance().showAchievements();

4.Fore more usage about google play game service in unity Unity Google Play Game Tutorial

ScreenShot

Project Home https://github.com/unity-plugins/google-play-game-service-unity-plugin/

google-services-unity's People

Watchers

 avatar  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.