Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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