ezEngine  Release 25.03
ezResourceFlags Struct Reference

The flags of an ezResource instance. More...

#include <Declarations.h>

Classes

struct  Bits
 

Public Types

enum  Enum {
  UpdateOnMainThread = EZ_BIT(0), NoFileAccessRequired = EZ_BIT(1), ResourceHasFallback = EZ_BIT(2), ResourceHasTypeFallback = EZ_BIT(3),
  IsReloadable = EZ_BIT(4), IsQueuedForLoading = EZ_BIT(5), HasCustomDataLoader = EZ_BIT(6), PreventFileReload = EZ_BIT(7),
  HasLowResData = EZ_BIT(8), IsCreatedResource = EZ_BIT(9), Default = 0
}
 The flags of an ezResource instance. More...
 
using StorageType = ezUInt16
 

Detailed Description

The flags of an ezResource instance.

Member Enumeration Documentation

◆ Enum

The flags of an ezResource instance.

Enumerator
UpdateOnMainThread 

After loading the resource data on a thread, it must be uploaded on the main thread. Use this for resources which require a context that is only available on the main thread.

NoFileAccessRequired 

The resource 'loading' does not require file accesses and can therefore be done on one or several non-file-loading threads. Use this for procedurally generated data.

ResourceHasFallback 

Specifies whether this resource has a valid fallback resource that could be used. Automatically updated in ezResource::SetFallbackResource.

Todo:
implement NoFileAccessRequired
ResourceHasTypeFallback 

Specifies whether this resource has a valid type fallback that could be used.

IsReloadable 

The resource was created, not loaded from file.

HasCustomDataLoader 

True if someone wants to update a resource with custom data and has created a resource loader to update this specific resource.

PreventFileReload 

Once this flag is set, no reloading from file is done, until the flag is manually removed. Automatically set when a custom loader is used. To restore a file to the disk state, this flag must be removed and then the resource can be reloaded.

HasLowResData 

Whether low resolution data was set on a resource once before.

IsCreatedResource 

When this is set, the resource was created and not loaded from file.


The documentation for this struct was generated from the following file: