Search Unity

material failing to render

Discussion in 'Scripting' started by Nightshade1, Feb 20, 2012.

  1. Nightshade1

    Nightshade1

    Joined:
    Feb 6, 2011
    Posts:
    95
    i made thois script but it doesnt allow a texture to be added on how do i fix this?

    Code (csharp):
    1. var nxtlvl : boolean = false;
    2. function React ()
    3. {
    4.     nxtlvl = true;
    5. }
    6. function Update ()
    7. {
    8.     if(nxtlvl)
    9.     {
    10.     gameObject.AddComponent(MeshRenderer);
    11.        
    12.     }
    13. }