I tried something like “original amount = original amount + (original amount * 0.1)” to add 10% to the original amount but it just keeps adding, Does anyone know?
did you coded it in the update function ? like this ?
float amount;
update()
{
// if you did this then it's basically adding the amount every frame
amount = amount + (amount * 0.1f);
}
the update function execute the code every frame. if you only want to execute the code once use start() method instead. the start method only execute the code in the first frame the game has started (basically only once, after you enter play mode)