en:toolworks:docs:apparatus:subject

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:toolworks:docs:apparatus:subject [2021/12/04 22:47] – [Despawning] vladiusen:toolworks:docs:apparatus:subject [2021/12/06 22:34] – [C++ Workflow] vladius
Line 6: Line 6:
  
 Subjects are not used directly and their internals are hidden deep from the framework user's perspective. Instead a special concept called //Subject Handle// is introduced. It's really much like a [[ue>ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/SmartPointerLibrary/WeakPointer|weak pointer]] in terms of Unreal. When you despawn a Subject all of the handles that are currently referencing it become automatically invalid. Internally this is managed through a generation-based referencing technique. Subjects are not used directly and their internals are hidden deep from the framework user's perspective. Instead a special concept called //Subject Handle// is introduced. It's really much like a [[ue>ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/SmartPointerLibrary/WeakPointer|weak pointer]] in terms of Unreal. When you despawn a Subject all of the handles that are currently referencing it become automatically invalid. Internally this is managed through a generation-based referencing technique.
 +
 +====== Subjective Layer ======
 +
 +A Subject can have an additional higher-level dimension called [[en:toolworks:docs:apparatus:subjective|Subjective]]. Subjectives are UE-managed objects (UObjects) which may contain the high-level [[en:toolworks:docs:apparatus:detail|Details]] in their composition. Subjectives with Details are generally more flexible and have additional features implemented as compared to raw Subjects with Traits. This comes at a cost of being not as memory-/cache-efficient and potentially less performant. Please note however, that the Subjective layer is optional and you may establish your project's logic entirely on Subjects if you want.
 +
 +Subjects without the Subjective layer involved are called //barebone// Subjects. Both Subjective-based Subjects and barebone Subjects are commonly referred to as just //Subjects//. That's because every Subjective is actually a Subject internally and embeds it as an essential part. This is something like an inheritance, so every Subjective can also have Traits and Flags as part of its composition.
  
 ====== Spawning ====== ====== Spawning ======
  
-//Spawning// is a process of creating a Subject as part of some Mechanism.+//Spawning// is a process of creating a Subject as part of Mechanism.
  
 ===== C++ Workflow ===== ===== C++ Workflow =====
Line 24: Line 30:
 This would efficiently pre-allocate a Slot for the Subject in the correct Chunk and initialize it according to the Traits supplied as the arguments. This would efficiently pre-allocate a Slot for the Subject in the correct Chunk and initialize it according to the Traits supplied as the arguments.
  
 +===== Blueprint Workflow =====
 +
 +Spawning Subjects in Blueprints is done with a dedicated Spawn Subject node:
 +
 +{{:en:toolworks:docs:apparatus:spawn-subject-node.png?nolink|Spawn Subject Node}}
 ====== Despawning ====== ====== Despawning ======
  
  • en/toolworks/docs/apparatus/subject.txt
  • Last modified: 2021/12/06 22:36
  • by vladius