unity3d - Changing color of of gameObject in Unity -
okay have code.
void start () { gameobject.getcomponent<renderer> ().material.color = color.green; }
i expected gameobject change color green. imported black , in inspector has turned green in actual application not appear green. cant use gameobject.renderer.material.color = color.green
since unity tell me outdated , have use new version. going simple missing? in advance.
update: when run code tab pops in inspector 'sprites-default (instance)' , if change selection box unlit > color works. there anyway of making stick?
the color changes cant see result because shader in material needs light , don't have lights see black can add light source or change materials shader unlight.
Comments
Post a Comment