public virtual void OnBeforeSerialize() { objectJsonMap.Clear(); foreach (var kv in ObjectMap) { objectJsonMap.Add(kv.Key, JsonUtility.ToJson(kv.Value)); } }
public virtual void OnBeforeSerialize() { actorsJsonMap.Clear(); foreach (var kv in ActorsMap) { var stateJson = kv.Value.ToJson(); actorsJsonMap.Add(kv.Key, stateJson); } }
/// <summary> /// Purges all the custom global state variables and restores the /// pre-defined values specified in the service configuration. /// </summary> public void ResetGlobalVariables() { globalVariableMap?.Clear(); foreach (var varData in config.PredefinedVariables) { if (!IsGlobalVariable(varData.Name)) { continue; } SetVariableValue(varData.Name, varData.Value); } }
public virtual void ResetGlobalVariables() { globalVariableMap?.Clear(); foreach (var varData in Configuration.PredefinedVariables) { if (!CustomVariablesConfiguration.IsGlobalVariable(varData.Name)) { continue; } var value = ExpressionEvaluator.Evaluate <string>(varData.Value, e => LogInitializeVarError(varData.Name, varData.Value, e)); SetVariableValue(varData.Name, value); } }
public override void ResetService() { base.ResetService(); charIdToAvatarPathMap.Clear(); }