Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
YASDをUnityInjector 1.0.3.0以上でコンパイルする方法
using System.Reflection;
//以上をusingなんたらの一番下にでも置く
//以下をnamespace なんとかの{の直下に置く
static internal class LINQExt {
public static void ForEach<T>(this IEnumerable<T> self , Action<T> act) {
foreach(var cur in self) act(cur);
}
}
public static class UnityExtensionsBridge {
static UnityExtensionsBridge() {
klass = Type.GetType("UnityInjector.Extensions,UnityInjector");
}
static Type klass = null;
public static string UserDataPath {
get {
return (string)klass.GetMethod("get_UserDataPath").Invoke(null,null);
}
}
}
// UnityInjector.Extensions.UserDataPath を UnityExtensionsBridge.UserDataPath で置換する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment