Created
April 12, 2023 05:01
-
-
Save onotchi/116d2acda0e55ef31e526800fefffdbf to your computer and use it in GitHub Desktop.
UnityでBuild後にUnity.exeのファイル更新日時を上書きする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
public class BuildPostprocessor | |
{ | |
[PostProcessBuild] | |
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) | |
{ | |
//Exeの最終更新日時を現在時刻で上書き | |
File.SetLastWriteTime(pathToBuiltProject, DateTime.Now); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
任意のEditorフォルダの中に上記ソースを置いてビルドすればOK