Search Unity

Question How to Disable Rig Builder Component from script?

Discussion in 'Animation Rigging' started by Only4gamers, Nov 30, 2020.

  1. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    327
    Hello everyone,
    This may sound very childish question but I am unable to find the solution. How to disable RigBuilder component from script?
    please help.
     
  2. leozhang1

    leozhang1

    Joined:
    Jan 27, 2018
    Posts:
    16
    RigBuilder rb;

    void Start()
    {
    rb = GetComponent<RigBuilder>();

    // disables the rigbuilder script
    rb.enabled = false;
    }
     
    Only4gamers likes this.
  3. GrygloJa

    GrygloJa

    Joined:
    May 5, 2020
    Posts:
    1
    You have to add new library called "using UnityEngine.Animations.Rigging;"
    then
    public RigBuilder rig;

    void Start()
    {
    rig.enabled = false;
    }