public override bool ManualRead(string property, object value) { switch (property) { case "Def": Def = (NetworkGUID)value; break; case "ModifiedAttributes": ModifiedAttributes = (DebuggingObject[])value; break; case "AttributeName": AttributeName = (string)value; break; case "Attribute": Attribute = (NetworkGUID)value; break; case "AttributeOwner": AttributeOwner = (NetworkGUID)value; break; case "TotalMagnitude": TotalMagnitude = (float)value; break; case "EffectContext": EffectContext = (FGameplayEffectContextHandle)value; break; case "AggregatedSourceTags": AggregatedSourceTags = (FGameplayTagContainer)value; break; case "AggregatedTargetTags": AggregatedTargetTags = (FGameplayTagContainer)value; break; case "Level": Level = (float)value; break; case "AbilityLevel": AbilityLevel = (float)value; break; case "PredictionKey": PredictionKey = (FPredictionKey)value; break; default: return(base.ManualRead(property, value)); } return(true); }
public void PredictionKeyTest(byte[] rawData, int bitCount) { var reader = new NetBitReader(rawData, bitCount); var key = new FPredictionKey(); key.Serialize(reader); Assert.True(reader.AtEnd()); Assert.False(reader.IsError); }