Answered

Export Animations to Packages, limited to Assets folder

jasonyak 3 weeks ago updated by giantkiller 2 days ago 13

Hi there,

We've been loving using UMotion, but running into issues while evaluating it. I was wondering, is there a reason why exports are limited to the Assets folder? 

Our team uses a workflow using local packages to share assets across projects. This is necessary so we can control levels of access to our code base where our outside collaborators (external contractors) can contribute animation assets to our projects without having access to the entire project due to various reasons. The issue though is that our animation assets lives in a valid Unity project location like:

/ProjectRoot/Packages/com.company.sharedassets/Runtime/

instead of the more common:

/ProjectRoot/Assets/

I realise this is a newer area of Unity development, but it's a really stifling our ability to use UMotion. We need to store our fbx's and animations in a local package. Is there any chance the warnings and blocking checks that prevent exports outside of Assets could be turned off with an option? or instead that you could add the Packages folder to the list of valid locations alongside the Assets folder?

I'm guessing you have some kind of api requirement using AssetDatabase.LoadAsset or hard coded paths that expect to be working with assets that live inside of the Assets folder, if not then hopefully the request is a simpler one, if you do though hopefully the code can be improved to expand to support working with assets within the Packages folder.

Our lead artist has also mentioned that it's not just exports, but also where UMotion project files can be stored that are limited to the Assets folder. We also need these project files to live in Packages so that our various contractors can access them.

Thanks,

Jason

UMotion Version:
1.26
Unity Version:
2021.1.10

Answer

Answer

Thanks for providing all the details, that helped me a lot to quickly dive into this topic.

A fix for not being able to export into to embedded packages is already implemented and is going to be released with the upcoming UMotion patch release (V1.26p01) that is going to be available via the asset store next week.

Best regards,
Peter

GOOD, I'M SATISFIED
Satisfaction mark by jasonyak 2 days ago

ps: Unity provide some examples here on how to load assets from a package when using AssetDatabase.LoadAsset( "Packages/com.company.somepackage" ):

https://docs.unity3d.com/Manual/upm-assets.html

Answered

Hi Jason,

thank you very much for your support request.

Yes the limitation to the "Assets" folder is something that is a result of UMotion being initially created at times where the unity package manager didn't exist. I'll take a look into this and see if I can get rid of this limitation.


In your setup, do you also turn UMotion into a separate Unity package?

Best regards,
Peter

Thanks for taking a look at this. No we don't change how UMotion is used. We do import UMotion via the package manager in our 'My Assets' list that lists our Asset Store purchases, but your plugin imports in it's default location within the Assets folder. 

The simplest example of what we need for this to work is that if you were to create a local 'embedded package' within one Unity project as opposed to complicating the setup with git based or remotely published packages, and that we could export to this local embedded package or save UMotion project files to it. Unity's info on local embedded packages if it's a help: https://docs.unity3d.com/Manual/CustomPackages.html#:~:text=Creating%20a%20new%20embedded%20package

Thanks again!

Answer

Thanks for providing all the details, that helped me a lot to quickly dive into this topic.

A fix for not being able to export into to embedded packages is already implemented and is going to be released with the upcoming UMotion patch release (V1.26p01) that is going to be available via the asset store next week.

Best regards,
Peter

Hi Peter, 

Sorry for the delay in getting back to you. I had somehow missed an email alert of your last comment. Thank you for taking a look at this issue so soon. 

So we have had a try out of the new patch release and it's almost there. We have encountered some issues. Exporting animations to packages folders is working well for us. But when we save a umotion project to a packages location it gives mixed results. It seems to work sometimes where it actually saves the project files, but it will show errors like this:


It's close though!! =)


Cheers,


Jason

Hi Jason,

thank you very much for getting back.

Can you provide some further information as to in which situations it does not work? I did some tests and it always seems to work in my test projects. Might be related to some specific paths or something like that (maybe some special characters in the path?).


Thanks.

Best regards,
Peter

Hi Peter, 

So our main artist was just trying out some things to see if he could narrow it down. We think it's if creating a new folder in the save dialog that is the issue. So if we save a project to an existing folder in packages it works, but if we go to save but in that save popup dialog we hit a button to make a new folder (within Packages) and then choose that to save the project to, I think this is when it fails. 


Now that we know this, we could work around this, but hopefully that helps to smooth off the edges.

Thanks,

Jason

Oh that makes sense. Internally I use AssetDatabase.IsValidFolder() to check if the destination folder is in a valid asset location, but the AssetDatabase does not update while still in the save dialog... I haven't thought of this case, thanks for letting me know.

I'm going to fix this in the next patch release. In the meantime, please workaround by creating new folders outside of the save dialog.

Best regards,
Peter

No worries, cheers =)

The problem is fixed in UMotion V1.26p02. I just submitted the patch release to the asset store. It might be available today or at the beginning of next week, depending on how fast the asset store vetting process is going to be.


Thanks again for reporting the issue!


Best regards,
Peter

Hi Peter, 


I forgot to write back and let you know that yes that latest version has fixed all of our issues. Thank you so much for fixing that. We're loving UMotion, amazing tool, great work! 


Jason

I totally concur! This is a great product that really got me away from the OTHER problems.

Hi Jason,

no worries. Thanks for your amazing feedback, I'm glad everything is now working as expected for you.

Don't hesitate to contact me in case you encounter any other issue.

Best regards,
Peter