Created
March 27, 2017 14:14
-
-
Save tsubaki/d5c3a160e50b4b3ab7f1cb9420688263 to your computer and use it in GitHub Desktop.
ゲームのビルド前とビルド後に処理を行う
This file contains 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor.Build; | |
using UnityEditor.Callbacks; | |
using UnityEditor; | |
public class Processor : IPreprocessBuild, IPostprocessBuild { | |
// ビルド前処理 | |
public void OnPreprocessBuild (UnityEditor.BuildTarget target, string path) | |
{ | |
var filePath = Application.streamingAssetsPath + "/01.png"; | |
var nextPath = "StreamingAssetsTemp" + "/01.png"; | |
System.IO.Directory.Move (filePath, nextPath); | |
} | |
// ビルド後処理 | |
public void OnPostprocessBuild (BuildTarget target, string path) | |
{ | |
var filePath = "StreamingAssetsTemp" + "/01.png"; | |
var nextPath = Application.streamingAssetsPath + "/01.png"; | |
System.IO.Directory.Move (filePath, nextPath); | |
} | |
// 実行順 | |
public int callbackOrder { get { return 0; } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment