Last active
October 4, 2015 16:54
-
-
Save asm256/2a4fd9aa9be9cf3c4ba3 to your computer and use it in GitHub Desktop.
YASDをUnityInjector 1.0.3.0以上でコンパイルする方法
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.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