Navigation

VRC0003: Udon does not support instantiating non-GameObject types

Property Value
ID VRC0003
Category Usage
Severity Error
Runtime Version 3.1.0 ~ latest

Udon does not support instantiating non-GameObject types

Example

Code with Diagnostic

using UdonSharp;

using UnityEngine;

class TestBehaviour0 : UdonSharpBehaviour
{
    public void TestMethod()
    {
        Instantiate(new TrailRenderer());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    }
}

Code with Fix

// NOT YET PROVIDED