ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
ArticyGlobalVariables.h
1//
2// Copyright (c) 2023 articy Software GmbH & Co. KG. All rights reserved.
3//
4
5#pragma once
6
7#include "ArticyRuntimeModule.h"
8#include "Interfaces/ArticyReflectable.h"
9#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >0
10#include "AssetRegistry/AssetRegistryModule.h"
11#else
12#include "AssetRegistryModule.h"
13#endif
14#include "ShadowStateManager.h"
15#include "ArticyExpressoScripts.h"
16#include "ArticyGlobalVariables.generated.h"
17
19
20//implicit convertion operator (= getter)
21//ReSharper disable once CppNonExplicitConversionOperator
22#define ARTICY_VARIABLE_ACCESS(T) \
23 T& operator=(const T &NewValue) \
24 { \
25 /*set and return the new value*/ \
26 return Setter<TRemoveReference<decltype(*this)>::Type>(NewValue); \
27 } \
28 const T& Get() const \
29 { \
30 /*just return the value*/ \
31 return Value; \
32 } \
33 operator const T &() const \
34 { \
35 /*just return the value*/ \
36 return Get(); \
37 }
38
39
42class UArticyVariable;
45struct ExpressoType;
46
47DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnGVChanged, UArticyVariable*, Variable);
48
53template<typename Type>
54struct ArticyShadowState
55{
56 ArticyShadowState(const uint32& level, const Type& value) : Level(level), Value(value) { }
57
58 uint32 Level = 0;
59 Type Value;
60};
61
62USTRUCT(BlueprintType)
63struct ARTICYRUNTIME_API FArticyGvName
64{
65 GENERATED_BODY()
66
67public:
68
69 FArticyGvName() = default;
70 FArticyGvName(const FName FullVariableName);
71 FArticyGvName(const FName VariableNamespace, const FName VariableName);
72
73 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Articy")
74 FName FullName;
75 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Articy")
76 FName Namespace;
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Articy")
78 FName Variable;
79
80 void SetByFullName(const FName FullVariableName);
81 void SetByNamespaceAndVariable(const FName VariableNamespace, const FName VariableName);
82 const FName& GetNamespace();
83 const FName& GetVariable();
84 const FName& GetFullName();
85};
86
87UCLASS(Abstract, BlueprintType)
88class ARTICYRUNTIME_API UArticyVariable : public UObject
89{
90 GENERATED_BODY()
91
92public:
97 UPROPERTY(BlueprintAssignable, Category = "Callback")
98 FOnGVChanged OnVariableChanged;
99
100 template<typename Type>
101 void Init(UArticyBaseVariableSet* Set, UArticyGlobalVariables* const NewStore, const FName& Name, const typename Type::UnderlyingType& NewValue);
102
104 const FName& GetGVName() const { return GVName; }
105
106protected:
107 virtual ~UArticyVariable() {}
108
109 //void Init(UArticyBaseGlobalVariables* const NewStore) { this->Store = NewStore; }
110
111 template<typename Type, typename ValueType>
112 ValueType& Setter(const ValueType &NewValue)
113 {
114 auto Instance = static_cast<Type*>(this);
115 check(Instance);
116
117 //push the value if we are in a new shadow level now
118 const auto& storeLevel = GetStoreShadowLevel();
119 const auto& shadowLevel = GetShadowLevel(Instance);
120 if(storeLevel > shadowLevel)
121 {
122 Instance->Shadows.Push(ArticyShadowState<ValueType>{storeLevel, Instance->Value});
123
124 //get notified when the state is popped again
125 RegisterOnStorePop(Instance);
126 }
127 else
128 {
129 //if the global level is different from ShadowLevel, our ShadowLevel is out of sync!
130 ensure(storeLevel == shadowLevel);
131 }
132
133 Instance->Value = NewValue;
134 if(storeLevel == 0)
135 OnVariableChanged.Broadcast(this);
136
137 return Instance->Value;
138 }
139
140 template<typename Type>
141 void PopState(Type* Instance)
142 {
143 if(ensure(GetStoreShadowLevel() == GetShadowLevel(Instance)))
144 Instance->Value = Instance->Shadows.Pop().Value;
145 }
146
147 template<typename Type>
148 static uint32 GetShadowLevel(Type* Instance);
149 uint32 GetStoreShadowLevel() const;
150
152 UPROPERTY(BlueprintReadOnly, Category = "Articy")
153 FName GVName;
154
155private:
156
157 UPROPERTY()
158 UArticyGlobalVariables* Store = nullptr;
159
160 template<typename Type>
161 void RegisterOnStorePop(Type* Instance);
162};
163
164//---------------------------------------------------------------------------//
165
166UCLASS(BlueprintType)
167class ARTICYRUNTIME_API UArticyInt : public UArticyVariable
168{
169 GENERATED_BODY()
170
171public:
172 typedef int UnderlyingType;
173
174 friend UArticyVariable;
175
176public:
177 //void Init(UArticyBaseGlobalVariables* const NewStore, const int& NewValue) { UArticyVariable::Init(NewStore); Set(NewValue); }
178
179 //getter and setter
180 ARTICY_VARIABLE_ACCESS(int)
181
182 //other operators
183 int& operator+=(const int &Val) { return *this = Value + Val; }
184 int& operator-=(const int &Val) { return *this = Value - Val; }
185 int& operator*=(const int &Val) { return *this = Value * Val; }
186 int& operator/=(const int &Val) { return *this = Value / Val; }
187
188 int operator++(int)
189 {
190 int copy = *this;
191 *this = Value + 1;
192 return copy;
193 }
194 int& operator++() { return *this = Value + 1; }
195
196 int operator--(int)
197 {
198 int copy = *this;
199 *this = Value - 1;
200 return copy;
201 }
202 int& operator--() { return *this = Value - 1; }
203
204 int& operator=(const ExpressoType &NewVal)
205 {
206 if (NewVal.Type == ExpressoType::Float)
207 return Value = NewVal.GetFloat();
208 else
209 return Value = NewVal.GetInt();
210 }
211
212 int& operator+=(const ExpressoType &Val)
213 {
214 if (Val.Type == ExpressoType::Float)
215 return *this = Value + Val.GetFloat();
216 else
217 return *this = Value + Val.GetInt();
218 }
219
220 int& operator-=(const ExpressoType &Val)
221 {
222 if (Val.Type == ExpressoType::Float)
223 return *this = Value - Val.GetFloat();
224 else
225 return *this = Value - Val.GetInt();
226 }
227
228 int& operator*=(const ExpressoType &Val)
229 {
230 if (Val.Type == ExpressoType::Float)
231 return *this = Value * Val.GetFloat();
232 else
233 return *this = Value * Val.GetInt();
234 }
235
236 int& operator/=(const ExpressoType &Val)
237 {
238 if (Val.Type == ExpressoType::Float)
239 return *this = Value / Val.GetFloat();
240 else
241 return *this = Value / Val.GetInt();
242 }
243
248 UFUNCTION(BlueprintCallable, Category = "ValueAccess")
249 int Set(int NewValue) { return *this = NewValue; }
250
251protected:
253 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Articy")
254 int Value = -1;
255
256private:
257 TArray<ArticyShadowState<int>> Shadows;
258};
259
260//---------------------------------------------------------------------------//
261
262// Allow arithmetic operations on integers
263
264static int operator+(const UArticyInt& v1, const UArticyInt& v2)
265{
266 return v1.Get() + v2.Get();
267}
268static int operator+(int k, const UArticyInt& v)
269{
270 return k + v.Get();
271}
272static int operator+(const UArticyInt& v, int k)
273{
274 return v.Get() + k;
275}
276
277static int operator-(const UArticyInt& v1, const UArticyInt& v2)
278{
279 return v1.Get() - v2.Get();
280}
281static int operator-(int k, const UArticyInt& v)
282{
283 return k - v.Get();
284}
285static int operator-(const UArticyInt& v, int k)
286{
287 return v.Get() + k;
288}
289
290static int operator*(const UArticyInt& v1, const UArticyInt& v2)
291{
292 return v1.Get() * v2.Get();
293}
294static int operator*(int k, const UArticyInt& v)
295{
296 return k * v.Get();
297}
298static int operator*(const UArticyInt& v, int k)
299{
300 return v.Get() * k;
301}
302
303static int operator/(const UArticyInt& v1, const UArticyInt& v2)
304{
305 return v1.Get() / v2.Get();
306}
307static int operator/(int k, const UArticyInt& v)
308{
309 return k / v.Get();
310}
311static int operator/(const UArticyInt& v, int k)
312{
313 return v.Get() / k;
314}
315
316//---------------------------------------------------------------------------//
317
318UCLASS(BlueprintType)
319class ARTICYRUNTIME_API UArticyBool : public UArticyVariable
320{
321 GENERATED_BODY()
322
323public:
324 typedef bool UnderlyingType;
325
326 friend UArticyVariable;
327
328 //void Init(UArticyBaseGlobalVariables* const NewStore, const bool& NewValue) { UArticyVariable::Init(NewStore); Set(NewValue); }
329
330 //getter and setter
331 ARTICY_VARIABLE_ACCESS(bool)
332
333 bool& operator=(const ExpressoType &NewValue)
334 {
335 return Value = NewValue.GetBool();
336 }
337
342 UFUNCTION(BlueprintCallable, Category = "ValueAccess")
343 bool Set(bool NewValue) { return *this = NewValue; }
344
345protected:
346
348 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Articy")
349 bool Value = false;
350
351private:
352 TArray<ArticyShadowState<bool>> Shadows;
353};
354
355//---------------------------------------------------------------------------//
356
357UCLASS(BlueprintType)
358class ARTICYRUNTIME_API UArticyString : public UArticyVariable
359{
360 GENERATED_BODY()
361
362public:
363 typedef FString UnderlyingType;
364
365 friend UArticyVariable;
366
367 //void Init(UArticyBaseGlobalVariables* const NewStore, const FString& NewValue) { UArticyVariable::Init(NewStore); Set(NewValue); }
368
369 //getter and setter
370 ARTICY_VARIABLE_ACCESS(FString)
371
372 //other operators
373 //FString& operator+=(const FString &Val) { return Setter<UArticyString>(Value + Val); }
374
375 FString& operator+=(const ExpressoType &Val) { return Setter<UArticyString>(Value + Val.GetString()); }
376
377 FString& operator=(const ExpressoType &NewValue)
378 {
379 if (NewValue.Type == ExpressoType::Int) // used to store a string representation of an articy object
380 return Value = ArticyHelpers::Uint64ToObjectString(NewValue.GetInt());
381 else
382 return Value = NewValue.GetString();
383 }
384
385 bool operator ==(const FString& text) const { return Value.Equals(text); }
386 bool operator !=(const FString& text) const { return !this->operator==(text); }
387 bool operator ==(const FString&& text) const { return Value.Equals(text); }
388 bool operator !=(const FString&& text) const { return !this->operator==(text); }
389 bool operator ==(const char* const text) const { return Value.Equals(text); }
390 bool operator !=(const char* const text) const { return !this->operator==(text); }
391
396 UFUNCTION(BlueprintCallable, Category = "ValueAccess")
397 FString Set(FString NewValue) { return *this = NewValue; }
398
399protected:
401 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Articy")
402 FString Value;
403
404private:
405 TArray<ArticyShadowState<FString>> Shadows;
406};
407
408//---------------------------------------------------------------------------//
409
410UCLASS()
411class ARTICYRUNTIME_API UArticyBaseVariableSet : public UObject, public IArticyReflectable
412{
413 GENERATED_BODY()
414public:
415 UPROPERTY(VisibleAnywhere, Category = "ArticyGlobalVariables")
416 TArray<UArticyVariable*> Variables;
417
418public:
423 UPROPERTY(BlueprintAssignable, Category = "Callback")
424 FOnGVChanged OnVariableChanged;
425
426 UFUNCTION(BlueprintCallable, Category = "ArticyGlobalVariables", meta = (keywords = "global variables"))
427 const TArray<UArticyVariable*> GetVariables() const { return Variables; }
428
429 UFUNCTION(BlueprintCallable, Category = "ArticyGlobalVariables", meta =(DeterminesOutputType = "Type", keywords = "global variables"))
430 const TArray<UArticyVariable*> GetVariablesOfType(TSubclassOf<UArticyVariable> Type)
431 {
432 TArray<UObject*> subobjects;
433 GetDefaultSubobjects(subobjects);
434 TArray<UArticyVariable*> articyVars;
435 for (int i = 0; i < subobjects.Num(); i++)
436 {
437 const bool bIsA = subobjects[i]->IsA(Type);
438 if (bIsA)
439 {
440 UArticyVariable* Var = Cast<UArticyVariable>(subobjects[i]);
441 articyVars.Add(Var);
442 }
443 }
444
445 return articyVars;
446 }
447
448 template<class T>
449 const TArray<T*> GetVariables()
450 {
451 TArray<UObject*> subobjects;
452 GetDefaultSubobjects(subobjects);
453 TArray<T*> articyVars;
454 for (int i = 0; i < subobjects.Num(); i++)
455 {
456 T* isT = Cast<T>(subobjects[i]);
457 if (isT != nullptr)
458 {
459 articyVars.Add(isT);
460 }
461 }
462 return articyVars;
463 }
464
465private:
466
467 UFUNCTION()
468 void BroadcastOnVariableChanged(UArticyVariable* Variable);
469
470 template <typename Type>
471 friend void UArticyVariable::Init(UArticyBaseVariableSet* Set, UArticyGlobalVariables* const NewStore, const FName& Name, const typename Type::UnderlyingType& NewValue);
472};
473
477UCLASS(BlueprintType)
478class ARTICYRUNTIME_API UArticyGlobalVariables : public UDataAsset, public IShadowStateManager, public IArticyReflectable
479{
480 GENERATED_BODY()
481
482public:
483
484 virtual FPrimaryAssetId GetPrimaryAssetId() const override { return FPrimaryAssetId(FName(TEXT("ArticyGlobalVariables")), GetFName()); }
485
490 static UArticyGlobalVariables* GetDefault(const UObject* WorldContext);
491
493
498 static UArticyGlobalVariables* GetRuntimeClone(const UObject* WorldContext, UArticyAlternativeGlobalVariables* GVs);
499
500 /* Unloads the global variables, which causes that all changes get removed. */
501 UFUNCTION(BlueprintCallable, Category = "Packages")
503
504 UFUNCTION(BlueprintCallable, Category="Getter")
505 UArticyBaseVariableSet* GetNamespace(const FName Namespace);
506
507 UFUNCTION(BlueprintCallable, Category = "Getter")
508 const TArray<UArticyBaseVariableSet*> GetVariableSets() const { return VariableSets; }
509
510 /* Exec functions are only supported by a couple singleton classes
511 * To make this exec compatible, one of those exec classes has to forward the call
512 * See https://wiki.unrealengine.com/Exec_Functions for reference*/
513 UFUNCTION(BlueprintCallable, Exec, Category = "Articy")
515
516 UFUNCTION(BlueprintCallable, Category="Getter")
517 const bool& GetBoolVariable(FArticyGvName GvName, bool& bSucceeded);
518 UFUNCTION(BlueprintCallable, Category="Getter")
519 const int32& GetIntVariable(FArticyGvName GvName, bool& bSucceeded);
520 UFUNCTION(BlueprintCallable, Category="Getter")
521 const FString& GetStringVariable(FArticyGvName GvName, bool& bSucceeded);
522
523 UFUNCTION(BlueprintCallable, Category="Setter")
524 void SetBoolVariable(FArticyGvName GvName, const bool Value);
525 UFUNCTION(BlueprintCallable, Category="Setter")
526 void SetIntVariable(FArticyGvName GvName, const int32 Value);
527 UFUNCTION(BlueprintCallable, Category="Setter")
528 void SetStringVariable(FArticyGvName GvName, const FString Value);
529
530 UFUNCTION(BlueprintCallable, Category="Debug")
531 void EnableDebugLogging();
532 UFUNCTION(BlueprintCallable, Category="Debug")
533 void DisableDebugLogging();
534
535 void ResetVisited();
536 int GetSeenCounter(const IArticyFlowObject* Object) const;
537 int SetSeenCounter(const IArticyFlowObject* Object, int Value);
538 int IncrementSeenCounter(const IArticyFlowObject* Object);
539 bool Fallback(const IArticyFlowObject* Object);
540 void SetFallbackEvaluation(const IArticyFlowObject* Object, bool Value);
541
542 void PushSeen();
543 void PopSeen();
544
545protected:
546
547 UPROPERTY()
548 TArray<UArticyBaseVariableSet*> VariableSets;
549
550 UPROPERTY()
551 bool bLogVariableAccess = false;
552
553private:
554
555 static TWeakObjectPtr<UArticyGlobalVariables> Clone;
556
557 // Runtime clones of non-default global variable assets managed by GetRuntimeClone
558 static TMap<FName, TWeakObjectPtr<UArticyGlobalVariables>> OtherClones;
559
560 TArray<TMap<FArticyId, int>> VisitedNodes;
561 TArray<TMap<FArticyId, bool>> bIsFallbackEvaluation;
562
563 template <typename ArticyVariableType, typename VariablePayloadType>
564 void SetVariableValue(const FName Namespace, const FName Variable, const VariablePayloadType Value);
565 template <typename ArticyVariableType, typename VariablePayloadType>
566 void SetVariableValue(const FName FullVariableName, const VariablePayloadType Value);
567
568 template<typename ArticyVariableType, typename VariablePayloadType>
569 const VariablePayloadType& GetVariableValue(const FName Namespace, const FName Variable, bool& bSucceeded);
570 template<typename ArticyVariableType, typename VariablePayloadType>
571 const VariablePayloadType& GetVariableValue(const FName FullVariableName, bool& bSucceeded);
572};
573
574//---------------------------------------------------------------------------//
575// TEMPLATED METHODS
576//---------------------------------------------------------------------------//
577
578template <typename Type>
579void UArticyVariable::Init(UArticyBaseVariableSet* Set, UArticyGlobalVariables* const NewStore, const FName& Name, const typename Type::UnderlyingType& NewValue)
580{
581 GVName = Name;
582 Store = NewStore;
583
584 //remove all listeners (there should not be any)
585 OnVariableChanged.Clear();
586
587 //set the initial value
588 Setter<Type>(NewValue);
589
590 //register the set's OnVariableChanged delegate on the variable's
591 OnVariableChanged.AddDynamic(Set, &UArticyBaseVariableSet::BroadcastOnVariableChanged);
592}
593
594template <typename Type>
595uint32 UArticyVariable::GetShadowLevel(Type* Instance)
596{
597 return Instance->Shadows.Num() > 0 ? Instance->Shadows.Last().Level : 0;
598}
599
600template <typename Type>
601void UArticyVariable::RegisterOnStorePop(Type* Instance)
602{
603#if __cplusplus >= 202002L
604 Store->RegisterOnPopState([=, this] { this->PopState(Instance); });
605#else
606 Store->RegisterOnPopState([=] { this->PopState(Instance); });
607#endif
608}
609
610template <typename ArticyVariableType, typename VariablePayloadType>
611void UArticyGlobalVariables::SetVariableValue(const FName Namespace, const FName Variable, const VariablePayloadType Value)
612{
613 auto set = GetNamespace(Namespace);
614 if (set)
615 {
616 UArticyVariable** basePtr = set->GetPropPtr<UArticyVariable*>(Variable);
617
618 if (basePtr) {
619
620 ArticyVariableType* typedPtr = dynamic_cast<ArticyVariableType*>(*basePtr);
621 if (typedPtr)
622 {
623 auto& propValue = (*typedPtr);
624 propValue = Value;
625
626 if (bLogVariableAccess)
627 {
628 UE_LOG(LogArticyRuntime, Display, TEXT("Set variable %s::%s : Success"), *Namespace.ToString(), *Variable.ToString());
629 }
630
631 return;
632 }
633 }
634 }
635
636 if (bLogVariableAccess)
637 {
638 UE_LOG(LogArticyRuntime, Error, TEXT("Unable to find variable: %s::%s. Variable does not exist or wrong type assumed."), *Namespace.ToString(), *Variable.ToString());
639 }
640}
641
642template<typename ArticyVariableType, typename VariablePayloadType>
643const VariablePayloadType& UArticyGlobalVariables::GetVariableValue(const FName Namespace, const FName Variable, bool& bSucceeded)
644{
645 auto set = GetNamespace(Namespace);
646 if (set)
647 {
648 UArticyVariable** basePtr = set->GetPropPtr<UArticyVariable*>(Variable);
649
650 ArticyVariableType* typedPtr = dynamic_cast<ArticyVariableType*>(*basePtr);
651
652 if (typedPtr)
653 {
654 auto& propValue = (*typedPtr);
655 bSucceeded = true;
656
657 if (bLogVariableAccess)
658 {
659 UE_LOG(LogArticyRuntime, Display, TEXT("Get variable %s::%s : Success"), *Namespace.ToString(), *Variable.ToString());
660 }
661
662 return propValue.Get();
663 }
664 }
665
666 if(bLogVariableAccess)
667 {
668 UE_LOG(LogArticyRuntime, Error, TEXT("Unable to find variable: %s::%s"), *Namespace.ToString(), *Variable.ToString());
669 }
670
671 bSucceeded = false;
672 static VariablePayloadType empty = VariablePayloadType();
673 return empty;
674}
Definition ArticyFlowObject.h:23
Definition ArticyReflectable.h:24
Definition ShadowStateManager.h:24
A data asset class for managing alternative global variables in the Articy runtime.
Definition ArticyAlternativeGlobalVariables.h:19
Definition ArticyGlobalVariables.h:412
FOnGVChanged OnVariableChanged
Definition ArticyGlobalVariables.h:424
Definition ArticyGlobalVariables.h:320
bool Value
Definition ArticyGlobalVariables.h:349
bool Set(bool NewValue)
Definition ArticyGlobalVariables.h:343
Definition ArticyFlowPlayer.h:29
Definition ArticyGlobalVariables.h:479
static UArticyGlobalVariables * GetRuntimeClone(const UObject *WorldContext, UArticyAlternativeGlobalVariables *GVs)
Definition ArticyGlobalVariables.cpp:234
static UArticyGlobalVariables * GetMutableOriginal()
Definition ArticyGlobalVariables.cpp:195
void UnloadGlobalVariables()
Definition ArticyGlobalVariables.cpp:294
void PrintGlobalVariable(FArticyGvName GvName)
Definition ArticyGlobalVariables.cpp:328
void PushSeen()
Definition ArticyGlobalVariables.cpp:622
bool Fallback(const IArticyFlowObject *Object)
Definition ArticyGlobalVariables.cpp:554
void ResetVisited()
Definition ArticyGlobalVariables.cpp:454
void SetFallbackEvaluation(const IArticyFlowObject *Object, bool Value)
Definition ArticyGlobalVariables.cpp:592
const int32 & GetIntVariable(FArticyGvName GvName, bool &bSucceeded)
Definition ArticyGlobalVariables.cpp:389
void EnableDebugLogging()
Definition ArticyGlobalVariables.cpp:438
void SetStringVariable(FArticyGvName GvName, const FString Value)
Definition ArticyGlobalVariables.cpp:430
void DisableDebugLogging()
Definition ArticyGlobalVariables.cpp:446
static UArticyGlobalVariables * GetDefault(const UObject *WorldContext)
Definition ArticyGlobalVariables.cpp:131
void SetBoolVariable(FArticyGvName GvName, const bool Value)
Definition ArticyGlobalVariables.cpp:410
void SetIntVariable(FArticyGvName GvName, const int32 Value)
Definition ArticyGlobalVariables.cpp:420
int GetSeenCounter(const IArticyFlowObject *Object) const
Definition ArticyGlobalVariables.cpp:466
int SetSeenCounter(const IArticyFlowObject *Object, int Value)
Definition ArticyGlobalVariables.cpp:491
int IncrementSeenCounter(const IArticyFlowObject *Object)
Definition ArticyGlobalVariables.cpp:523
const bool & GetBoolVariable(FArticyGvName GvName, bool &bSucceeded)
Definition ArticyGlobalVariables.cpp:378
UArticyBaseVariableSet * GetNamespace(const FName Namespace)
Definition ArticyGlobalVariables.cpp:309
void PopSeen()
Definition ArticyGlobalVariables.cpp:639
const FString & GetStringVariable(FArticyGvName GvName, bool &bSucceeded)
Definition ArticyGlobalVariables.cpp:400
Definition ArticyGlobalVariables.h:168
int Value
Definition ArticyGlobalVariables.h:254
int Set(int NewValue)
Definition ArticyGlobalVariables.h:249
Definition ArticyGlobalVariables.h:359
FString Value
Definition ArticyGlobalVariables.h:402
FString Set(FString NewValue)
Definition ArticyGlobalVariables.h:397
Definition ArticyGlobalVariables.h:89
FOnGVChanged OnVariableChanged
Definition ArticyGlobalVariables.h:98
FName GVName
Definition ArticyGlobalVariables.h:153
const FName & GetGVName() const
Definition ArticyGlobalVariables.h:104
Definition ArticyGlobalVariables.h:55
The ExpressoType struct represents a flexible data type used in the Articy runtime.
Definition ArticyExpressoScripts.h:26
virtual int64 & GetInt()
Retrieves the int64 value of the ExpressoType.
Definition ArticyExpressoScripts.cpp:845
virtual double & GetFloat()
Retrieves the double value of the ExpressoType.
Definition ArticyExpressoScripts.cpp:859
virtual FString & GetString()
Retrieves the string value of the ExpressoType.
Definition ArticyExpressoScripts.cpp:873
enum ExpressoType::EType Type
The type of the ExpressoType.
virtual bool & GetBool()
Retrieves the boolean value of the ExpressoType.
Definition ArticyExpressoScripts.cpp:831
Definition ArticyGlobalVariables.h:64
const FName & GetVariable()
Definition ArticyGlobalVariables.cpp:82
void SetByNamespaceAndVariable(const FName VariableNamespace, const FName VariableName)
Definition ArticyGlobalVariables.cpp:55
const FName & GetNamespace()
Definition ArticyGlobalVariables.cpp:69
void SetByFullName(const FName FullVariableName)
Definition ArticyGlobalVariables.cpp:38
const FName & GetFullName()
Definition ArticyGlobalVariables.cpp:95