Git Product home page Git Product logo

google / mechahamster Goto Github PK

View Code? Open in Web Editor NEW
498.0 53.0 245.0 354.8 MB

Mecha Hamster is a game where you roll through customizable environments that you can share with your friends.

Home Page: https://google.github.io/mechahamster/

License: Apache License 2.0

C# 97.01% Objective-C 0.25% Objective-C++ 0.38% ShaderLab 0.73% JavaScript 1.63%
firebase firebase-analytics firebase-auth firebase-database firebase-cloud-messaging firebase-appinvites firebase-remote-config unity3d firebase-unity firebase-test-lab

mechahamster's Introduction

MechaHamster {#mechahamster_readme}

MechaHamster is a game about guiding a futuristic hamster ball through dangerous space mazes, create mazes of their own, and share them with friends. Can you guide Major Hammy D. Hamster to safety?

Motivation

MechaHamster serves as a demonstration, sample, and reference for integrating Firebase with the Firebase Unity SDK, and Daydream with the Google VR SDK for Unity into a game project.

Overview

MechaHamster demonstrates the following concepts:

Downloading

MechaHamster source code can be downloaded from Github.

If cloning locally using git clone, be sure to use the --recurse-submodules flag to ensure required scripts from submodules are present.

And download the game to your mobile device from the AppStore and Google Play Store

AppStore
PlayStore

Building

  • Open the project in at least Unity 5.6 beta, this is required for the Google VR SDK for Unity.
  • Download the Firebase Unity SDK and unzip.
  • Import the following plugins - using Assets > Import Package > Custom Package menu item - from the Firebase Unity SDK:
    • FirebaseAnalytics.unitypackage
    • FirebaseAuth.unitypackage
    • FirebaseCrashlytics.unitypackage (Beta)
    • FirebaseDatabase.unitypackage
    • FirebaseMessaging.unitypackage
    • FirebaseRemoteConfig.unitypackage
    • FirebaseStorage.unitypackage
  • Select a target platform (iOS or Android) using the File > Build Settings menu option.
  • Add Firebase to your app. For more information see Building MechaHamster.
  • Wait for the spinner (compiling) icon to stop in the bottom right corner of the Unity status bar.
  • Finally, select the File > Build Settings menu option then click Build and Run.

MechaHamster currently only works with .NET 3.x. If Firebase Unity SDK version is 5.4.0 or above, please import plugins from dotnet3 folder. And make sure Scripting Runtime Version in Edit > Project Settings > Player is set to .NET 3.x, ex. Stable (.NET 3.5 Equivalent) in Unity 2017

Documentation

For more information about MechaHamster see [MechaHamster Document][] To contribute the this project see CONTRIBUTING.

mechahamster's People

Contributors

a-maurice avatar chialingc avatar chkuang-g avatar davidair avatar dzlier-gcp avatar fredsa avatar kiranchhetri1 avatar kiwihilton avatar mwgray avatar paulozemek-google avatar ryanmeier avatar schnecle avatar stewartmiles avatar tjohns avatar waheedbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mechahamster's Issues

IOS: The default Firebase app has not yet been configured

Hi i added firebase to my app, i get this error after integration of the analytics in my project on IOS

2020-03-26 16:23:48.317131+0100 BasketColors[1383:652946] 6.17.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.

There is nothing online to fix it....any help?

Game Save Firebase !

I'm doing a 2d platform game at Unity 2017, and I'd like to know if it's possible to save the punctuation lines etc ... in the Firebase and if you have some example for me to study! Forced!

Getting bunch of errors while integrating unity as library into ios native project, in which both unity and native project contains Firebase libraries.

I have an iOS native project and a Unity project.

What i am trying to achieve? - On a button click from the native ios app, i want to show unity in which both the native and ios project contains firebase dependencies.
What i am actually getting? - When i try to run the app in xcode, i am getting following errors (almost 4000 similar error but for different Targets):
"Multiple commands produce '/Users/M_742794/Library/Developer/Xcode/DerivedData/MarkersLab-gpaeablwazuyowbfwysavwxcotrv/Build/Products/Debug-iphoneos/BoringSSL-GRPC/openssl_grpc.framework/Headers/cipher.h':

Target 'BoringSSL-GRPC' (project 'Pods') has copy command from '/Users/M_742794/Developer/iOS/Development/iOS AR Build/Pods/BoringSSL-GRPC/src/include/openssl/cipher.h' to '/Users/M_742794/Library/Developer/Xcode/DerivedData/MarkersLab-gpaeablwazuyowbfwysavwxcotrv/Build/Products/Debug-iphoneos/BoringSSL-GRPC/openssl_grpc.framework/Headers/cipher.h'
Target 'BoringSSL-GRPC' (project 'Pods') has copy command from '/Users/M_742794/Developer/iOS/Development/unity-AR-Build/Pods/BoringSSL-GRPC/src/include/openssl/cipher.h' to '/Users/M_742794/Library/Developer/Xcode/DerivedData/MarkersLab-gpaeablwazuyowbfwysavwxcotrv/Build/Products/Debug-iphoneos/BoringSSL-GRPC/openssl_grpc.framework/Headers/cipher.h'"
Steps i followed for unity integration to my native project -

imported Firebase libraries like Auth, storage, firestore, core in unity and created an iOS build.
Podfile has been generated after the build and i installed the firebase pods.
I have added the Unity-iPhone.xcodeproj along with its Pods.xcodeproj to my native project workspace with the project structure as below(masked is my native xcodeproj): Screenshot 2021-11-22 at 2 10 07 PM

  1. followed the steps mentioned in this uaal link https://github.com/Unity-Technologies/uaal-example/blob/master/docs/ios.md properly like: 1. Added UnityFramework.framework to the native app general settings framework, libraries and embedded content and removed the same from Build phases Link binary with libraries section. 2. Added Unity-iPhone.xcodeproj's Data folder target membership to UnityFramework. 3. Added Unity-iPhone.xcodeproj's NativeCallProxy file target membership to UnityFramework with public access. 4. made code changes in native project to show unity on button click.
    I have firebase dependencies in my native xcode project as well as unity xcode project and the podfiles are as below:

Unity Xcode project Podfile: Screenshot 2021-11-22 at 2 22 36 PM

Native Xcode project Podfile: Screenshot 2021-11-22 at 2 23 02 PM

I have installed the pods for both the projects and started building in xcode.

The build is failing with number of "Multiple commands produce" errors: Error

The errors might be causing due to firebase dependency in both native and unity projects but could not find proper solution for this issue.
I am expecting solutions from this group for my problem, Thanks!

Issue on analytics

Hi i added firebase to my app, i get this error after integration of the analytics in my project on IOS

2020-03-26 16:23:48.317131+0100 BasketColors[1383:652946] 6.17.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.

There is nothing online to fix it....any help?

namespace Firebase not found (new download)

I'm updating Firebase in Unity project (it's been at least 2 years) and having lots of trouble. I downloaded this example and it doesn't even build in Unity 2017.4 getting: error CS0246: The type or namespace name 'Firebase' could not be found. Are you missing an assembly reference?

I'm getting this same type of error in my project with the new firebase, it's like the Editor scripts are missing.

[Unity 2018.2.5f1] Network updates

Hi guys,

I am trying to use the project to learn about Firebase structure for Unity, but I am using now the latest Unity version.
And so, as expected from the latest Unity Report, the Network used until 2018 version was completely removed.

The issues appeared on 'WaitingForDBLoad.cs' class, those is trying to access and check for connection to prevent bad function.

On Unity Console, is suggesting to use Unity Multiplayer and NetworkIdentity instead. But, how I can do this changes without change the code structure?

Best regards,
Vinícius

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • Assets/Plugins/Android/libs/armeabi-v7a/libaudioplugingvrunity.so
  • Assets/Plugins/Android/libs/x86/libaudioplugingvrunity.so
  • Assets/Plugins/Google.ProtocolBuffers.dll
  • Assets/Plugins/x86/audioplugingvrunity.dll
  • Assets/Plugins/x86_64/audioplugingvrunity.bundle
  • Assets/Plugins/x86_64/audioplugingvrunity.dll
  • Assets/Plugins/x86_64/libaudioplugingvrunity.so

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Stuck on loading screen. iOS. 12.1 12.0

I got as far as creating an account then it got stuck on loading. I let it run several minutes and it clearly wasn’t running. I re-booted the device, up dated the os neither worked so I deleted the app and reboot. Still stuck on loading as soon as I launch.

[iOS] App is only listed in US App Store!

I just tried downloading MechaHamster on the iOS App Store, and it is not possible. You guys listed it only in the US App Store. The rest of the world is left out.....

Game Save Firebase !

I'm doing a 2d platform game at Unity 2017, and I'd like to know if it's possible to save the punctuation lines etc ... in the Firebase and if you have some example for me to study! Forced!

Tanks man !

Download firebase SDK, the Unity project has problems

I download firebase sdk and mechahamster-master.zip and import them to Unity . But Unity appears some errors as below:

Severity Code Description Project File Line Suppression State Error CS0117 'FirebaseApp' does not contain a definition for 'CheckDependencies' Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\MainGame.cs 203 Active Error CS0117 'FirebaseApp' does not contain a definition for 'CheckDependencies' Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\MainGame.cs 207 Active Error CS1061 'FirebaseApp' does not contain a definition for 'SetEditorDatabaseUrl' and no accessible extension method 'SetEditorDatabaseUrl' accepting a first argument of type 'FirebaseApp' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\MainGame.cs 247 Active Error CS1061 'LeaderboardController' does not contain a definition for 'AddScore' and no accessible extension method 'AddScore' accepting a first argument of type 'LeaderboardController' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 50 Active Error CS1061 'LeaderboardController' does not contain a definition for 'AllScoreDataPath' and no accessible extension method 'AllScoreDataPath' accepting a first argument of type 'LeaderboardController' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 36 Active Error CS1061 'LeaderboardController' does not contain a definition for 'enabled' and no accessible extension method 'enabled' accepting a first argument of type 'LeaderboardController' could be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 35 Active Error CS0234 The type or namespace name 'Editor' does not exist in the namespace 'Firebase.Unity' (are you missing an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\MainGame.cs 20 Active Error CS0234 The type or namespace name 'Editor' does not exist in the namespace 'Firebase.Unity' (are you missing an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\MainGame.cs 20 Active Error CS0234 The type or namespace name 'Leaderboard' does not exist in the namespace 'Firebase' (are you missing an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 18 Active Error CS0234 The type or namespace name 'Leaderboard' does not exist in the namespace 'Firebase' (are you missing an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 18 Active Error CS0246 The type or namespace name 'LeaderboardController' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 30 Active Error CS0246 The type or namespace name 'LeaderboardController' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 32 Active Error CS0246 The type or namespace name 'UserScore' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 73 Active Error CS0246 The type or namespace name 'UserScore' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharpC:\Unity\test\FirebaseTest\Assets\Hamster\Scripts\States\UploadTime.cs 74 Active

Connect to my analytical account

Hi i added firebase to my app, i get this error after integration of the analytics in my project on IOS

2020-03-26 16:23:48.317131+0100 BasketColors[1383:652946] 6.17.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.

There is nothing online to fix it....any help?

DllNotFoundException: FirebaseCppApp-8_1_0 assembly:<unknown assembly> type:<unknown type> member:(null)

I get this error when I call any firebase functions in a project.
(Unity 2021.2.0b9),m1 MacBook Pro.

DllNotFoundException: FirebaseCppApp-8_1_0 assembly: type: member:(null)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:117)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:137)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/AppUtil.cs:64)
Firebase.LogUtil..ctor () (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/LogUtil.cs:81)
Firebase.LogUtil..cctor () (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/LogUtil.cs:37)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at Z:/tmp/tmp.9PHv6s9T8D/firebase/app/client/unity/proxy/FirebaseApp.cs:67)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.

Unity integration with firebase realtime database works on unity editor but not on mobile devices.

I have been following the official firbase docs for integration of Unity v2020(LTS) and firebase realtime database (SDK v 7.1.0). It works completely fine in unity editor but not in any mobile devices.

Here is my code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Firebase.Database;
using TMPro;

public class firebase_script : MonoBehaviour
{
    DatabaseReference reference;
    string text_place;
    public TextMeshProUGUI text;

    // Start is called before the first frame update
    void Start()
    {
        reference= FirebaseDatabase.DefaultInstance.RootReference;
    }
    public void get_updates(){
        reference.Child("plant").GetValueAsync().ContinueWith(task => {
            if(task.IsFaulted){
                Debug.Log("Failed to fetch Value");
            }
            else if(task.IsCompleted){
                DataSnapshot snapshot =task.Result;
                text_place=snapshot.Child("moisture").Value.ToString();
                
            }
        });
    }

    // Update is called once per frame
    void Update()
    {
        text.text=text_place;   
    }
}


and here is the logcat output

03-23 00:45:45.253  9618  9707 I Unity   : Company Name: <Striped>
03-23 00:45:45.253  9618  9707 I Unity   : Product Name: <Striped>
03-23 00:45:48.719  9618  9707 E Unity   : InitializationException:  Firebase app creation failed.
03-23 00:45:48.719  9618  9707 E Unity   :   at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x000e3] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.719  9618  9707 E Unity   :   at Firebase.FirebaseApp.Create () [0x00027] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.719  9618  9707 E Unity   :   at Firebase.FirebaseApp.get_DefaultInstance () [0x00017] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.719  9618  9707 E Unity   :   at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <265179cd3d324ba1be0c68f88dea310a>:0 
03-23 00:45:48.719  9618  9707 E Unity   :   at firebase_script.Start () [0x00000] in <a8ca21255e29484580e851c97ded26fa>:0 
03-23 00:45:48.719  9618  9707 E Unity   : 
03-23 00:45:48.739  9618  9707 E Unity   : InitializationException:  Firebase app creation failed.
03-23 00:45:48.739  9618  9707 E Unity   :   at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x000e3] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.739  9618  9707 E Unity   :   at Firebase.FirebaseApp.Create () [0x00027] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.739  9618  9707 E Unity   :   at Firebase.FirebaseApp.get_DefaultInstance () [0x00017] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.739  9618  9707 E Unity   :   at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <265179cd3d324ba1be0c68f88dea310a>:0 
03-23 00:45:48.739  9618  9707 E Unity   :   at button_script.Start () [0x00000] in <a8ca21255e29484580e851c97ded26fa>:0 
03-23 00:45:48.739  9618  9707 E Unity   : 
03-23 00:45:48.759  9618  9707 E Unity   : InitializationException:  Firebase app creation failed.
03-23 00:45:48.759  9618  9707 E Unity   :   at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x000e3] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.759  9618  9707 E Unity   :   at Firebase.FirebaseApp.Create () [0x00027] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.759  9618  9707 E Unity   :   at Firebase.FirebaseApp.get_DefaultInstance () [0x00017] in <efce830506c14731bd3b7a14d631487d>:0 
03-23 00:45:48.759  9618  9707 E Unity   :   at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <265179cd3d324ba1be0c68f88dea310a>:0 
03-23 00:45:48.759  9618  9707 E Unity   :   at button_script.Start () [0x00000] in <a8ca21255e29484580e851c97ded26fa>:0 
03-23 00:45:48.759  9618  9707 E Unity   : 
03-23 00:45:48.830  9618  9707 E Unity   : Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly.
03-23 00:45:48.830  9618  9707 E Unity   : 
03-23 00:45:48.830  9618  9707 E Unity   : Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly.

I know it's showing firebase app creation failed but when i use it in unity editor it successfully pulll and push data to/from firebase but fails in mobile device.

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.