error
Assets/FacebookSDK/facebookScript.cs(33,12): error CS0246: The type or namespace name `gameManager' could not be found. Are you missing an assembly reference?
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
using Facebook.Unity;
[System.Serializable]
public class MyClass {
public string entry;
public string user;
}
public class facebookScript : MonoBehaviour {
#region Variables
[Header("________ Using of thar Score ______")]
[SerializeField]
private bool UsScoreCaallingAtStart;
[Space]
[Header("_______ Facebook system Variables _______")]
[Header("_______ If Using Score _______")]
public GameObject ProgrssHolder;
public GameObject Progress,inviteFriendBut;
[Header("_______ End of Score using _______")]
[Space]
public List saveing= new List();
public GameObject[] isLoginButtons,NotLoginButtons;
public GameObject[] XPS;
string scores;
private bool ISCalled;
public gameManager Manager;
float HolderWigth;
float Holderheight;
[HideInInspector]
public int PlayerNumber;
string userName;
public Color MeColor;
#endregion
#region Starting Functions
void Awake (){
if (!FB.IsInitialized)
FB.Init (InitCallBack);
}
void InitCallBack(){}
void Start ( ) {
SetScore ( );
UIChanges ( );
}
#endregion
#region Functions
public void Login(){
if (!FB.IsLoggedIn) {
FB.LogInWithReadPermissions (new List ( ) { "user_friends" } , LoginCallBack);
FB.LogInWithReadPermissions (new List ( ) { "email" } , LoginCallBack);
FB.LogInWithPublishPermissions (new List ( ) { "publish_actions" } , LoginCallBack);
}
}
public void SetScore ( )
{
if ( UsScoreCaallingAtStart && FB.IsLoggedIn )
{
scores = Manager.Xp.ToString ( );
var scoreData = new Dictionary ( ) { { "score" , scores.ToString ( ) } };
Debug.Log ("Save Score As : " + scores);
FB.API ("/me/scores" , HttpMethod.POST , APICallback , scoreData);
GetScore ( );
}
}
public void GetScore ( ) {
if ( UsScoreCaallingAtStart )
{
FB.API ("me?fields=first_name" , HttpMethod.GET , NameCallBack);
FB.API ("/app/scores?fields,user,limit(15)" , HttpMethod.GET , ScoreCallBack);
}
}
public void LogOut ( )
{
FB.LogOut ( );
}
public void Callinvite ( )
{
if ( FB.IsLoggedIn )
{
FB.AppRequest (message: "You should really try this Game." , title: "Mine Run!");
}
else
{
LoginToInvite ( );
}
}
public void CallShare ( )
{
if ( FB.IsLoggedIn )
FB.ShareLink (new System.Uri ("https://play.google.com/store/apps/details?id=com.MGAME.MineFight.Stuntmaster") , "This game is awesome!" , "Mine Fight." , new System.Uri ("https://s23.postimg.org/3pjeujf6j/icon2.png"));
else
LoginToShare ( );
}
void LoginToShare ( )
{
if ( !FB.IsLoggedIn )
{
FB.LogInWithReadPermissions (new List ( ) { "user_friends" } , LoginCallBackToShare);
FB.LogInWithReadPermissions (new List ( ) { "email" } , LoginCallBackToShare);
FB.LogInWithPublishPermissions (new List ( ) { "publish_actions" } , LoginCallBackToShare);
}
}
void LoginToInvite ( )
{
if ( !FB.IsLoggedIn )
{
FB.LogInWithReadPermissions (new List ( ) { "user_friends" } , LoginCallBackTinvite);
FB.LogInWithReadPermissions (new List ( ) { "email" } , LoginCallBackTinvite);
FB.LogInWithPublishPermissions (new List ( ) { "publish_actions" } , LoginCallBackTinvite);
}
}
#endregion
#region Call Backes
void APICallback ( IGraphResult resulte )
{
Debug.Log ("score Resule" + resulte);
}
void ScoreCallBack ( IGraphResult resule )
{
ProgrssHolder.GetComponent ( ).sizeDelta = new Vector2 (HolderWigth , 0);
PlayerNumber = 0;
IDictionary data = resule.ResultDictionary;
List
↧