how to get all uproperties or loop through of a UClass?

i have searched a lot and found some solution and prepared my code like:

	const auto StartNum = Fields.Num();
	UE_LOG(X2PlayerTemplate, Display, TEXT("DI1212, 778899000, UX2ReflectLibrary::GetProperties 144 StaticClass->GetName: %s"), *StaticClass->GetName())
	for (TFieldIterator<UProperty> PropertyIt(StaticClass, EFieldIteratorFlags::ExcludeSuper, EFieldIteratorFlags::ExcludeDeprecated, EFieldIteratorFlags::IncludeInterfaces); PropertyIt; ++PropertyIt)
	{
		UE_LOG(X2ParticleTemplate, Display, TEXT("DI1212, 778899000, eeee"))
		const auto* Property = *PropertyIt;
		const auto& CategoryMetaData = Property->GetMetaData(TEXT("Category"));
		UE_LOG(X2PlayerTemplate, Display, TEXT("DI1212, 778899000, UX2ReflectLibrary::GetProperties 148 CategoryMetaData: %s; Category: %s"), *CategoryMetaData, *Category)
		if (!CategoryMetaData.Contains(Category))
		{
			continue;
		}
		Fields.AddUnique(FName(*Property->GetName()));
	}
	return Fields.Num() > StartNum;

but, i have read all the log and found that non class had ever enter the for loop logic.
did i do sth wrong? thank u very much