update variable value with custom editors unity code example
Example 1: unity custom update
float StartingRate = 0.5f;
float UpdateRate = 0.3f;
void Start(){
InvokeRepeating("CustomUpdate",StartRate, UpdateRate);
//This will start in 0.5s and start repeating in 0.3f
}
void CustomUpdate(){
//Your code here
}
Example 2: unity custom editor save changes
EditorUtility.SetDirty(castedTarget);