Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Hello everyone someone can help me with this error

$
0
0
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 ScoresList = ( List ) data [ "data" ]; foreach ( Transform child in ProgrssHolder.transform ) { Destroy (child.gameObject); } foreach ( object score in ScoresList ) { PlayerNumber += 1; HolderWigth = ProgrssHolder.GetComponent ( ).sizeDelta.x; Holderheight = ProgrssHolder.GetComponent ( ).sizeDelta.y; ProgrssHolder.GetComponent ( ).sizeDelta = new Vector2 (HolderWigth , Holderheight + 105); var entry = ( Dictionary ) score; var user = ( Dictionary ) entry [ "user" ]; // bool ifisMe = user["id"]== //// instantiat UI GameObject Playerprogress; Playerprogress = Instantiate (Progress) as GameObject; //// Set instantiat ui child of obj Playerprogress.transform.SetParent (ProgrssHolder.transform , false); Transform PictureHolder = Playerprogress.transform.Find ("UserImage"); Transform PPicture = PictureHolder.transform.Find ("Avatar Image"); Transform PScore = Playerprogress.transform.Find ("score"); Transform PName = Playerprogress.transform.Find ("UserName"); Transform PNumber = Playerprogress.transform.Find ("Number"); Text Playername = PName.GetComponent ( ); Text SendInfo = PScore.GetComponent ( ); Text Num = PNumber.GetComponent ( ); Image PPictureI = PPicture.GetComponent ( ); if ( userName == user [ "id" ].ToString ( ) ) { Transform BG = Playerprogress.transform.Find ("BackGround"); Image BGM = BG.GetComponent ( ); BGM.color = MeColor; } Playername.text = user [ "name" ].ToString ( ); SendInfo.text = entry [ "score" ].ToString ( ); Num.text = PlayerNumber.ToString ( ); FB.API (user [ "id" ].ToString ( ) + "/picture?width=50&height=50" , HttpMethod.GET , delegate ( IGraphResult picResult ) { if ( picResult.Error != null ) { Debug.Log (picResult.RawResult); } else { if ( PPictureI != null ) { PPictureI.sprite = Sprite.Create (picResult.Texture , new Rect (0 , 0 , 50 , 50) , new Vector2 (0 , 0)); } } }); } } void LoginCallBack ( ILoginResult result ) { if ( result.Error == null ) { UIChanges ( ); SetScore ( ); } } void LoginCallBackToShare ( ILoginResult result ) { if ( result.Error ==null ) { FB.AppRequest (message: "You should really try this Game." , title: "Mine Run!"); UIChanges ( ); SetScore ( ); } } void LoginCallBackTinvite ( ILoginResult result ) { if ( result.Error == null ) { FB.AppRequest (message: "You should really try this Game." , title: "Mine Run!"); UIChanges ( ); SetScore ( ); } } void NameCallBack ( IGraphResult result ) { IDictionary profile = result.ResultDictionary; userName = profile [ "id" ].ToString ( ); } #endregion #region UI Changes public void UIChanges ( ) { if ( FB.IsLoggedIn ) { for ( int i = 0 ; i < isLoginButtons.Length ; i++ ) { isLoginButtons [ i ].SetActive (true); } for ( int i = 0 ; i < NotLoginButtons.Length ; i++ ) { NotLoginButtons [ i ].SetActive (false); } } else { for ( int i = 0 ; i < isLoginButtons.Length ; i++ ) { isLoginButtons [ i ].SetActive (false); } for ( int i = 0 ; i < NotLoginButtons.Length ; i++ ) { NotLoginButtons [ i ].SetActive (true); } } } #endregion } ,

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>