public void PostOnFaceBook()
{
if (CoreXT.IsDevice) {
Application.CaptureScreenshot ("ScreenShot.png");
UIImage tmp = new UIImage (Application.persistentDataPath + "/ScreenShot.png");
// share
if(_stringPostOnWtitterAndFaceBook == "")
{
_stringPostOnWtitterAndFaceBook = "Post !";
}
if(_link == "")
{
_link = "http://abc.com";
}
if(tmp.IsNil)
{
SocialXT.Post (SLRequest.SLServiceTypeFacebook, _stringPostOnWtitterAndFaceBook, GameObject.Find("Logo").GetComponent<GUITexture>().texture as Texture2D, _link, true);
}else
{
SocialXT.Post (SLRequest.SLServiceTypeFacebook, _stringPostOnWtitterAndFaceBook, tmp, _link, true);
System.IO.File.Delete (Application.persistentDataPath + "/ScreenShot.png");
}
}
}
GameObject.Find(“Logo”).GetComponent().texture is not null.
I’m call thist method from other GameObject. But It not working !. . .