- Home /
Unity Asset: Update an asset
Hello,
I would know what's happen for my project when I update an asset I bought. By this I mean if an asset is update by the dev, do I need to reimport the asset to my project manually for have the last update?
And if I have changed something in the asset code, if I reimport it it will erase my modifciations? (not trying to merged).
Thanks
Answer by msknapp · Sep 23, 2011 at 07:15 PM
Make sure that after you modify the asset, call these functions:
EditorUtility.SetDirty(obj);
AssetDatabase.SaveAssets();
// might also need this:
AssetDatabase.ImportAsset("Assets/mypath",ImportAssetOptions.ImportRecursive);
You also might need to create a unique asset path for the object before you do any of that.
AssetDatabase.GenerateUniqueAssetPath("Assets/mypath/myobject");
This will ensure that the AssetDatabase knows about your asset, and will not delete it when importing assets later.
Your answer
Follow this Question
Related Questions
Updating assets changes .meta files and breaks dependencies. 1 Answer
Import Project from Asset store 6 Answers
Material tiling on imported fbx model doesn`t fit 0 Answers
how to make assets and textures from quixel bridge look like in 3d preview from bridge 1 Answer
email notification from the asset store 2 Answers