Skip to content

Commit

Permalink
Merge pull request #8 from k283/master
Browse files Browse the repository at this point in the history
Added the GetFeature() method to UArticyObject.
  • Loading branch information
nico-probst authored Apr 24, 2018
2 parents 0444343 + 0171083 commit 67c7890
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ArticyImporter/Source/ArticyRuntime/Private/ArticyObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ TArray<UArticyObject*> UArticyObject::GetChildren() const
{
return TArray<UArticyObject*>();
}

UArticyBaseFeature* UArticyObject::GetFeature(FName propertyName)
{
auto propPtr = GetPropPtr<UArticyBaseFeature *>(propertyName);
return propPtr ? *propPtr : nullptr;
}
3 changes: 3 additions & 0 deletions ArticyImporter/Source/ArticyRuntime/Public/ArticyObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class ARTICYRUNTIME_API UArticyObject : public UArticyPrimitive
UArticyObject* GetParent() const;
TArray<UArticyObject*> GetChildren() const;

UFUNCTION(BlueprintCallable)
UArticyBaseFeature* GetFeature(FName propertyName);

protected:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
Expand Down

0 comments on commit 67c7890

Please sign in to comment.