CodeSmile AssetDatabase 1.9
Unity's AssetDatabase in enjoyable, consistent, concise, convenient, comprehensible, safe, documented form.
Loading...
Searching...
No Matches

◆ CreateAsNew() [1/3]

static Object CreateAsNew ( [NotNull] Byte[] contents,
[NotNull] Path path )
static

Writes the byte array to disk, then imports and loads the asset. Generates a unique file name if an asset exists at the path.

Creates missing folders in the destination path.

Parameters
contentsThe bytes to write.
pathPath to a file with extension. Note that the asset's actual file name may differ.
Returns
The newly created asset.
See also