here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class Building : MonoBehaviour
{
public enum State
{
Nothing,
Burnt,
Cold
};
private void Start()
{
var max = Enum.GetValues(typeof(State)).Length;
var value = (State)new Random().Next(0, max - 1);
Console.WriteLine(value);
}
}
I did some research and any answer I found, was either too confusing and I didn't know how to implement it into my script or it required me to delete Using System;
or Using UnityEngine;
. How can I fix this issue?
Thanks! :D
PS. I probably didn't do enough research and it was right in front of me this whole time, so please excuse that.