Modifying private variables
Traverse.Create(ScriptInstance).Field("fieldname").SetValue(newvalue);
// For example to set the value "m_MinFallingHeight" of the class Player we can do that :
Traverse.Create(Player.Get()).Field("m_MinFallingHeight").SetValue(10);Traverse.Create(typeof(classname)).Field("fieldname").SetValue(newvalue);
// For example to set the value "s_Initialized" of the class ItemIDHelpers we can do that :
Traverse.Create(typeof(ItemIDHelpers)).Field("s_Initialized").SetValue(false);Last updated