Jump to content

Unity stops writing textures after adding animation


Recommended Posts

Quite regularly Unity stops writing animations after I have added an animation. This causes my part not to show up in KSP, even when I manually add a texture. It must be something I do, but I do not have a clue what that is. Deleting the animation or remaking the root GameObject changes nothing. The only way I get Unity to write textures again is making a whole new project and that is somewhat tedious. It does not happen every time, but with some regularity and remaking the part each time becomes old rather quickly.

Does anyone have any idea what this might be?

Screen.

Edited by Camacha
Link to comment
Share on other sites

Interesting, that turn up an error. A quick Google search yields another KSP modeller that has had the same problem, though no solution. I tried reimporting all the assets, no luck.

Error message.

Edit: some headway. I threw out all the nodes/gameobjects in my screenshot, except for the actual model and the parent/root. Now Unity writes again. Further investigation shows one in particular is causing issues, though why is unknown.

Edited by Camacha
Link to comment
Share on other sites

something wrong with the animation clip most likely. check for stray animation curves on objects/properties that shouldn't have them (anything you don't intend to animate should not have keyframe or animation curve). little gray diamond indicates animation curve, so check the objects that has those.

or some intended animation curve maybe corrupted, for the lack of a better word... you may need to recreate the animation clip.

Link to comment
Share on other sites

It seems the object causing the issues is not even associated with an animation. At least I (hopefully) now know where to look and what to fiddle with, rather than having to make the whole part again each time. That should make a big difference. Will report back when this happens again.

Link to comment
Share on other sites

any clear resolution? anything strange turn up in the animation clip? removing the unrelated object from export tree fix the issue? I see "getName()" and I'm thinking it may have something to do with an object's name, a space in the name maybe...

I'm collecting various errors for a troubleshooting guide. this would make a good entry, breaks pipeline and uncommon.

Link to comment
Share on other sites

I've had this happen when I imported a model with an animation created in 3D studio, then made a new animation in Unity because I changed my mind about some timings. The screen grab suggests you may have done that?

Link to comment
Share on other sites

any clear resolution?

Sadly, no. It happens when I add an animation, but the GameObject (used for node placement, so an empty one) I removed to fix it did not even have an animation associated to it. If I figure more out about the nature of the problem I will report about it. For now, the best advise I can give is to save everything as an extra copy, and remove bits from your hierarchy until it starts working again. Reload, remove the one that was troublesome and be happy.

To be clear, this worked once. No idea whether this is a typical solution or that I got lucky. Until now I did not know how to deal with the problem, forcing me to remake the whole Unity caboodle.

I've had this happen when I imported a model with an animation created in 3D studio, then made a new animation in Unity because I changed my mind about some timings. The screen grab suggests you may have done that?

Only static models were imported, all animations were done in Unity, though they were exclusively used to toggle emissive lights SPP cockpit style.

Edited by Camacha
Link to comment
Share on other sites

mind sending me the broken project files? I'm curious... I recalling dealing with something like this a while back, but didn't pay much attention at the time. can't recall what I did to fix it problem.

Edited by nli2work
Link to comment
Share on other sites

mind sending me the broken project files? I'm curious... I recalling dealing with something like this a while back, but didn't pay much attention at the time. can't recall what I did to fix it problem.

I will see if I can pack something useful together.

Link to comment
Share on other sites

This is a wild stab in the dark, but:

Last time I had this exact issue, it was because the "size" property on the animation module was set incorrectly.

I.E. my part had only one animation, but the "size" field was set to 2.

It would only export .MU files.

I do not know how this could happen in your case though, so I doubt this is it.

96c078adb1.png

Link to comment
Share on other sites

Yeah, that would Bork it. Another gotcha I had was a game object which had mesh collider applied, but no mesh filter (it was an empty object), which I'm pretty sure won't be applicable in Camacha's case but is worth mentioning.

Link to comment
Share on other sites

I ran into a gotcha a few times (which ins'' the case here, but still worth mentioning), with animations. The part would compile just fine in Unity, or so it would appear, but KSP would fail to load the model, with an "out of memory error". It would be some odd corruption in the animation. If I deleted and re-added some of the curve keys, or deleted the entire animation object and re-created it, it could solve it and the part would start working again.

Very strange.

Link to comment
Share on other sites

  • 4 months later...

i have a similar issue but without animation, i am attempting to produce the forward unto dawn, and to collission it i have made 30 odd empty game objects, each with a collission box in it, i then coe to write ip and nothing happense, i look in the destination folder and only the model.mbm has been made?

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...