What is the difference with IAssetTools::CreateAsset and IAssetTools::CreateUniqueAssetName?
I must be missing something. Does anyone have any ideas on this?
What is the difference with IAssetTools::CreateAsset and IAssetTools::CreateUniqueAssetName?
I must be missing something. Does anyone have any ideas on this?
Hi @kebwlmbhee, looking at the documentation, CreateAsset gives you a UObject*, a pointer to your asset, and CreateUniqueAssetName creates a name for an asset, depending on the first two parameters.
From what I can see in the error list, CastChecked failed because CreateUniqueAssetName is a void function, meanwhile, CreateAsset returns a pointer to an UObject.
I hope this helps you.
Thanks for your reply, I have read the documentation and I would like to know how to get the asset created by CreateUniqueAssetName function in C++? Is this feasible?
I’m not familiar with both methods, but looking at the definition of CreateUniqueAssetName, it doesn’t seem like its creating an asset. Using the first two parameters given, its defines an object path and tries to search an asset with that path, then its gives you a OutPackageName and OutAssetName, the last two parameters (the result will depend on the search it does at the begining).
I think you would have to use OutPackageName and OutAssetName to create an asset using CreateAsset.
Thank you! I think you are right.