UPROPERTY Flashcards
(7 cards)
what are the specifiers for a UPROPERTY?
first = visibility or editability second = BP accessibility third = categories
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= BallBearing)
UStaticMeshComponent* ballMesh;
you can only just one of each
what specifiers do visibility and editability have?
They decide whether the class can just see it, or can edit it in BP.
EditAnywhere - property can be edited on archetypes and instances
EditDefaultsOnly = only on archetypes, not on instances
EditInstanceOnly = only on instances, not on archetypes
VisibleAnywhere = visible but cannot be edited
VisibleDefaultsOnly = visible for archetypes, not for instances, cannot be edited
VisibleInstanceOnly = visible for instances, not archetypes, cannot be edited
EditAnywhere and VisibleAnywhere are most likely
Edit and Visibility modifiers CANNOT be used together
You can only specify one per UPROPERTY
what is an archetype and what is an instance?
archetype = classes and BPS instances = literal instances of archetypes in the level
what are the specifiers for accessibility?
BlueprintReadOnly = can be read by blueprints, but not modified BlueprintReadWrite = can be read or written from a BP
Limit BP access where possible, for maintenence
what is “Transient”?
Transient = keyword next to UPROPERTY that has a pointer pointing to a class derived UObject but doesnt access BP in anywhere
it just means its a temporary property - its a smart pointer that’ll delete on its own.
UPROPERTY(Transient)
UParticleSystemComponent* Sprinkles;
what is the ‘meta’ specifier?
control how classes, interfaces, structs, enums and values can behave in different sections of the engine or editor
meta = (AllowPrivateAccess = “true”)
what is a UPROPERTY()?
C++ Macro
Part of the UE Reflection system
Allows BP to edit values