- Home /
'mesh' is not a member of UnityEngine.Component - Explicit Typecasting for Android
I know that on iPhone, the solution was to append a as MeshCollider
(or MeshFilter or Mesh*), but it does not seem to work for Android. I end up getting the BCE0044, 43 errors. Is there another way to typecast this for Android?
$$anonymous$$esh doesn't seem recognized by Android at all - any idea what's up?
Answer by Jessy · Dec 16, 2010 at 07:13 AM
There's no reason "as" shouldn't work, so we can possibly help you better if you share a real line of code.
However, it's easy in both JavaScript and C# to use the generic form of GetComponent, to get at what you want. C# should be straightforward, and it's right on the GetComponent page. UnityScript requires a bit more digging:
GetComponent.<MeshFilter>().mesh
http://unity3d.com/support/documentation/Manual/MonoUpgradeDetails.html
I recommend that approach, going forward.
i'm simply trying to port to android the paint deform in the procedural graphics example - converting each of the mesh getcomponenets to "as mesh*" yielded BCE004, 43 errors in the js (missing ; on a line where there clearly is a ;, but has been modified with the ( as )).
There is a chance this might be one of the bugs that's keeping Unity Android from going public just yet... @Jessy - have you had a chance to try Unity Android? Lots of stuff that worked for iPhone isn't yet ready - Unity Remote, especially!
"as mesh" doesn't mean anything. "as $$anonymous$$esh" is actual code. Post a short snippet of code above that doesn't work, if you need help. There's no way that the $$anonymous$$esh class doesn't work, on any platform.
Your answer
![](https://koobas.hobune.stream/wayback/20220613091223im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why is the MeshFilter being removed? 1 Answer
AAPT Failed! 0 custom asset files in raw for Procedural Examples Paint Vertices to Android 2 Answers
GetComponent problem 2 Answers
BCE0044 unexpected char: 0xFEFF 2 Answers
save meshfilter for retrieval even after app termination iphone android 1 Answer