ezEngine  Release 25.03
ezDependencyFlags Struct Reference

Defines how a reference set by ezFileBrowserAttribute and ezAssetBrowserAttribute is treated. More...

#include <PropertyAttributes.h>

Classes

struct  Bits
 

Public Types

enum  Enum {
  None = 0, Thumbnail = EZ_BIT(0), Transform = EZ_BIT(1), Package = EZ_BIT(2),
  Default = 0
}
 
using StorageType = ezUInt8
 

Detailed Description

Defines how a reference set by ezFileBrowserAttribute and ezAssetBrowserAttribute is treated.

A few examples to explain the flags:

Input for a mesh: Transform | Thumbnail

  • The input (e.g. fbx) is obviously needed for transforming the asset.
  • We also can't generate a thumbnail without it.
  • But we don't need to package it with the final game as it is not used by the runtime.

Material on a mesh: Thumbnail | Package

  • The default material on a mesh asset is not needed to transform the mesh. As only the material reference is stored in the mesh asset, any changes to the material do not affect the transform output of the mesh.
  • It is obviously needed for the thumbnail as that is what is displayed in it.
  • We also need to package this reference as otherwise the runtime would fail to instantiate the mesh without errors.

Surface on hit prefab: Package

  • Transforming a surface is not affected if the prefab it spawns on impact changes. Only the reference is stored.
  • The set prefab does not show up in the thumbnail so it is not needed.
  • We do, however, need to package it or otherwise the runtime would fail to spawn the prefab on impact.

As a rule of thumb (also the default for each):

Member Enumeration Documentation

◆ Enum

Enumerator
None 

The reference is not needed for anything in production. An example of this is editor references that are only used at edit time, e.g. a default animation clip for a skeleton.

Thumbnail 

This reference is a dependency to generating a thumbnail. The material references of a mesh for example.

Transform 

This reference is a dependency to transforming this asset. The input model of a mesh for example.

Package 

This reference needs to be packaged as it is used at runtime by this asset. All sounds or debris generated on impact of a surface are common examples of this.


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