void OnEnable()
        {
            UnityEngine.Object[] selectObject = Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets);

            if (selectObject == null || selectObject.Length > 1)
            {
                return;
            }

            mPluginDir = AssetDatabase.GetAssetPath(selectObject[0]);


            string dirName = Path.GetFileName(mPluginDir).ToLower();

            PTPluginConfigData resConfig = PTPluginConfigData.GetPluginConfig();



            PTPluginUtil.PTPluginInfos remoteInfos = PTPluginUtil.GetPluginWithName(resConfig.serverUrl, dirName);

            PluginInfo localPluginInfo = GetLocalPluginInfo();

            if (remoteInfos != null && remoteInfos.plugins.Count > 0)
            {
                foreach (var item in remoteInfos.plugins)
                {
                    if (localPluginInfo != null && item.type == localPluginInfo.type)
                    {
                        mRemotePluginInfo = item;

                        break;
                    }
                }

                if (mRemotePluginInfo == null)
                {
                    mRemotePluginInfo = remoteInfos.plugins[0];
                }
            }


//			mRemotePluginInfo = PTPluginUtil.GetPluginWithName(resConfig.serverUrl,dirName);


            mPluginTypes = PTPluginUtil.GetServerAllTypeNames(resConfig.serverUrl);

            if (mRemotePluginInfo != null)
            {
                mHasRemotePlugin = true;

                mPluginInfo = mRemotePluginInfo;

                mVersionText = mPluginInfo.version;

                mReadmeText = mPluginInfo.readme.GetItem(mPluginInfo.version).content;

                mPluginTypeIndex = Array.IndexOf(mPluginTypes, mPluginInfo.type);



                if (localPluginInfo != null)
                {
                    mLocalVersionText = localPluginInfo.version;

                    Version v1 = new Version(localPluginInfo.version);

                    Version v2 = new Version(mPluginInfo.version);

                    if (v1.CompareTo(v2) != 0)
                    {
                        EditorUtility.DisplayDialog("warning", "本地版本跟服务器版本不一致,请确认", "确定");
                    }
                }
            }
            else
            {
                mHasRemotePlugin = false;
                mPluginInfo      = new PluginInfo();
            }

            mPluginInfo.name = Path.GetFileName(mPluginDir).ToLower();

            EditorApplication.update += Update;
        }