예제 #1
0
    public static void MockUnityDlls()
    {
        List <Assembly> assemblies = new List <Assembly>();

        foreach (Assembly assy in AppDomain.CurrentDomain.GetAssemblies())
        {
            if (assy.FullName.Contains("Unity"))
            {
                assemblies.Add(assy);
            }
        }

        StringBuilder sb           = new StringBuilder();
        Mockery       unityMockery = new Mockery(
            delegate(string[] output)
        {
            foreach (string s in output)
            {
                sb.AppendLine(s);
            }
        },
            assemblies
            );

        unityMockery.SaveMockery(Application.dataPath + "/../Mockery");
        Debug.Log(sb);

        System.Diagnostics.Process.Start("open", Application.dataPath + "/../Mockery");
    }