You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Make IsAssetOrNotBlueprint once again always available
Fix checks against whether something is not a blueprint to use IsNative which works in cooked builds [CODEREVIEW] Patrick.Enfedaque #jira #rnx #ROBOMERGE-AUTHOR: marc.audy #ROBOMERGE-SOURCE: CL 18800226 via CL 18800791 via CL 18800932 via CL 18802762 via CL 18821550 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545) [CL 18821637 by marc audy in ue5-main branch]
This commit is contained in:
@@ -715,12 +715,10 @@ void UFoliageType::PostLoad()
|
||||
}
|
||||
}
|
||||
|
||||
#if WITH_EDITOR
|
||||
bool UFoliageType::IsNotAssetOrBlueprint() const
|
||||
{
|
||||
return IsAsset() == false && Cast<UBlueprint>(GetClass()->ClassGeneratedBy) == nullptr;
|
||||
return IsAsset() == false && GetClass()->IsNative();
|
||||
}
|
||||
#endif
|
||||
|
||||
FVector UFoliageType::GetRandomScale() const
|
||||
{
|
||||
@@ -2951,12 +2949,7 @@ UFoliageType* AInstancedFoliageActor::GetLocalFoliageTypeForSource(const UObject
|
||||
UFoliageType* FoliageType = Pair.Key;
|
||||
// Check that the type is neither an asset nor blueprint instance
|
||||
|
||||
// ClassGeneratedBy TODO: This is wrong in cooked builds
|
||||
if (FoliageType && FoliageType->GetSource() == InSource && !FoliageType->IsAsset()
|
||||
#if WITH_EDITORONLY_DATA
|
||||
&& !FoliageType->GetClass()->ClassGeneratedBy
|
||||
#endif
|
||||
)
|
||||
if (FoliageType && FoliageType->GetSource() == InSource && !FoliageType->IsAsset() && FoliageType->GetClass()->IsNative())
|
||||
{
|
||||
ReturnType = FoliageType;
|
||||
Info = &*Pair.Value;
|
||||
|
||||
@@ -112,10 +112,10 @@ class UFoliageType : public UObject
|
||||
virtual void Serialize(FArchive& Ar) override;
|
||||
virtual void PostLoad() override;
|
||||
|
||||
virtual bool IsNotAssetOrBlueprint() const;
|
||||
FOLIAGE_API FVector GetRandomScale() const;
|
||||
|
||||
#if WITH_EDITOR
|
||||
virtual bool IsNotAssetOrBlueprint() const;
|
||||
|
||||
virtual void SetSource(UObject* InSource) PURE_VIRTUAL(UFoliageType::SetSource, );
|
||||
virtual void UpdateBounds() {}
|
||||
|
||||
Reference in New Issue
Block a user