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

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

We're improving the character creator.

Me and @Doggo_Mafia made a Garten Of Banban parody game called Garden Of Banan.

I fully modeled all the characters before remembering only 2 of them are in the game.

Here it is if you're interested https://gamejolt.com/games/banan/782223

#gartenofbanban #gardenofbanan

Foxy and the boys on their way.

A small update on F.N.A.F. F.O.R.C.E.S.

Nightmare Camera

(the camera from Bondee's, but nightmare)

Improved dialogue system