Jump to content

Unity - Renaming object = losing animation :(


Recommended Posts

Hi,

I m having an issue with Unity and baked animations. When I rename an object ( that is animated and was imported from an .FBX) the animation is lost. Unity offers me to get rid of the lost curves but not reassign those to the renamed object. Is there a way to do this?

More details on my situation:

I have many parts, including many objects and those are animated. Now I would like to introduce a texture switch to those object. It would make my life so much easier if all the objects I want to switch texture on have the same name:

@PART[OctoSat_*]:NEEDS[Firespitter]
{
MODULE
{
name = FStextureSwitch2
moduleID = 0
objectNames = [B]OctoSat_textswitch[/B]
textureRootFolder = NSS/
...

It would allow me to have this MM patch instead of having to list all the objects from all the parts ( probably hundreds). But the problem is that Unity automatically increments object with the same name!!! And if I remove those increments the animation is gone.

I can't rename objects in the animation window as the animation are baked so it's read only.

I hope my situation is clear and anybody with a solution that would save me from writing an MM patch that is 5 pages long will be worshipped forever.

Edited by Nookos
Link to comment
Share on other sites

I'm not sure there's a good solution to this. I could be wrong of course.

But my understanding is that Unity associates the animation by name & hierarchy, and as you said the baked animations are read-only. Which modeling program are you using? Unity doesn't care if multiple mesh objects are named the same, but Blender doesn't permit it.

To me the work-arounds appear to be: either do the animation in Unity instead of baking it before import, or list all of the separate object names in the Firespitter module config (which of course is the one you're trying to avoid).

Link to comment
Share on other sites

Hey Thanks. I m a big fan of Fuel Tank Plus. And actually my texture switch problem showed up when I tried to harmonize my parts with yours :)

I m using 3dsmax and I export in FBX. In Unity the fbx shows the correct names in the assets window ( 3dsmax is fine with having the same name on multiple meshes). But when I drag and drop that asset in a GameObject Unity increments them automatically and then I m screwed.

Frustrating. I found a similar thread on Unity's forum and there was no solution offered there.

So as you said I ll have to either reanimate everything or list all my meshes..

I ll try listing them I guess especially if I can list them all in one module and not create one module per part. Will try first thing tomorrow if that works.

That initial MM patch was just to good a solution to work.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...