コード例 #1
0
 private void ShaderPropertiesGUI(Material material)
 {
     EditorGUI.BeginChangeCheck();
     {
         BlendModePopup();
         AKSUIHelper.ShurikenHeader("Main");
         EditorGUILayout.Space();
         EditorGUILayout.LabelField("Textures", EditorStyles.boldLabel);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(mainTex.displayName), mainTex, mainColor, true);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(tex2.displayName), tex2, color2, true);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(tex3.displayName), tex3, color3, true);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(tex4.displayName), tex4, color4, true);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(tex5.displayName), tex5, color5, true);
         m_MaterialEditor.TexturePropertyWithHDRColor(new GUIContent(tex6.displayName), tex6, color6, true);
         EditorGUILayout.Space();
         EditorGUILayout.LabelField("Overlay Target", EditorStyles.boldLabel);
         m_MaterialEditor.ShaderProperty(enableVR, enableVR.displayName);
         m_MaterialEditor.ShaderProperty(enableDesktop, enableDesktop.displayName);
         m_MaterialEditor.ShaderProperty(enableSS, enableSS.displayName);
         m_MaterialEditor.ShaderProperty(enableOther, enableOther.displayName);
         if (__alphaOption)
         {
             EditorGUILayout.Space();
             EditorGUILayout.LabelField("Alpha Option", EditorStyles.boldLabel);
             m_MaterialEditor.ShaderProperty(cutoff, cutoff.displayName);
         }
         EditorGUILayout.Space();
         EditorGUILayout.LabelField("Rendering Option", EditorStyles.boldLabel);
         m_MaterialEditor.ShaderProperty(ztest, ztest.displayName);
         //m_MaterialEditor.ShaderProperty(zwrite, zwrite.displayName);
         //m_MaterialEditor.ShaderProperty(srcFactor, srcFactor.displayName);
         //m_MaterialEditor.ShaderProperty(dstFactor, dstFactor.displayName);
         m_MaterialEditor.RenderQueueField();
     }
     if (EditorGUI.EndChangeCheck())
     {
         MaterialChanged(material);
     }
     AKSUIHelper.ShurikenHeader(AKSStyles.nameAKTextureOverlay6);
     EditorGUILayout.LabelField(AKSStyles.author);
     AKSManager.DisplayVersion();
     EditorGUILayout.Space();
     EditorGUILayout.BeginHorizontal();
     if (GUILayout.Button(AKSStyles.btnReadme))
     {
         AKSUIHelper.OpenLink(AKSStyles.linkReadme);
     }
     if (GUILayout.Button(AKSStyles.btnDescription))
     {
         AKSUIHelper.OpenLink(AKSStyles.linkDescription);
     }
     EditorGUILayout.EndHorizontal();
 }
コード例 #2
0
 public static void DisplayVersion()
 {
     EditorGUILayout.LabelField(AKSStyles.localVer + EditorUserSettings.GetConfigValue("akstextureoverlay_version_local"));
     EditorGUILayout.LabelField(AKSStyles.remoteVer + EditorUserSettings.GetConfigValue("akstextureoverlay_version_remote"));
     if (bool.TryParse(EditorUserSettings.GetConfigValue("akstextureoverlay_need_update"), out bool needupdate) && needupdate)
     {
         //EditorGUILayout.BeginHorizontal();
         if (GUILayout.Button(AKSStyles.btnUpdate))
         {
             AKSUIHelper.OpenLink(AKSStyles.linkRelease);
         }
         if (GUILayout.Button(AKSStyles.btnBooth))
         {
             AKSUIHelper.OpenLink(AKSStyles.linkBooth);
         }
         //EditorGUILayout.EndHorizontal();
     }
 }