SetDefaultTextures() private method

private SetDefaultTextures ( string name, Texture textures ) : void
name string
textures UnityEngine.Texture
return void
Example #1
0
        internal override void Apply()
        {
            base.Apply();
            ShaderImporter target = base.target as ShaderImporter;

            if (target != null)
            {
                target.SetDefaultTextures(this.propertyNames.ToArray(), this.textures.ToArray());
                AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target));
            }
        }
        protected override void Apply()
        {
            base.Apply();
            ShaderImporter shaderImporter = base.target as ShaderImporter;

            if (!(shaderImporter == null))
            {
                shaderImporter.SetDefaultTextures(this.propertyNames.ToArray(), this.textures.ToArray());
                AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(shaderImporter));
            }
        }
        internal override void Apply()
        {
            base.Apply();
            ShaderImporter shaderImporter = this.target as ShaderImporter;

            if (shaderImporter == null)
            {
                return;
            }
            shaderImporter.SetDefaultTextures(this.propertyNames.ToArray(), this.textures.ToArray());
            AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(shaderImporter));
        }
        internal override void Apply()
        {
            base.Apply();
            ShaderImporter target = this.target as ShaderImporter;

            if ((UnityEngine.Object)target == (UnityEngine.Object)null)
            {
                return;
            }
            target.SetDefaultTextures(this.propertyNames.ToArray(), this.textures.ToArray());
            AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath((UnityEngine.Object)target));
        }
        protected override void Apply()
        {
            base.Apply();
            ShaderImporter shaderImporter = base.target as ShaderImporter;

            if (!(shaderImporter == null))
            {
                string[] name = (from x in this.m_Properties
                                 where x.modifiable
                                 select x.propertyName).ToArray <string>();
                Texture[] textures = (from x in this.m_Properties
                                      where x.modifiable
                                      select x.texture).ToArray <Texture>();
                shaderImporter.SetDefaultTextures(name, textures);
                string[] name2 = (from x in this.m_Properties
                                  where !x.modifiable
                                  select x.propertyName).ToArray <string>();
                Texture[] textures2 = (from x in this.m_Properties
                                       where !x.modifiable
                                       select x.texture).ToArray <Texture>();
                shaderImporter.SetNonModifiableTextures(name2, textures2);
                AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(shaderImporter));
            }
        }