-
Notifications
You must be signed in to change notification settings - Fork 30
Indirectly used assets
Ashot Barkhudaryan edited this page Aug 19, 2021
·
1 revision
Sometimes we using assets in source code or config files.
For example:
Suppose we have some M_TestMaterial
asset that we using in MyActor.cpp
file.
AMyActor::AMyActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
static ConstructorHelpers::FObjectFinder<UMaterial> Material(TEXT("Material'/Game/M_TestMaterial.M_TestMaterial'"));
if (Material.Succeeded())
{
// using material
}
}
Now lets try to delete it from content browser
As you can see engine wont warn us about asset being used in source code, if we delete it we will get CDO warning on next engine loading.
So to prevent this from happening plugin scans following folders
- Config
- Source
- Plugins (and its Config and Source folders)
and finds all assets that used indirectly and those assets we also mark as used.
You can see all of those assets in "Indirectly used assets" tab.