Addcompont and Change It's Value After Delete another Same Parent type inheritanced Component ,Addcomponent after DeleteAnother Same MotherType Component And Change It's Value

This one function I set it in Awake()
After getskillbutton it will detect Component , if button have skill it will delete it, And Add SkillComponent from another Data, And each Skill is inheritance
just like
public class Skill1 : Skill and public class Skill2 : Skill
But i found if I delete Skill and Add anotherSkill ,then the new Skill can’t Change it’s Value
which like “” SkillButton*.gameObject.GetComponent().AllTarget = Member; “”“*
If the Button have no skill and Just Add anotherSkill ,
It unexpectedly work,But I still can’t figure out
And If I Don’t Destroy Previous Let Button contain two Skill ,
SkillButton*.gameObject.GetComponent().AllTarget = Member; Only Change first Skill Value*
void LoadSkill()
{
* SkillButton = new Button[4];*
* for(int i=0;i<4;i++)*
* {*
_ SkillButton = canvas.GetChild(1).GetChild(0).GetChild(i).GetComponent();
if (SkillButton*.TryGetComponent(out Skill LastSkill) == true)
Destroy(LastSkill);
}
for (int i=0;i<4; i++)
{
if (User.Skills!=0)
{
SkillButton.interactable = true;_

SkillButton.gameObject.AddComponent(Skill_Dic[User.Skills]);
_ SkillButton.gameObject.GetComponent().AllTarget = Member; //This Row Only Work when the button have No in begining*
* }
else //()
{
SkillButton.interactable = false;
}
}
}
,This one function I set it in Awake()
After getskillbutton it will detect Component , if button have skill it will delete it, And Add SkillComponent from another Data, And each Skill is inheritance
just like
public class Skill1 : Skill and public class Skill2 : Skill
But i found if I delete Skill and Add anotherSkill ,then the new Skill can’t Change it’s Value_

_which like “” SkillButton.gameObject.GetComponent().AllTarget = Member; “””
If the Button have no skill and Just Add anotherSkill ,
It unexpectedly work,But I still can’t figure out
And If I Don’t Destroy Previous Let Button contain two Skill ,_

_SkillButton.gameObject.GetComponent().AllTarget = Member; Only Change first Skill Value*
void LoadSkill()
{
* SkillButton = new Button[4];
for(int i=0;i<4;i++)
{
SkillButton = canvas.GetChild(1).GetChild(0).GetChild(i).GetComponent();
if (SkillButton.TryGetComponent(out Skill LastSkill) == true)
Destroy(LastSkill);
}
for (int i=0;i<4; i++)
{
if (User.Skills!=0)
{
SkillButton.interactable = true;_

SkillButton.gameObject.AddComponent(Skill_Dic[User.Skills]);
_ SkillButton.gameObject.GetComponent().AllTarget = Member; //This Row Only Work when the button have No
}
else //()
{
SkillButton.interactable = false;
}
}
}*_

I found the solution ,change Destroy to DestroyImmediate