/// <summary>
        /// 生成类适配器
        /// </summary>
        void GenCrossBindAdapter()
        {
            Assembly[] assemblys = AppDomain.CurrentDomain.GetAssemblies();
            Type       type      = null;
            bool       isFindAsm = false;

            foreach (var assembly in assemblys)
            {
                var name = assembly.GetName().Name;
                if (name == assemblyName)
                {
                    type      = assembly.GetType(adapterClassName);
                    isFindAsm = true;
                    break;
                }
            }

            if (!isFindAsm)
            {
                Debug.Log("程序集名找不到");
                EditorWindow.focusedWindow.ShowNotification(new GUIContent("程序集名找不到"));
                return;
            }

            if (isFindAsm && type == null)
            {
                Debug.Log("类名找不到,检查一下命名空间和名字");
                EditorWindow.focusedWindow.ShowNotification(new GUIContent("类名找不到,检查一下命名空间和名字"));
                return;
            }

            GenAdapter.CreateAdapter(type, "Assets/" + ILRuntimeScriptSetting.Default.GenAdaptorPath);
        }
    /// <summary>
    /// 生成类适配器
    /// </summary>
    static void GenCrossBindAdapter()
    {
        var types = new List <Type>();

        types.Add((typeof(UnityEngine.ScriptableObject)));
        types.Add((typeof(System.Exception)));
        types.Add(typeof(System.Collections.IEnumerable));
        GenAdapter.CreateAdapter(types, "Assets/Code/Game/ILRuntime/Adapter");
    }
Exemple #3
0
    /// <summary>
    /// 生成类适配器
    /// </summary>
    static void GenCrossBindAdapter()
    {
        var types = new List <Type>();

        types.Add((typeof(UnityEngine.ScriptableObject)));
        types.Add((typeof(System.Exception)));
        types.Add(typeof(System.Collections.IEnumerable));
        types.Add(typeof(System.Runtime.CompilerServices.IAsyncStateMachine));
        types.Add(typeof(IGameStart));
        types.Add(typeof(ADataListener));
        GenAdapter.CreateAdapter(types, "Assets/Code/Game/ILRuntime/Adapter");
    }
Exemple #4
0
    /// <summary>
    /// 生成类适配器
    /// </summary>
    static void GenCrossBindAdapter()
    {
        var types = new List <Type>();

        types.Add((typeof(UnityEngine.ScriptableObject)));
        types.Add((typeof(System.Exception)));
        types.Add(typeof(System.Collections.IEnumerable));
        types.Add(typeof(System.Runtime.CompilerServices.IAsyncStateMachine));
        types.Add(typeof(IGameStart));
        types.Add(typeof(Attribute));
        //types.Add(typeof(SerializedMonoBehaviour));
        GenAdapter.CreateAdapter(types, "Assets/Code/BDFramework.Game/ILRuntime/Adapter");
    }
Exemple #5
0
    /// <summary>
    /// 生成类适配器
    /// </summary>
    public static void GenCrossBindAdapter()
    {
#if ILRUNTIME
        var types = new List <Type>();
        types.Add((typeof(UnityEngine.ScriptableObject)));
        types.Add((typeof(System.Exception)));
        types.Add(typeof(System.Collections.IEnumerable));
        types.Add(typeof(System.Runtime.CompilerServices.IAsyncStateMachine));
        types.Add(typeof(IManager));
        //types.Add(typeof(ADataListener));
        //types.Add(typeof(Attribute));
        //types.Add(typeof(SerializedMonoBehaviour));
        GenAdapter.CreateAdapter(types, "Assets/LWFramework/ILRuntime/Adapter");
#else
        Debug.Log("当前不是IL模式");
#endif
    }