Jump to content

Loading Animation into KSP from Unity


Recommended Posts

ok, so blender, unity, textmeshpro, all that seems to be set up. I have successfully made parts/collider/textures/mu and all and they work.  Watched videos, even found specific reference to the err I am getting when trying to load a part with an animation (finally), but still can't get the animation to load into KSP.  The animation plays in Unity (5.4.0p4 personal). The part writes successfully, as far as Unity says, but KSP and Blender .mu import (by Bill Currie[Taniwah](great tool, by the way)) can't read it. Specific info on: 

 

Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at PartReader.ReadAnimation (System.IO.BinaryReader br, UnityEngine.GameObject o) [0x00000] in <filename unknown>:0 ...

section gives solution:

 check animation clip for unwanted animation curves on properties like "Play Automatically"; Component's On/Off property. Generally any property that is not Transform; Emissive Color/Alpha; Light Color/Intensity/Range, should not have animation curve.

I only have the one animation imported from Blender with the default name Scene, consisting of two blend shape threads.  No texture, light, or collider transforms.  It does have a KSP/emissive/specular material(without animation curve), including a texture(also without animation curve) that has worked on other parts, and a skin mesh renderer with the blend shapes (with animation curve). 

The animation is loaded as legacy and plays fine in Unity.   I just can't seem to get it to transfer over to KSP. Thanks for your time.

Note:  'got to love the angry face  at the end of the <filename unknown>:0 line. :-)

Link to comment
Share on other sites

HI, you will need to make a little adjustment in the inspector window,  ideally you would do this on part import to unity,  and you will in future.   Export part form blender to unity.   In unity click on imported model ,  then in the inspector window  select the rig tab and select legacy and apply. 

To do this once you have already manipulated the part,  select the animation  so it shows in inspector window, and right click the top left tab of the inspector  oddly enough , marked inspector , in the drop down , switch from normal to debug , and at the top of that new debug window  check the legacy box, and uncheck the loop time box.   You can now switch back to your scene,  remove any animator components and select an animation component , and assign the animations,  all being well it will play both in unity and KSP

 

Link to comment
Share on other sites

Hi, SpannerMonkey

Your first paragraph is what I have been doing.

Ok, so if I open the asset with the little arrow, select the animation specifically, then go to the inspector and select debug, I see a legacy check box, but not a loop time check box.  All of the fields are grayed and cannot be manipulated, but the legacy box is checked.

I was able to get an animation to work.  It was based on an armature.  Is that the problem? This one is only  blendshapes.

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