Ejemplo n.º 1
0
        public override IEnumerable<AssetItem> Import(UFile rawAssetPath, AssetImporterParameters importParameters)
        {
            var asset = new TextureAsset { Source = rawAssetPath };

            // Creates the url to the texture
            var textureUrl = new UFile(rawAssetPath.GetFileName(), null);

            yield return new AssetItem(textureUrl, asset);
        }
Ejemplo n.º 2
0
        public override IEnumerable <AssetItem> Import(UFile rawAssetPath, AssetImporterParameters importParameters)
        {
            var asset = new TextureAsset {
                Source = rawAssetPath
            };

            // Creates the url to the texture
            var textureUrl = new UFile(rawAssetPath.GetFileName(), null);

            yield return(new AssetItem(textureUrl, asset));
        }
Ejemplo n.º 3
0
 public TextureConvertParameters(
     UFile sourcePathFromDisk,
     TextureAsset texture,
     PlatformType platform,
     GraphicsPlatform graphicsPlatform,
     GraphicsProfile graphicsProfile,
     TextureQuality textureQuality,
     ColorSpace colorSpace)
 {
     SourcePathFromDisk = sourcePathFromDisk;
     Texture            = texture;
     Platform           = platform;
     GraphicsPlatform   = graphicsPlatform;
     GraphicsProfile    = graphicsProfile;
     TextureQuality     = textureQuality;
     ColorSpace         = colorSpace;
 }
Ejemplo n.º 4
0
        private static void ImportTextures(IEnumerable<string> textureDependencies, List<AssetItem> assetReferences)
        {
            if (textureDependencies == null)
                return;

            foreach (var textureFullPath in textureDependencies.Distinct(x => x))
            {
                var texturePath = new UFile(textureFullPath);

                var source = texturePath;
                var texture = new TextureAsset { Source = source, PremultiplyAlpha = false };

                // Create asset reference
                assetReferences.Add(new AssetItem(texturePath.GetFileName(), texture));
            }
        }