中EN

Referencing Assets

  • Hard reference: A causes B to load when A is loaded. Soft reference: indirect, e.g. string path.
  • Direct Property Reference: UPROPERTY(EditDefaultsOnly) USoundCue* — loaded automatically with the Blueprint.
  • Construction Time Reference: ConstructorHelpers::FObjectFinder; nullptr on failure → crash; assert. Hard references can balloon memory footprint.
  • Indirect: TSoftObjectPtr stored as string; IsPending(); load manually via LoadObject<>, StaticLoadObject (synchronous → frame spikes) or streamable manager. TSoftClassPtr for classes.
  • FindObject<> only if loaded; LoadObject<> loads (does FindObject internally); LoadClass<> verifies type.

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原