vault backup: 2024-10-12 17:19:45

This commit is contained in:
2024-10-12 17:19:46 +08:00
parent ff94ddca61
commit 244c0c52f6
960 changed files with 31348 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
# CallInEditor
- **功能描述:** 可以在属性细节面板上作为一个按钮来调用该函数。
- **元数据类型:** bool
- **引擎模块:** Editor
- **作用机制:** 在Meta中增加[CallInEditor](../../../../Meta/Blueprint/CallInEditor.md)
- **常用程度:** ★★★★★
可以在属性细节面板上作为一个按钮来调用该函数。
该函数写在AActor或UObject子类里都是可以的只要有对应的属性细节面板。
注意这一般是处于Editor运行环境的。典型的例子是ASkyLight的Recapture按钮。因此函数里有时会调用编辑器环境下函数。但也要注意不要在runtime下混用了比较容易出错。
## 测试代码:
```cpp
UCLASS(Blueprintable, BlueprintType)
class INSIDER_API AMyFunction_Default :public AActor
{
public:
GENERATED_BODY()
public:
UFUNCTION(CallInEditor)
void MyFunc_CallInEditor(){}
};
```
## 蓝图展示:
![Untitled](Untitled.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB