blob: c92e976dfbd8209d8bba407a09619777dbf391a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#include "UnityPrefix.h"
#include "RuntimeAnimatorController.h"
#include "AnimationSetBinding.h"
#include "Runtime/Serialize/TransferFunctions/SerializeTransfer.h"
#include "Runtime/Serialize/Blobification/BlobWrite.h"
#include "Runtime/Scripting/ScriptingUtility.h"
#include "AnimationClip.h"
#if UNITY_EDITOR
#include "Runtime/Scripting/Backend/ScriptingInvocation.h"
#include "Runtime/Mono/MonoManager.h"
#endif
#include "Runtime/Scripting/Backend/ScriptingInvocation.h"
#include "Runtime/Scripting/Scripting.h"
IMPLEMENT_OBJECT_SERIALIZE (RuntimeAnimatorController)
IMPLEMENT_CLASS(RuntimeAnimatorController)
INSTANTIATE_TEMPLATE_TRANSFER(RuntimeAnimatorController)
RuntimeAnimatorController::RuntimeAnimatorController(MemLabelId label, ObjectCreationMode mode)
: Super(label, mode),
m_ObjectUsers(this),
m_DependencyList(this)
{
}
RuntimeAnimatorController::~RuntimeAnimatorController()
{
NotifyObjectUsers( kDidModifyAnimatorController );
}
template<class TransferFunction>
void RuntimeAnimatorController::Transfer (TransferFunction& transfer)
{
Super::Transfer (transfer);
}
void RuntimeAnimatorController::NotifyObjectUsers(const MessageIdentifier& msg)
{
m_ObjectUsers.SendMessage(msg);
}
void RuntimeAnimatorController::RegisterAnimationClips()
{
AnimationClipVector clips = GetAnimationClipsToRegister();
m_DependencyList.Clear();
m_DependencyList.Reserve(clips.size()); // Reserve space just for niceness
for(int i = 0 ; i < clips.size() ; i++)
{
AnimationClip* clip = clips[i];
if (clip)
{
// We could do this either way, adding is symmetrical
clip->GetUserList().AddUser(m_DependencyList);
}
}
}
|