Game
FNAF FORCES (Canned)
3 years ago

I found a new tool in Unity that will make finishing the animation events so much faster.


I found it here https://forum.unity.com/threads/animation-event-copier.140158/

I had to modify it slightly, so here's what I'm using if you want it.

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEditor;

using System.Reflection;

public class AnimationEventCopier : EditorWindow

{

private AnimationClip sourceObject;

private AnimationClip targetObject;

[MenuItem("Window/Animation Event Copier")]

static void Init()

{

GetWindow(typeof(AnimationEventCopier));

}

void OnGUI()

{

EditorGUILayout.BeginHorizontal();

sourceObject = EditorGUILayout.ObjectField("Source", sourceObject, typeof(AnimationClip), true) as AnimationClip;

EditorGUILayout.EndHorizontal();

EditorGUILayout.BeginHorizontal();

targetObject = EditorGUILayout.ObjectField("Target", targetObject, typeof(AnimationClip), true) as AnimationClip;

EditorGUILayout.EndHorizontal();

if (sourceObject != null && targetObject != null)

{

EditorGUILayout.BeginHorizontal();

if (GUILayout.Button("Copy"))

CopyData();

EditorGUILayout.EndHorizontal();

}

}

void CopyData()

{

Undo.RegisterUndo(targetObject, "Undo Generic Copy");

AnimationClip sourceAnimClip = sourceObject as AnimationClip;

AnimationClip targetAnimClip = targetObject as AnimationClip;

if (sourceAnimClip && targetAnimClip)

{

//.SetAnimationEvents(targetAnimClip, null);

AnimationUtility.SetAnimationEvents(targetAnimClip, AnimationUtility.GetAnimationEvents(sourceAnimClip));

}

}

}

A problem with this tool.

It works well, but the project wont build when you have the script in it.

Just take it out while it's building, then you can put it back in with no problems.



1 comment

Loading...

Next up

The improved character creator is fully implemented.

Here's what some of the new F.N.A.F. F.O.R.C.E.S. player models look like.

And a progress report. (I recommend reading it)

Improved Chica design for F.N.A.F. F.O.R.C.E.S.

Nightmare Camera

(the camera from Bondee's, but nightmare)

Improved dialogue system

Happy 1 year YouTube anniversary @GL1TCHF0XY-GL1TCHTRAP