We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a138930 commit 67a7447Copy full SHA for 67a7447
Assets/FbxExporters/Editor/FbxExporterRepairMissingScripts.cs
@@ -71,8 +71,9 @@ private static bool ReplaceGUIDInFile (string path)
71
var sr = new StreamReader (path);
72
73
// verify that this is a text file
74
+ var firstLine = "";
75
if(sr.Peek() > -1){
- var firstLine = sr.ReadLine();
76
+ firstLine = sr.ReadLine();
77
if(!firstLine.StartsWith("%YAML")){
78
sr.Close ();
79
return false;
@@ -81,6 +82,10 @@ private static bool ReplaceGUIDInFile (string path)
81
82
83
var sw = new StreamWriter (path + ".remap", false);
84
85
+ if(!string.IsNullOrEmpty(firstLine)){
86
+ sw.WriteLine(firstLine);
87
+ }
88
+
89
while (sr.Peek () > -1) {
90
var line = sr.ReadLine ();
91
0 commit comments