Error occurs in Compilation
Causing error :
Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs(146,40): error CS0117: UnityEngine.Texture2D' does not contain a definition for
blackTexture'
i am trying to plugin google play services in application . And that causing the trouble some error .
Can you post the part of the code that does not compile?
if (www.error == null)
{
this.mImage = www.texture;
}
else
{
**mImage = Texture2D.blackTexture;**
Debug.Log("Error downloading image: " + www.error);
}
mImageLoading = false;
}
else
{
Debug.Log("No URL found.");
**mImage = Texture2D.blackTexture;**
mImageLoading = false;
}
}
Now Errors are :
Resolver version is now: 10101 UnityEngine.Debug:Log(Object) GooglePlayServices.PlayServicesResolver:RegisterResolver(IResolver) GooglePlayServices.ResolverVer1_1:.cctor() UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
2 .url: https://kharma.unity3d.com/
3 . [Global Exception] [object Event] returnValue:true. timeStamp:1477405685470. eventPhase:3. target:[object HT$$anonymous$$LScriptElement]. defaultPrevented:false. srcElement:[object HT$$anonymous$$LScriptElement]. type:error. clipboardData:undefined. cancelable:false. currentTarget:[object DO$$anonymous$$Window]. bubbles:true. cancelBubble:false. notLogged
4 . []
Assets/GooglePlayGames/ISocialPlatform/PlayGamesUserProfile.cs(146,40): error CS0117: UnityEngine.Texture2D' does not contain a definition for blackTexture'
i want to intergrate facebook login , sharing , inviting and using the leaderboard in unity. and google play game integration.
What Unity Version are you using. From the docs Texture2D.blackTexture exists from Unity 5.4.X
I am using Unity 4.5 , So help me to solve the problem . And which plugin i use
https://github.com/playgameservices/play-games-plugin-for-unity
Ok its get solved now , i tried to solve by older plugin and its working
Answer by ashwanidv100 · Oct 27, 2016 at 06:03 PM
Solved the Problem by changing the plugin to the older version .
Your answer
Follow this Question
Related Questions
Google play games services plugin can't log in 1 Answer
error CS0118 'charanim.CameraTurn' is a field but a 'type' was 'expected' 1 Answer
Why my Unity can not run normally? 1 Answer
Help Troubleshooting: "Cannot generate 9 slice most likely because the size is too big." 2 Answers
Android Manifest xml missing - Build failed. Need Help! 4 Answers