- Home /
 
 
               Question by 
               Tomomoto · Aug 08, 2011 at 10:04 AM · 
                errorsyntax-errorbce0019  
              
 
              Script Error (js)
I have 1 error in this script.
 function Update() {
     var mesh : Mesh= MeshRenderer.mesh;
     var colors : Color[] = mesh.colors;
     
     for (var i=0;i<colors.Length;i++) 
     {
       var _color : Color = colors[i];
       _color.a = 1.0;  
       colors[i] = _color;
     }
     mesh.colors = colors;  
     }
 
               (2,31): BCE0019: 'mesh' is not a member of 'UnityEngine.MeshRenderer'.
How to fix???
               Comment
              
 
               
              Answer by Waz · Aug 08, 2011 at 10:07 AM
It's a member of MeshFilter. Read the docs, this is well covered in the Mesh scripting reference.
Your answer
 
             Follow this Question
Related Questions
rigidbody' is not a member of 'UnityEngine.Object ? 4 Answers
Can't play audio file 2 Answers
3dplatformtutorial script errors 0 Answers
Button is not a member of GUI? 2 Answers