從最末端開始往回講。
createComponent<C>(componentFactory: ComponentFactory<C>,
index?: number,
injector?: Injector,| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| /* | |
| load uasset from file path. | |
| */ | |
| FString filepath("/Game/an_animation_file"); // without extension, path start with `/Game`, `/Game` refer-> `Content` folder in real. | |
| FStringAssetReference asset_stream_ref(filepath); | |
| TAssetPtr<UAnimationAsset> animation_asset(asset_stream_ref); | |
| UAnimationAsset* animation = animation_asset.LoadSynchronous(); | |
| bool isValid = animation_asset.IsValid(); | |
| bool isNull = animation_asset.IsNull(); | |
| bool isPending = animation_asset.IsPending(); |