Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Mechanisms ====== Mechanisms are the main parts of the Machine which contain scoped Subject, Subjectives, Chunks and Belts. You enchain the matching Iterables via Mechanisms, so these also actually manage the Chains. Each UE World, that has any Apparatus-specific entities is accompanied by a Mechanism automatically, you don't have to worry about that. ===== Blueprint Workflow ===== Mechanisms are managed automatically according to the current world object contexts. ===== C++ Workflow ===== To obtain a Mechanism for a World one would call [[appi>class_u_machine.html#aa3bd4fc507ecf923c812c7fc2aaf7331|API]] like:<code cpp> AMechanism* Mechanism = UMachine::ObtainMechanism(GetWorld()); </code> You can then use the instance to spawn a Subject for example:<code cpp> FSubjectHandle Subject = Mechanism->SpawnSubject(); </code> Creating your separate (possibly transient) Mechanisms is also supported and can be handy. You instantiate the Mechanism like you would any other ''UObject'' (''[[ue>API/Runtime/CoreUObject/UObject/NewObject|NewObject<UMechanism>(...)]]''):<code cpp> AMechanism* Mechanism = NewObject<AMechanism>(GetTransientPackage()); </code> Please, see the corresponding [[appi>class_u_mechanism.html|API reference]] for more details. en/toolworks/docs/apparatus/mechanism.txt Last modified: 2021/12/30 20:52by vladius