Hai to all....i want to change the mesh of the game object....now i got small idea about mesh swapping....theese are my codings..
public class meshchanging
{
public Gameobject initialobject;
public Gameobject swapobject;
msh initialmesh;
mesh swapmesh;
Gameobject theTarget;
void start(){
theTarget=initialObject;
initialmesh=initialobject.getcomponent().mesh;
swapmsh=swapobject.getcomponent().mesh;
}
void update(){
theTarget.getcomponenet().mesh=swapmesh;
}
}
now whats my problem was i cannot hide my initial game object......what my objective is when the new mesh is shown the old one want to hide.....help me in scripting...... and give some another coding to change the mesh while the game running ...without mesh swapping.......Thank in advance...
↧