Can't access Rig Builder Component from script

Hello everyone,
I am trying to disable Rig Builder Component from script but it's showing this error:

The type or namespace name 'RigBuilder' could not be found (are you missing a using directive or an assembly reference?)

this is my code:

GetComponent<RigBuilder>().enabled = false;

Visual Studio is telling you that you are missing the namespace.

When you see that error you can click on the word in Visual Studio, in this case "RigBuilder" and hit
(CTRL plus dot on your keyboard) and it will come up with suggestions on how to fix it.

In your case you need to add the namespace at the beginning of your script at the top.

using UnityEngine.Animations.Rigging;


Thank you so much :). You solved my two problems. I am searching for this shortcut from few days.

1 Like