public static AnimationUsage ReadFrom([NotNull] UnsafeReader reader) { var animationReference = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader); var animationName = reader.ReadString(); var sampleRate = reader.ReadInt(); var functionName = reader.ReadString(); if (animationName is null || functionName is null) { return(null); } var time = reader.ReadDouble(); var guid = reader.ReadGuid(); return(new AnimationUsage(animationReference, animationName, sampleRate, functionName, time, guid)); }