ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
ArticyObjectWithDisplayName.h
1//
2// Copyright (c) 2023 articy Software GmbH & Co. KG. All rights reserved.
3//
4
5#pragma once
6
7#include "ArticyObjectWith_Base.h"
8#include "UObject/TextProperty.h"
9#include "ArticyBaseTypes.h"
10#include "ArticyObjectWithDisplayName.generated.h"
11
12UINTERFACE(MinimalAPI, BlueprintType, meta=(CannotImplementInterfaceInBlueprint))
13class UArticyObjectWithDisplayName : public UArticyObjectWith_Base { GENERATED_BODY() };
14
19{
20 GENERATED_BODY()
21
22public:
23
24 UFUNCTION(BlueprintCallable, Category="ArticyObjectWithDisplayName")
25 virtual FText GetDisplayName()
26 {
27 static const auto& PropName = FName("DisplayName");
28 return GetStringText(Cast<UObject>(this), PropName);
29 }
30
31 virtual const FText GetDisplayName() const
32 {
33 return const_cast<IArticyObjectWithDisplayName*>(this)->GetDisplayName();
34 }
35
36 //---------------------------------------------------------------------------//
37
38 UFUNCTION(BlueprintCallable, Category="ArticyObjectWithDisplayName")
39 virtual FText& SetDisplayName(UPARAM(ref) const FText& DisplayName)
40 {
41 static const auto& PropName = FName("DisplayName");
42 return GetProperty<FText>(PropName) = DisplayName;
43 }
44};
Definition ArticyObjectWithDisplayName.h:19
Definition ArticyObjectWith_Base.h:27
Definition ArticyObjectWithDisplayName.h:13
Definition ArticyObjectWith_Base.h:12