I'm trying to check everytime a gameobject childCount increases by 1 but it doesn't seem to work.

Heres what I’m trying to do.

void Update()
{
    int childs = transform.childCount;

    if(childs += 1)
    {
        AmountChanged = true;
    }
}

Problem is that you check a variable childs, not thransform.childCount

int childs;

 void Start()
{
 childs = transform.childCount;
}
        
void Update()
{
  if(childs+1==transform.childCount)
  {
    AmountChanged = true;
  }
}