Heres what I’m trying to do.
void Update()
{
int childs = transform.childCount;
if(childs += 1)
{
AmountChanged = true;
}
}
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;
}
}