Describe the bug in detail:
All optional arguments after the first optional argument that defaults appear to also default, even if they are given a value when calling.
Provide steps/code to reproduce the bug:
Steps or code to reproduce the behavior.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class OptionalTest : UdonSharpBehaviour
{
void optionalArg(string str, int check = 0) {
Debug.Log($"Optional arg test! Optional ver: str {str} int {check}");
}
void moreOptionalArg(string str, int check = 0, int doubleCheck = 0, float evenMoreNum = 0f) {
Debug.Log($"Optional arg test! Required ver: str {str} int: {check} doubleCheck: {doubleCheck}, evenMore: {evenMoreNum}");
}
void requiredArg(string str, int check) {
Debug.Log($"Optional arg test! Required ver: str {str} int {check}");
}
void Start()
{
Debug.Log("Optional arg test! START");
optionalArg("optional1", check: 25);
requiredArg("required2", 17);
moreOptionalArg("maybeBroken", doubleCheck: 69);
moreOptionalArg("idk Anymore", check: -5, doubleCheck: -8);
moreOptionalArg("maybeJustFirst?", check: 69);
moreOptionalArg("even MORE testing", check: 8, evenMoreNum: 8.4f);
}
}
Describe the bug in detail: All optional arguments after the first optional argument that defaults appear to also default, even if they are given a value when calling.
Provide steps/code to reproduce the bug: Steps or code to reproduce the behavior.
Log as text:
Expected behavior:
Additional Information: Environment: Script was placed on an empty object in the root of the hierarchy.
Package Versions: (Latest as of making bug report) VRC SDK - Worlds: 3.7.1 VRC Package resolver tool: 0.1.29 VRC SKD - Base: 3.7.1