DataAsset

Represents the serialized payload stored inside a data-asset file. The payload is shared by the asset loader and can be copied with Instantiate.

Public Methods

NotifyChanged

public void NotifyChanged(string member)

Raises Changed for member.

Parameters:

  • member (string): The member that changed, or an empty string for the whole asset.

LoadContent

public static DataAsset? LoadContent(string absolutePath)

Loads a data-asset payload from the specified absolute path.

Parameters:

  • absolutePath (string): The absolute file path of the payload asset.

Returns: DataAsset?

  • The deserialized DataAsset payload instance.

Instantiate

public static T Instantiate(T original)

Creates an independent copy of a payload with a new id, for per-instance runtime data built from a shared template (e.g. one enemy's stats). Changes to the copy never reach the original.

Parameters:

  • original (T): The payload to copy.

Returns: T

  • The copy.