File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,15 @@ public override void OnInspectorGUI() {
178
178
179
179
EditorGUILayout . Space ( ) ;
180
180
181
-
181
+ // disable button if no 3D application is available
182
+ EditorGUI . BeginDisabledGroup ( ExportSettings . IsDCCDropdownEmpty ( ) ? true : false ) ;
182
183
var installIntegrationContent = new GUIContent (
183
184
"Install Unity Integration" ,
184
185
"Install and configure the Unity integration for the selected 3D application so that you can import and export directly with this project." ) ;
185
186
if ( GUILayout . Button ( installIntegrationContent ) ) {
186
187
FbxExporters . Editor . IntegrationsUI . InstallDCCIntegration ( ) ;
187
188
}
189
+ EditorGUI . EndDisabledGroup ( ) ;
188
190
189
191
GUILayout . FlexibleSpace ( ) ;
190
192
GUILayout . EndScrollView ( ) ;
@@ -729,7 +731,12 @@ public static string GetSelectedDCCPath()
729
731
730
732
public static string GetSelectedDCCName ( )
731
733
{
732
- return ( instance . dccOptionPaths . Count > 0 ) ? instance . dccOptionNames [ instance . selectedDCCApp ] : "" ;
734
+ return ( instance . dccOptionNames . Count > 0 ) ? instance . dccOptionNames [ instance . selectedDCCApp ] : "" ;
735
+ }
736
+
737
+ public static bool IsDCCDropdownEmpty ( )
738
+ {
739
+ return instance . dccOptionPaths . Count <= 0 ;
733
740
}
734
741
735
742
/// <summary>
You can’t perform that action at this time.
0 commit comments