This topic is not available in your language. Therefore, the original version (ja-jp) is displayed.

VSC0018: Does not support goto default statement

PropertyValue
IDVSC0018
CategoryCompiler
SeverityError
Runtime Version3.1.0 ~ latest
Compiler Version1.0.0 ~ latest

Does not support goto default statement

Example

Code with Diagnostic

using UdonSharp;
 
using UnityEngine;
 
class TestBehaviour0 : UdonSharpBehaviour
{
    public void TestMethod(int i)
    {
        switch (i)
        {
            case 0:
                Debug.Log("zero");
                goto default;
                ~~~~~~~~~~~~~
 
            default:
                break;
        }
    }
}

Code with Fix

// NOT YET PROVIDED
VSC0018: Does not support goto default statement / Udon Analyzer / Natsuneko Laboratory Docs