10.15 Resource loading

definition:

 1. Direct attribute reference

Generate an actor and sound:

 When running, an Actor set in Myactor will be generated and the sound set in Myactor will be played.


Audio: class USoundCue;

Texture: class UTexture;

Material: class UMaterial

Model: class UStaticMesh

Skeleton: class USkeletalMesh


Limiting the categories of settings classes in C++ and restricting partial classes from being picked up in UE4:


 3.Constructor loading:

 

Build an object: 

Manipulate a piece of content with an object:

Reference path acquisition: (it is an object, so add _C)

 

 Two types:


4. Find and load

 Determine whether it is true to ensure normal operation

 

 You must add the UProperty() macro definition before the Uxxx class, it has benefits (garbage collection, automatic reference update...etc., there will be nothing if you don't add it)

 

Guess you like

Origin blog.csdn.net/qq_44160901/article/details/131624635