NodeRegistryUtilities.GetNodeDefinitionInfo
incorrectly identifies
GameObject.SetActive
as
CTOR_INFO
.
I have discovered a bug in
NodeRegistryUtilities.GetNodeDefinitionInfo
. When querying the definition for
UnityEngine.GameObject.SetActive
, the API returns a
DefinitionInfo
where the
DefinitionType
is
DefinitionType.CTOR_INFO
instead of the expected
DefinitionType.METHOD_INFO
.
It appears that the internal logic fails to match the specific
MethodInfo
for
SetActive
and erroneously falls back to a
ConstructorInfo
that happens to match the parameter signature, disregarding the actual node name.
I realize this is not an API that most world creators will use, but since it is a public API, I believe it is appropriate to submit the bug report here.
Reproduction:
```csharp
using UnityEngine;
using UnityEditor;
using System.Linq;
using VRC.Udon.Graph;
using VRC.Udon.Graph.NodeRegistries;
public class UdonBugReproduction
{
[MenuItem("Tools/Verify Udon Bug")]
public static void VerifySetActiveBug()
{
var registry = new RootNodeRegistry();
var definitions = registry.GetNodeDefinitions();
string targetFullName = "UnityEngineGameObject.__SetActive__SystemBoolean__SystemVoid";
var targetDefinition = definitions.FirstOrDefault(d => d.fullName == targetFullName);
if (targetDefinition == null)
{
Debug.LogError($"Didn't find the definition of {targetFullName}");
return;
}
var info = NodeRegistryUtilities.GetNodeDefinitionInfo(targetDefinition);
// Expected: METHOD_INFO
// Actual: CTOR_INFO
Debug.Log($"Definition type is {info.definitionType}");
Debug.Log($"Info object type is {info.info?.GetType().Name}");
Debug.Log($"Info content: {info.info}");
}
}
```
Result:
  • Expected:
    info.definitionType
    should be
    METHOD_INFO
    .
  • Actual:
    info.definitionType
    is
    CTOR_INFO
    , and
    info.info
    contains a
    ConstructorInfo
    object instead of
    MethodInfo
    .