/// <summary> /// Split a property line into it's key-value pair and place into a given dictionary. /// </summary> /// <param name="line">The full content of the line to process.</param> /// <param name="properties">Dictionary to add the new property to if parse is successful.</param> private void ParseProperty(NumberedLine line, Dictionary <string, string> properties) { var keyValPair = line.Text.Substring(line.Text.IndexOf(Symbol.PropertyChar) + 1); var keyValSplit = keyValPair.Split(Symbol.PropertyDelim.ToCharArray(), 2); if (keyValSplit.Length > 1) { properties[keyValSplit[0].Trim()] = keyValSplit[1].Trim(); } else { WarnInvalidProperty(line); } }
private void WarnInvalidProperty(NumberedLine line) => Debug.LogWarning( $"The storyboard data asset \"{AssetName}\" Contains an invalid property on line {line.Number} \"{line.Text}\". Must be of format {{key}}={{value}}." );
private void WarnTooManyInitialStoryboards(NumberedLine line) => Debug.LogWarning( $"The storyboard data asset \"{AssetName}\" has an extra initial storyboard on line ${line.Number}. Only one nameless entry is allowed per file." );