Exemple #1
0
 private void InstallPackageButtonGUI(string packageName)
 {
     if (GUILayout.Button("Install", GUILayout.Width(100)))
     {
         ExtensionManager.InstallShaderExtension(packageName);
         ExtensionManager.UpdateShaderResources();
         CacheExtensions();
     }
 }
Exemple #2
0
 private void InstallShaderExtensionGUI()
 {
     if (!ExtensionManager.IsShaderExtensionAvailable(BlendModeEffect.ShaderFamily))
     {
         EditorGUILayout.HelpBox($"`{BlendModeEffect.ShaderFamily}` shader family is not available.", MessageType.Warning);
         EditorGUILayout.HelpBox("You can add your own shader extensions; see `Adding shader extensions` in the docs for more info.", MessageType.Info);
         return;
     }
     EditorGUILayout.HelpBox($"`{BlendModeEffect.ShaderFamily}` shader extension is available, but not installed.", MessageType.Info);
     if (GUILayout.Button("Install shader extension"))
     {
         ExtensionManager.InstallShaderExtension(BlendModeEffect.ShaderFamily);
         BlendModeEffect.InitializeComponentExtension();
     }
 }