ue5 编译问题 Custom Property List Not Initialized for

void UBlueprintGeneratedClass::InitPropertiesFromCustomList(uint8* DataPtr, const uint8* DefaultDataPtr)
{
	FScopeLock SerializeAndPostLoadLock(&SerializeAndPostLoadCritical);
	checkf(bCustomPropertyListForPostConstructionInitialized, TEXT("Custom Property List Not Initialized for %s"), *GetPathNameSafe(this)); // Something went wrong, probably a race condition

	if (const FCustomPropertyListNode* CustomPropertyList = GetCustomPropertyListForPostConstruction())
	{
		InitPropertiesFromCustomList(CustomPropertyList, this, DataPtr, DefaultDataPtr);
	}
}

 我这边出现此种问题主要的原因是  循环引用

我在c++的character中 初始化了一个蓝图组件,而蓝图组件中不管是属性的类型或者在函数中用到了cast ,都又指向了  这个character的蓝图类,于是在生成cdo的时候 就是也要构建bp character的 cdo,但是此过程 就是在character的创建cdo的过程。

解决方法

1、不在character c++的构造函数中 构建 蓝图组件,可以在bp character中添加 蓝图组件。

2、在蓝图组件中,通过接口函数调用bp character 方法,这样避免出现 bp character类型在蓝图组件中。

猜你喜欢

转载自blog.csdn.net/opk8848/article/details/128482184