I have an FBX animation with keyframes on frame 0, 1, and 150.
When I bring the FBX animation into Unity 5.3.4f1, I get keyframes on every frame. I would like to only have the original keyframes present. I thought I had found a way to do this earlier but can’t seem to find the solution again.
Is it possible to have the animation in Unity contain only the original keyframes?
Thanks!
1 Answer
1
If you follow this Link you will find an custom script that disables the keyframe-interpolation when you import a fbx. (It seems like drag&drop also gets deactivated)
You need to create a c# script and insert the written lines.
It will create a Menu Bar named “TreeViewUtility”. Hit the toggle button and import the fbx again.
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
static class TreeViewUtils
{
[MenuItem("TreeViewUtility/Toggle Animation")]
static void ToggleAnimation()
{
const string prefKey = "TreeViewExpansionAnimation";
bool newValue = !EditorPrefs.GetBool(prefKey, true);
EditorPrefs.SetBool(prefKey, newValue);
InternalEditorUtility.RequestScriptReload();
Debug.Log("TreeView animation is now " + (newValue ? "enabled" : "disabled"));
}
}
I am currently using gun prefab. in which each gun has the same script assigned. Is it better or using array is better?
– mughalprince36