2021년 4학년 1학기 기업연계프로젝트2 컴퓨터소프트웨어공학과 <원광투어팀> 팀장 : 송유진 팀원 : 김나영, 이경희, 한유진
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

5 years ago
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4. using UnityEditor.Callbacks;
  5. using System.IO;
  6. namespace Valve.VR
  7. {
  8. public class SteamVR_Input_PostProcessBuild
  9. {
  10. [PostProcessBuildAttribute(1)]
  11. public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
  12. {
  13. }
  14. private static void UpdateAppKey(string newFilePath, string executableName)
  15. {
  16. if (File.Exists(newFilePath))
  17. {
  18. string jsonText = System.IO.File.ReadAllText(newFilePath);
  19. string findString = "\"app_key\" : \"";
  20. int stringStart = jsonText.IndexOf(findString);
  21. if (stringStart == -1)
  22. {
  23. }
  24. else
  25. return; //no app key
  26. stringStart += findString.Length;
  27. int stringEnd = jsonText.IndexOf(",", stringStart + findString.Length);
  28. int stringLength = stringEnd - stringStart + 1;
  29. string removed = jsonText.Remove(stringStart, stringLength);
  30. FileInfo file = new FileInfo(newFilePath);
  31. file.IsReadOnly = false;
  32. File.WriteAllText(newFilePath, removed);
  33. }
  34. }
  35. }
  36. }