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

VSC0004: Cannot use typeof on user-defined types

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

Cannot use typeof on user-defined types

Example

Code with Diagnostic

using UdonSharp;
 
class TestBehaviour0 : UdonSharpBehaviour
{
    public void TestMethod()
    {
        var t = typeof(TestBehaviour0);
                ~~~~~~~~~~~~~~~~~~~~~~
    }
}

Code with Fix

// NOT YET PROVIDED
VSC0004: Cannot use typeof on user-defined types / Udon Analyzer / Natsuneko Laboratory Docs