Skip to content

Commit cfca039

Browse files
committed
Fix location of link xml file. We need a location that is persistent and not cleaned when exiting Unity Editor (ISX-2140)
1 parent aec5efc commit cfca039

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Packages/com.unity.inputsystem/InputSystem/Editor/BuildPipeline/LinkFileGenerator.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ public string GenerateAdditionalLinkXmlFile(BuildReport report, UnityLinkerBuild
7777

7878
sb.AppendLine("</linker>");
7979

80-
var filePathName = Path.Combine(Application.dataPath, "..", "Temp", "InputSystemLink.xml");
81-
File.WriteAllText(filePathName, sb.ToString());
82-
return filePathName;
80+
var linkXmlDirectory = Path.Combine(Application.dataPath, "..", "Library", "InputSystem");
81+
var linkXmlFile = Path.Combine(linkXmlDirectory, $"{data.target}Link.xml");
82+
83+
Directory.CreateDirectory(linkXmlDirectory);
84+
File.WriteAllText(linkXmlFile, sb.ToString());
85+
return linkXmlFile;
8386
}
8487

8588
static bool IsTypeUsedViaReflectionByInputSystem(Type type)

0 commit comments

Comments
 (0)