diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Animation/AnimationModuleRegistration.cpp |
Diffstat (limited to 'Runtime/Animation/AnimationModuleRegistration.cpp')
-rw-r--r-- | Runtime/Animation/AnimationModuleRegistration.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Runtime/Animation/AnimationModuleRegistration.cpp b/Runtime/Animation/AnimationModuleRegistration.cpp new file mode 100644 index 0000000..c95c4bd --- /dev/null +++ b/Runtime/Animation/AnimationModuleRegistration.cpp @@ -0,0 +1,53 @@ +#include "UnityPrefix.h" +#include "Runtime/BaseClasses/ClassRegistration.h" +#include "Runtime/Modules/ModuleRegistration.h" + +static void RegisterAnimationClasses (ClassRegistrationContext& context) +{ + REGISTER_CLASS (Animation) + REGISTER_CLASS (AnimationClip) + REGISTER_CLASS (RuntimeAnimatorController) + REGISTER_CLASS (AnimatorController) + REGISTER_CLASS (Animator) + REGISTER_CLASS (Avatar) + REGISTER_CLASS (Motion) +#if !UNITY_WEBGL + REGISTER_CLASS (AnimatorOverrideController) +#endif +#if UNITY_EDITOR + ///@TODO: Lets remove those. It's been deprecated since Unity 1.6 + REGISTER_CLASS (BaseAnimationTrack) + REGISTER_CLASS (NewAnimationTrack) +#endif +} + +#if ENABLE_MONO || UNITY_WINRT +void ExportRuntimeAnimatorControllerBindings(); +void ExportAnimatorBindings(); +void ExportAnimations(); +void ExportAvatarBuilderBindings (); +void ExportAvatar (); +void ExportAnimatorOverrideControllerBindings(); + +static void RegisterAnimationICallModule () +{ +#if !INTERNAL_CALL_STRIPPING + ExportRuntimeAnimatorControllerBindings (); + ExportAnimatorBindings(); + ExportAnimations (); + ExportAvatarBuilderBindings (); + ExportAvatar (); + ExportAnimatorOverrideControllerBindings (); +#endif +} +#endif + +extern "C" EXPORT_MODULE void RegisterModule_Animation () +{ + ModuleRegistrationInfo info; + info.registerClassesCallback = &RegisterAnimationClasses; +#if ENABLE_MONO || UNITY_WINRT + info.registerIcallsCallback = &RegisterAnimationICallModule; +#endif + RegisterModuleInfo (info); +} |