Ejemplo n.º 1
0
        /// <summary>
        /// Called by the XNA Framework when importing a .x file to be used as a game asset. This is the method called by the XNA Framework when an asset is to be imported into an object that can be recognized by the Content Pipeline.
        /// </summary>
        /// <param name="filename">Name of a game asset file.</param>
        /// <param name="context">Contains information for importing a game asset, such as a logger interface.</param>
        /// <returns>Resulting game asset.</returns>
        public override NodeContent Import(string filename, ContentImporterContext context)
        {
            var importer = new OpenAssetImporter
            {
                ImporterName = "XImporter",
            };

            return(importer.Import(filename, context));
        }
Ejemplo n.º 2
0
        public override NodeContent Import(string filename, ContentImporterContext context)
        {
            if (filename == null)
            {
                throw new ArgumentNullException("filename");
            }
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            var importer = new OpenAssetImporter("FbxImporter", true);

            return(importer.Import(filename, context));
        }