// Play the animation on enable void OnEnable() { // Turn off script if platform is not supported if (!UnityNativeChromaSDK.IsPlatformSupported()) { enabled = false; return; } _mAnimationName = UnityNativeChromaSDK.GetAnimationNameWithExtension(AnimationName); UnityNativeChromaSDK.PlayAnimationName(_mAnimationName, Loop); }
// Play the animation on enable void OnDestroy() { // Turn off script if platform is not supported if (!UnityNativeChromaSDK.IsPlatformSupported()) { enabled = false; return; } string animationName = UnityNativeChromaSDK.GetAnimationNameWithExtension(AnimationName); UnityNativeChromaSDK.PlayAnimationName(animationName); }