Пример #1
0
 public void Read(AssetReader reader)
 {
     TextureSettings.Read(reader);
     m_platformSettings = reader.ReadAssetArray <TextureImporterPlatformSettings>();
     PackingSettings.Read(reader);
     VariantMultiplier = reader.ReadSingle();
     m_packables       = reader.ReadAssetArray <PPtr <Object> >();
     BindAsDefault     = reader.ReadBoolean();
     reader.AlignStream(AlignType.Align4);
 }
Пример #2
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(TextureSettingsName, TextureSettings.ExportYAML(container));
            node.Add(PlatformSettingsName, GetPlatformSettings(container.Version, container.ExportVersion).ExportYAML(container));
            node.Add(GetPackingSettingsName(container.ExportVersion), PackingSettings.ExportYAML(container));
            node.Add(VariantMultiplierName, VariantMultiplier);
            node.Add(PackablesName, Packables.ExportYAML(container));
            node.Add(BindAsDefaultName, BindAsDefault);
            return(node);
        }
Пример #3
0
 public SpriteAtlasEditorData(IReadOnlyList <PPtr <Sprite> > packables)
 {
     TextureSettings    = new TextureSettings(true);
     m_platformSettings = new TextureImporterPlatformSettings[0];
     PackingSettings    = new PackingSettings(true);
     VariantMultiplier  = 1;
     m_packables        = new PPtr <Object> [packables.Count];
     for (int i = 0; i < packables.Count; i++)
     {
         m_packables[i] = packables[i].CastTo <Object>();
     }
     BindAsDefault = true;
 }
Пример #4
0
 public void Read(AssetReader reader)
 {
     TextureSettings.Read(reader);
     PlatformSettings = reader.ReadAssetArray <TextureImporterPlatformSettings>();
     PackingSettings.Read(reader);
     VariantMultiplier = reader.ReadSingle();
     Packables         = reader.ReadAssetArray <PPtr <Object> >();
     BindAsDefault     = reader.ReadBoolean();
     if (HasStoredHash(reader.Version))
     {
         StoredHash.Read(reader);
     }
     reader.AlignStream();
 }