载入中...
搜索中...
未找到
ActionVfxBlock.cpp
浏览该文件的文档.
20 Diagnostic::error(DiagnosticCode::InvalidArgument, "VFX field must be numeric", std::string(key)));
23 Diagnostic::error(DiagnosticCode::InvalidArgument, "VFX field must be finite", std::string(key)));
29Result<ActionVfxBinding> ActionVfxBinding::fromPayload(const Value::Object& payload, ActionVfxShape shape) {
32 if (uri == payload.end() || !uri->second.getIf<std::string>() || uri->second.getIf<std::string>()->empty())
45 Diagnostic::error(DiagnosticCode::InvalidArgument, "VFX stopBehavior must be text", "stopBehavior"));
59 DiagnosticCode::InvalidArgument, "VFX playbackRateSynced must be boolean", "playbackRateSynced"));
72 DiagnosticCode::InvalidArgument, "VFX clipEndTime must be greater than clipStartTime", "clipEndTime"));
80 DiagnosticCode::InvalidArgument, "instant VFX lifetimeSeconds must be positive", "lifetimeSeconds"));
83 DiagnosticCode::InvalidArgument, "VFX lifetimeSeconds must be non-negative", "lifetimeSeconds"));
Typed VFX action-block payload contract.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Definition AbilityAsset.cpp:9
ActionVfxShape
Authored VFX block shape used to select lifetime validation.
Definition ActionVfxBlock.h:15
@ Instant
@ ClearImmediately
@ StopEmitting
@ InvalidArgument
static Result< ActionSpatialBinding > fromPayload(const Value::Object &payload)
Decode and validate the common spatial fields in an owning payload.
Definition ActionSpatialBlock.cpp:64
Owning validated VFX settings shared by runtime and editor preview.
Definition ActionVfxBlock.h:21
ActionVfxStopBehavior stopBehavior
Definition ActionVfxBlock.h:24
static Result< ActionVfxBinding > fromPayload(const Value::Object &payload, ActionVfxShape shape)
Decode one dynamic VFX payload transactionally.
Definition ActionVfxBlock.cpp:29
bool playbackRateSynced
Definition ActionVfxBlock.h:25