Пример #1
0
        /// <summary>
        /// Inherits settings from parent Universal platform class
        /// </summary>
        /// <param name="settings">The parents settings</param>
        public void InheritSettings(UniversalSettings settings)
        {
            if (this.TextureAnisoLevel < 0)
            {
                this.TextureAnisoLevel = settings.TextureAnisoLevel;
            }

            if (this.TexturePixelsPerUnit < 0)
            {
                this.TexturePixelsPerUnit = settings.TexturePixelsPerUnit;
            }

            if (this.MaxTextureSize < 0)
            {
                this.MaxTextureSize = settings.MaxTextureSize;
            }

            if (this.AudioSampleRate < 0)
            {
                this.AudioSampleRate = settings.AudioSampleRate;
            }

            if (this.AudioCompressionFormat < 0)
            {
                this.AudioCompressionFormat = settings.AudioCompressionFormat;
            }

            if (this.AudioLoadType < 0)
            {
                this.AudioLoadType = settings.AudioLoadType;
            }
        }
 /// <summary>
 /// Applies Universal platform settings
 /// </summary>
 /// <param name="settings">The settings to apply</param>
 /// <param name="path">The path to apply the settings to</param>
 private static void ApplyUniversalSettings(UniversalSettings settings, string path)
 {
     if (settings.AudioCompressionFormat > 0)
     {
         ApplyAudioCompressionFormat(path, settings.AudioCompressionFormat);
     }
     if (settings.AudioLoadType > 0)
     {
         ApplyAudioLoadType(path, settings.AudioLoadType);
     }
     if (settings.AudioSampleRate > 0)
     {
         ApplyAudioSampleRate(path, settings.AudioSampleRate);
     }
     if (settings.TextureAnisoLevel > 0)
     {
         ApplyTextureAnisoLevel <Texture>(path, settings.TextureAnisoLevel);
         ApplyTextureAnisoLevel <Texture2D>(path, settings.TextureAnisoLevel);
     }
     if (settings.MaxTextureSize > 0)
     {
         ApplyMaxTextureSize <Texture>(path, settings.MaxTextureSize);
         ApplyMaxTextureSize <Texture2D>(path, settings.MaxTextureSize);
     }
     if (settings.TexturePixelsPerUnit > 0)
     {
         ApplyTexturePixelsPerUnit <Texture>(path, settings.TexturePixelsPerUnit);
         ApplyTexturePixelsPerUnit <Texture2D>(path, settings.TexturePixelsPerUnit);
     }
 }
        /// <summary>
        /// Initializes all variables within the class
        /// </summary>
        /// <returns>Returns itself</returns>
        public ImportSettings Initialize()
        {
            this.UniversalSettings = new UniversalSettings().Initialize();

            this.AndroidSettings = new AndroidSettings().Initialize();

            return(this);
        }