Im New To Unity and i was wondering how to add textures to gameobjects. anyone got any answers?
If you are new to unity, you can go through Unity’s documentation and get some experience with samples provided by Unity.
Anyways, there are many ways to apply a textured material to your GameObject. You can create a material and select required shader and drag-n-drop your imported texture onto it.
Then you can apply that material to your gameobject.
You can also apply a texture to a game object’s material runtime:
public Texture2D myTexture; // Assuming that it has been linked to a texture imported into your project by drag-n-dropping that texture onto this property using Inspector window
void Start () {
gameObject.renderer.material.mainTexture = myTexture;
}
Check this documentation from unity.
Thankyou Ill Try Now