Open synergiance opened 1 year ago
Same problem and it happens within the same behavior.
namespace A320VAU.ND.Pages
{
// ....
public class MapDisplay : UdonSharpBehaviour
{
// ....
private void InstantiateMarkers(int range, EFISVisibilityType efisVisibilityType = EFISVisibilityType.NONE)
{
// ....
}
public void SetRange(int range) => InstantiateMarkers(range, GetVisibilityType());
public void SetVisibilityType(EFISVisibilityType visibilityType) => InstantiateMarkers(Range, visibilityType);
// ....
}
public enum EFISVisibilityType
{
CSTR,
WPT,
VORDME,
NDB,
APPT,
NONE
}
}
Describe the bug in detail: When a method takes an enum type as a parameter, and also gives it a default value, UdonSharp's compiler seems to forget that it is the same enum type being passed in. (System.ArgumentException: Type provided must be an Enum.)
Provide steps/code to reproduce the bug: Declare an enum:
Declare a method with that enum type as a parameter and uses a default value:
Call that method:
Expected behavior: Program compiles and runs
Additional Information: This was tested across behaviors. I did not actually test whether it happens within the same behavior.