r2mods/ilspy_dump/ror2_csproj/RoR2/AssignRandomMaterial.cs

16 lines
238 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2;
public class AssignRandomMaterial : MonoBehaviour
{
public Renderer rend;
public Material[] materials;
private void Awake()
{
rend.material = materials[Random.Range(0, materials.Length)];
}
}