Ejemplo n.º 1
0
        protected override void Apply()
        {
            FileStream fileStream = new FileStream(((AssetImporter)target).assetPath, FileMode.Open, FileAccess.Read);
            var        doc        = PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load(fileStream, ELoadFlag.Header | ELoadFlag.ColorMode);

            PSDApplyEvent evt = new PSDApplyEvent()
            {
                instance_id           = target.GetInstanceID(),
                texture_type          = m_TextureType.intValue,
                sprite_mode           = m_SpriteMode.intValue,
                mosaic_layer          = m_MosaicLayers.boolValue,
                import_hidden_layer   = m_ImportHiddenLayers.boolValue,
                character_mode        = m_CharacterMode.boolValue,
                generate_go_hierarchy = m_GenerateGOHierarchy.boolValue,
                reslice_from_layer    = m_ResliceFromLayer.boolValue,
                is_character_rigged   = IsCharacterRigged(),
                is_psd     = IsPSD(doc),
                color_mode = FileColorMode(doc)
            };

            AnalyticFactory.analytics.SendApplyEvent(evt);
            base.Apply();
        }
Ejemplo n.º 2
0
 public AnalyticsResult SendApplyEvent(PSDApplyEvent evt)
 {
     return(EditorAnalytics.SendEventWithLimit("psdImporterApply", evt, k_Version));
 }