If an asset is assigned to the pointer in the class constructor or in the blueprint defaults, that asset will be loaded the first time an instance of that class is loaded. Use IsValid(Pointer) to check for validity. The garbage collection system will not destroy a UObject unless all hard pointers to the object become null, or Destroy is specifically called upon the target object, at which point all referencing hard pointers will be nulled automatically. This pointer identifies the owner class as a “holder” or “dependent” of the referenced UObject. (see also Referencing Assets - Unreal Documentation) Hard Object Pointer These are the only pointer types that work with UObjects. These pointers work with Unreal's garbage collection system. ![]() Generally, UObjects should only ever be referenced with Managed pointers, whereas non-UObjects can be referenced with Unmanaged pointers. Unreal offers a library of several different types of pointers, some of which are Managed by Unreal's RTTI and garbage collection system, and some of which are Unmanaged and must be used carefully by the developer. ![]() Edit Page History Report Pointer Types Overview of UObject and "Smart" pointer types in Unreal
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |