- Home /
WebPlayer has severe bug in Generics constraint verification (found in Unity 3.3.0f4)
Generics verification fails if a more-constrained generic tries to access a less constrained generic.
class Blubb
{
}
void Foo<T>()
where T : Blubb
{
Bar<T>();
}
void Bar<T>()
where T : class
{
}
will fail with: Invalid generic method instantiation of method Bar (generic args don't respect target's constraints) at 0x000c Foo.
This prohibits the use of almost every non-simplistic Generic construct.
Probably unity is infected with this mono bug: https://bugzilla.novell.com/show_bug.cgi?id=660685
Interstingly the generics verification only seems to be activated in the Webplayer. The same code works without complaints in the standard player.
Any ideas how to get this fixed?
Excellent. If my answer helped, please click the checkmark by it. And you might delete this answer, and make it a comment under my answer ins$$anonymous$$d.
Sorry, posted a wrong answer. Already deleted it. I thought, hey everything is working fine. But then I read about the webplayer. If this is only happening there, something is definitely wrong with the compiler of Unity. Reporting a bug is a good thing for that.
Answer by almo · Jun 20, 2011 at 02:44 PM
http://answers.unity3d.com/questions/9292/how-do-i-report-a-bug-in-unity.html
Go here to see how to report a bug.
Answer by valoh · Mar 28, 2012 at 10:11 AM
as I stumbled across the same bug in 3.5:
what's the status of this bug? did you submitted a bug? any feedback on it?
Answer by HSz · Aug 28, 2014 at 11:45 AM
Is there any update on this? We were able to replicate this in WebPlayer on 4.5.3 http://fogbugz.unity3d.com/default.asp?629308_v05aeen3cr02l8db Thx
Your answer
Follow this Question
Related Questions
[Help]Unity3d Webplayer (3.0f5) (Internet Explorer 8) Can`t communicate with the browser . 1 Answer
Unity Web Player Bug. Please help ! 1 Answer
Unity 3D Keep Crashing in every site! 1 Answer
Unity Web Player distorts objects 0 Answers
Unity Web Player - Error when loading for the first time 1 Answer