编译器扩展插件转Source
一:先改文件结构
将文件剪切直接粘贴到Source中,并修改目录下的
文件目录下为,1,private 2,public, 3Resources,4,xxxx.build.cs
二:代码修改
首先在xxxEditor.Target.cs文件中,添加好对应的模块,
然后修改原来插件下面的xxxStyle.h,找到ReloadTextures
方法,点开后修改原来指向插件的路径,现在指向本身,
例子:
Style->SetContentRoot(IPluginManager::Get().FindPlugin("TestStandalone")->GetBaseDir()/ TEXT("TestStandalone/Resources"));
修改后:
Style->SetContentRoot(FPaths::GameSourceDir()/ TEXT("TestStandalone/Resources"));
三:Uproject
在xxx.Uproject中,也就是启动文件中添加对应模块
例如:
{
"Name": "TestStandalone",
"Type": "Editor",
"LoadingPhase": "Default"
}
类型写为编译器运行.
*&
int * a;
void fun(int*& temp);
fun(a);
//此处取这个指针的引用:即改变指针里面存的地址
Lambda断点不好命中怎么处理
#if PLATFORM_WINDOWS
#pragma optimize("",off)
#endif
...
//你的代码
#if PLATFORM_WINDOWS
#pragma optimize("",on)
#endif
这样下断点后容易命中.
编译器扩展零散知识点
Widget工具(Widget拾取器)
Window-DevelopTool-WidgetReflector
Edit-EditPreferences-Miscellaneous-DisplyUIExtensionPoint
//效果:显示UI旁边的绿色文字
FExtender:
AddMenuBarExtension,添加到最上面的Eidt菜单
AddMenuExtension,添加到 例如:window的下拉菜单
AddToolBarExtension,添加到开始运行的工具栏(ToolBar)
在Edit上添加新的
Builder.AddPullDownMenu(
LOCTEXT("LJ","栏目名字"),
LOCTEXT("This is Button","鼠标放置高亮显示"),
FNewMenuDelegate::CreateRaw(this,&FMyToolModule::PullDownBar),
"注释名"
);