示例#1
0
        /// <summary>
        /// Imports the texture asset file to the target location.
        /// </summary>
        /// <param name="inputPath">The source file path.</param>
        /// <param name="outputPath">The result asset file path.</param>
        /// <param name="settings">The settings.</param>
        /// <returns>True if importing failed, otherwise false.</returns>
        public static bool Import(string inputPath, string outputPath, TextureImportSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException();
            }

            TextureImportSettings.InternalOptions internalOptions;
            settings.ToInternal(out internalOptions);
            return(Internal_ImportTexture(inputPath, outputPath, ref internalOptions));
        }
示例#2
0
        public static bool Import(string inputPath, string outputPath, TextureImportSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException();
            }
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            TextureImportSettings.InternalOptions internalOptions;
            settings.ToInternal(out internalOptions);
            return(Internal_ImportTexture(inputPath, outputPath, ref internalOptions));
#endif
        }