File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1022,8 +1022,9 @@ protected virtual void Load()
1022
1022
LoadDefaults ( ) ;
1023
1023
} else {
1024
1024
try {
1025
- var fileData = System . IO . File . ReadAllText ( filePath ) ;
1025
+ var fileData = System . IO . File . ReadAllText ( filePath ) ;
1026
1026
EditorJsonUtility . FromJsonOverwrite ( fileData , s_Instance ) ;
1027
+ checkForNewVariables ( fileData ) ;
1027
1028
} catch ( Exception xcp ) {
1028
1029
// Quash the exception and take the default settings.
1029
1030
Debug . LogException ( xcp ) ;
@@ -1032,6 +1033,19 @@ protected virtual void Load()
1032
1033
}
1033
1034
}
1034
1035
1036
+ /// <summary>
1037
+ /// Check the FBXSettings for any variables we don't know about yet. (in case we are using a new version of the importer)
1038
+ /// We'll want to update this with any new significant UI options.
1039
+ /// </summary>
1040
+ /// <param name="FileData"></param>
1041
+ private void checkForNewVariables ( string FileData )
1042
+ {
1043
+ if ( ! FileData . Contains ( "HideSendToUnityMenu" ) )
1044
+ {
1045
+ ExportSettings . instance . HideSendToUnityMenu = true ;
1046
+ }
1047
+ }
1048
+
1035
1049
protected virtual void Save ( bool saveAsText )
1036
1050
{
1037
1051
if ( s_Instance == null )
You can’t perform that action at this time.
0 commit comments