I have a grenade prefab, which has a grenade script attached to it, originally when i made the prefab i had certian values assigned to the variables in the grenade script.
After i change the grenade scripts varaible values :
From:
public float LaunchForce = 20;
public float BlastRadius = 2;
To:
public float LaunchForce = 30;
public float BlastRadius = 0.5f;
The prefab doesnt get updated after compiling the script and running, is this intentional?
The Inspector has an elephant’s memory: it remembers forever the values you’ve initially set or modified in the Inspector, and changing them in the script has no effect (unless you modify the variable’s type). Click the “gear” object at right of the script’s name in the Inspector and select reset to update the public variables according to the script, or change them in the Inspector (not when the game is running! - these changes are lost).