Skip to content

Firebase Value API Reference

This section documents the Blueprint helper functions used to create, inspect, and check the type of FFirebaseValue instances in Blueprints. These functions provide the only supported way to work with Firebase Values in Blueprint graphs.

The underlying FFirebaseValue structure is shared between C++ and Blueprints, but its native factory and getter functions are intended for C++ usage only. Blueprint users must always use the functions provided by this Blueprint library.

All functions in this section operate purely on local value data and do not perform any network or Firebase service operations.


Make Value

Node Parameters Return Description
Make Int Value (int32) FFirebaseValue Creates a Firebase value holding a 32-bit integer.
Make Bool Value (bool) FFirebaseValue Creates a Firebase value holding a boolean value.
Make Double Value (double) FFirebaseValue Creates a Firebase value holding a double-precision number.
Make String Value (string) FFirebaseValue Creates a Firebase value holding a string.
Make Object Fields (TMap) FFirebaseValue Creates a Firebase object value from a map of named Firebase values.
Make Array Array (TArray) FFirebaseValue Creates a Firebase array value from an array of Firebase values.
Make Null FFirebaseValue Creates a Firebase null value.

Get Value Content

Node Parameters Return Description
Get Int Value (FFirebaseValue) int32 Returns the integer stored in this value or 0 if the type does not match.
Get Bool Value (FFirebaseValue) bool Returns the boolean stored in this value or false if the type does not match.
Get Double Value (FFirebaseValue) double Returns the number stored in this value or 0.0 if the type does not match.
Get String Value (FFirebaseValue) string Returns the string stored in this value or an empty string if the type does not match.
Get Object Value (FFirebaseValue) TMap<string, FFirebaseValue> Returns the object fields stored in this value or an empty map if the type does not match.
Get Array Value (FFirebaseValue) TArray<FFirebaseValue> Returns the array stored in this value or an empty array if the type does not match.
Get Type Value (FFirebaseValue) EFirebaseValueType Returns the type of this Firebase value.

Type Checks

Node Parameters Return Description
Is Int Value (FFirebaseValue) bool Returns whether this value is an integer.
Is Bool Value (FFirebaseValue) bool Returns whether this value is a boolean.
Is Double Value (FFirebaseValue) bool Returns whether this value is a double-precision number.
Is String Value (FFirebaseValue) bool Returns whether this value is a string.
Is Number Value (FFirebaseValue) bool Returns whether this value is an integer or double.
Is Object Value (FFirebaseValue) bool Returns whether this value is an object.
Is Array Value (FFirebaseValue) bool Returns whether this value is an array.
Is Null Value (FFirebaseValue) bool Returns whether this value represents null.

Notes

  • These functions operate only on local Firebase Value data and do not communicate with Firebase services.
  • Firebase Values are primarily used as building blocks for Firestore Documents and Realtime Database payloads.
  • For working with Firestore documents, see the Firestore Document API Reference.

C++ Usage

In C++, FFirebaseValue can also be used in two different ways, depending on your workflow.

Using Native C++ API

When working purely in C++, you can directly construct and inspect FFirebaseValue using its native C++ interface. This approach is often more convenient and expressive when building complex objects or arrays in C++ code.

To use the native API, include the value header:

#include "FirebaseValue.h"

The following example demonstrates creating and reading Firebase values using the native C++ API:

FFirebaseValue LevelValue = FFirebaseValue::MakeInt(5);
FFirebaseValue NameValue = FFirebaseValue::MakeString(TEXT("player123"));

int32 Level = LevelValue.GetInt();
FString Name = NameValue.GetString();

Using Blueprint Helper Functions in C++

The same helper functions exposed to Blueprints can also be used from C++ by including the Blueprint helper library:

#include "FirebaseValueLibrary.h"

The following example demonstrates the same value creation and access pattern using the Blueprint helper functions from C++:

FFirebaseValue LevelValue = UFirebaseValueLibrary::MakeInt(5);
FFirebaseValue NameValue = UFirebaseValueLibrary::MakeString(TEXT("player123"));

int32 Level = UFirebaseValueLibrary::GetInt(LevelValue);
FString Name = UFirebaseValueLibrary::GetString(NameValue);

This approach is useful when:

  • sharing logic between Blueprint and C++
  • keeping behavior consistent across both systems

Summary

  • Blueprint users must always use the Blueprint helper functions
  • C++ users may choose either approach native FFirebaseValue API or Blueprint helper functions via FirebaseValueLibrary

Both approaches are fully supported and interoperable.