示例#1
0
    void DeactivateSword()
    {
        WeaponBehavior weapon = transform.Find("Equipment").Find("WeaponSlot").GetChild(activeWeapon).GetChild(0).GetComponent <WeaponBehavior>();

        if (weapon.GetComponent <Collider>())
        {
            weapon.GetComponent <Collider>().enabled = false;
        }
    }