Answer the question
In order to leave comments, you need to log in
How to change the texture of a Unity object in C#?
How can I change the texture of all Zombie objects in C#?
Zombie[] array = UnityEngine.Object.FindObjectsOfType(typeof(Zombie)) as Zombie[];
Zombie[] array2 = array;
foreach (Zombie zombie in array)
{
zombie.gameObject.GetComponent<Renderer>().material.mainTexture = args.sender.player.gameObject.GetComponent<Renderer>().material.mainTexture;
}
Есть ли здесь ошибка ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question