UnityEditor.ProceduralMaterialInspector.ProceduralPlatformSetting.ProceduralPlatformSetting C# (CSharp) Method

ProceduralPlatformSetting() public method

public ProceduralPlatformSetting ( Object objects, string _name, BuildTarget _target, Texture2D _icon ) : System
objects Object
_name string
_target BuildTarget
_icon UnityEngine.Texture2D
return System
            public ProceduralPlatformSetting(Object[] objects, string _name, BuildTarget _target, Texture2D _icon)
            {
                this.targets = objects;
                this.m_Overridden = false;
                this.target = _target;
                this.name = _name;
                this.icon = _icon;
                this.m_Overridden = false;
                if (this.name != "")
                {
                    foreach (ProceduralMaterial material in this.targets)
                    {
                        SubstanceImporter atPath = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(material)) as SubstanceImporter;
                        if ((atPath != null) && atPath.GetPlatformTextureSettings(material.name, this.name, out this.maxTextureWidth, out this.maxTextureHeight, out this.m_TextureFormat, out this.m_LoadBehavior))
                        {
                            this.m_Overridden = true;
                            break;
                        }
                    }
                }
                if (!this.m_Overridden && (this.targets.Length > 0))
                {
                    SubstanceImporter importer2 = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(this.targets[0])) as SubstanceImporter;
                    if (importer2 != null)
                    {
                        importer2.GetPlatformTextureSettings((this.targets[0] as ProceduralMaterial).name, "", out this.maxTextureWidth, out this.maxTextureHeight, out this.m_TextureFormat, out this.m_LoadBehavior);
                    }
                }
            }
ProceduralMaterialInspector.ProceduralPlatformSetting