It gets the job done. I'm not sure if there is any other way to do it. I'm curious why it isn't suitable for your needs. You could just put it in place of your other lines of code that aren't working.
Example, for smooth change ocean level you need change it very often. And it make flood in console and log. Anyway... I'm examine how it work... For that i need any method make visualy update. In class WaterSystem
public static float OceanLevel
{
get => WaterSystem.oceanLevel;
set
{
value = Mathf.Max(value, 0.0f);
if (Mathf.Approximately(WaterSystem.oceanLevel, value))
return;
WaterSystem.oceanLevel = value;
WaterSystem.UpdateOceanLevel();
}
}
have
WaterSystem.UpdateOceanLevel(); but it not visualy update... Maybe need use NetworkUpdate??? Any idea?
p.s. I think, use
rust.RunServerCommand("oceanlevel 5"); absolutle wrong! It not directly call... You call one system, then it called other, etc...