When making a method, and using an enum as a parameter, if a default value is set for that enum, UdonSharp spits out an error (full attached in errorlog.txt):
[UdonSharp] Assets/TestCode.cs(7,0): System.ArgumentException: Type provided must be an Enum.
Parameter name: enumType
Making either the method or the enum does not solve this, using an integer in place of the default value does not solve this, and the error is only on the U# compiler side.
The C# script is attached, and I'll repeat it here for completion:
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
enum TestEnum {One, Two, Three}
public class TestCode : UdonSharpBehaviour
{
void UdonEnumTest(TestEnum te = TestEnum.One){
Debug.Log(te);
}
}
I love enums way too much to not use them like this:( tupper plz