|
I need to programmatically recreate what Assets->Reimport does.
This does not work. Select a folder and choose the menu item and according to the console log the only thing that gets touched is the folder that is selected. The recursive option doesn't seem to be doing anything.
(comments are locked)
|
|
I just looked into this, and it turns out that we have just defined the value of the ImportAssetOptions.ImportRecursive flag wrong. It's currently defined as 128, but needs to be 256. I'll make sure this is fixed in 2.6.1, in the meantime, instead of ImportAssetOptions.ImportRecursive, (256 as ImportAssetOptions) should work. Jonas, it might be a good idea for you guys to add this info to you documentation until it is fixed. I spent a large amount of time today attempting to figure out why it was not rebuilding the directory I specified recursively.
Apr 08 '10 at 09:16 PM
Bill
Bill, are you saying that you are still seeing this issue in Unity 2.6.1? If you are still on 2.6.0 (or older), please upgrade.
Apr 09 '10 at 08:58 AM
jonas echterhoff ♦♦
(comments are locked)
|
|
I am thinking maybe you can't do recursive on that path (/Assets/MyAsset.asset) but need to call the recursive function on the folder it exists in. I don't know them from the top of my head but I think System.IO.Path and System.IO.FileInfo has all the methods you need to easily extract the path to the folder the asset is inside.
(comments are locked)
|
