Open lux opened 6 years ago
I'm working on a bug right now, in the GameObjectRecorder, that seems to be linked with this one. I can't say for sure that this bug is fixed yet, but I'm 90% sure it is. I'll have to run some tests in order to be 100% sure ;)
I'll keep you posted!
If it is this bug you're talking : https://issuetracker.unity3d.com/issues/animation-transitions-between-key-frames-are-corrupted-when-modifying-keyframes-of-gameobjectrecorder-animation
You'll be my hero ;-)
Nope :(
It was this one: https://issuetracker.unity3d.com/issues/animation-recorder-error-in-console-when-recording-custom-or-third-party-component
But yours is also in my backlog, don't worry ;)
No problem Romain, you'll do it right after, I can understand... ;-)
(I'm kidding, of course...)
I'm a bit confused now: the issue is marked as fixed in 2018.1, but when attempting to record a custom script (derived from MonoBehaviour), the same error still appears ArgumentException: Cannot marshal SkinnedShapesRecorder to a native Unity::Type!
.
I do understand that this project is not directly related to GameObjectRecorder, but maybe @romainf-unity can shed some light on this, please?
I'm also having issues recording the blend shapes of a skinned mesh renderer (#75), and wanted to handle this with a proxy component, which records only the blend shapes, but it doesn't work because of this issue.
Hey @Elringus, i'm recording a script to modify blendshpaes by sound with this code, i didn't get any errors to begin with though. This is what the recording part in my code looks like, it's pretty much exacly what is shown/presented on unity3dcollege. Once there are too many blendshapes adressed it begins to lag though.
Unity version 2017.4.28f1
(C#)
public class MusicShapeV2 : MonoBehaviour
{
[...]
public AnimationClip clip;
public bool record = false;
private GameObjectRecorder m_Recorder;
private SkinnedMeshRenderer tar;
void Awake()
{
tar = target.GetComponent<SkinnedMeshRenderer>();
}
// Use this for initialization
void Start()
{
m_Recorder = new GameObjectRecorder();
m_Recorder.root = gameObject;
m_Recorder.BindComponent<SkinnedMeshRenderer>(gameObject, true);
}
// Update is called once per frame
void Update()
{
[...]
}
void LateUpdate() //recording happens here
{
if (clip == null)
return;
if (record)
{
m_Recorder.TakeSnapshot(Time.deltaTime);
}
else if (m_Recorder.isRecording)
{
m_Recorder.SaveToClip(clip);
m_Recorder.ResetRecording();
}
}
}
#endif
Thanks for sharing the example! Can't remember if there is any difference from what I've tried, though. Most likely they've just fixed the issue already.
What happened?
Recording seems to complete successfully (no errors, but .anim files contain no curve data). I've tried a bunch of settings, toggling recursive on/off, capturing everything or just transforms, etc.
My goal is actually to record blend shapes on skinned mesh renderers, which I see an option for, but since it's not recording the animation data at all I can't tell if that is working.
Is it reproduceable?
Happens every time.
Released package version / tag?
v0.2.0.27
Unity version, operating system, target platform (standalone windows, mac, iOS, PS4...)?
2017.2.0p4 on Windows (in editor)
Here are some screenshots and animation files that it generated:
Animation files.zip