public void Write(AssetWriter writer) { GUIStyleStateLayout layout = writer.Layout.Serialized.GUIStyle.GUIStyleState; Background.Write(writer); if (layout.HasScaledBackgrounds) { writer.WriteAssetArray(ScaledBackgrounds); } TextColor.Write(writer); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); GUIStyleStateLayout layout = container.ExportLayout.Serialized.GUIStyle.GUIStyleState; node.Add(layout.BackgroundName, Background.ExportYAML(container)); if (layout.HasScaledBackgrounds) { node.Add(layout.ScaledBackgroundsName, ScaledBackgrounds.ExportYAML(container)); } node.Add(layout.TextColorName, TextColor.ExportYAML(container)); return(node); }
public void Read(AssetReader reader) { GUIStyleStateLayout layout = reader.Layout.Serialized.GUIStyle.GUIStyleState; Background.Read(reader); if (layout.HasScaledBackgrounds) { ScaledBackgrounds = reader.ReadAssetArray <PPtr <Texture2D> >(); } else { ScaledBackgrounds = Array.Empty <PPtr <Texture2D> >(); } TextColor.Read(reader); }