P31Unity.mm 672 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // P31Unity.m
  3. // P31SharedTools
  4. //
  5. // Created by Mike Desaro on 9/12/13.
  6. // Copyright (c) 2013 prime31. All rights reserved.
  7. //
  8. #import "P31Unity.h"
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. void UnitySendMessage( const char * className, const char * methodName, const char * param );
  13. #ifdef __cplusplus
  14. }
  15. #endif
  16. #if UNITY_VERSION < 500
  17. void UnityPause( bool pause );
  18. #else
  19. void UnityPause( int pause );
  20. #endif
  21. @implementation P31Unity
  22. + (void)unityPause:(NSNumber*)shouldPause
  23. {
  24. #if UNITY_VERSION < 500
  25. BOOL shouldPauseValue = [shouldPause boolValue];
  26. #else
  27. int shouldPauseValue = [shouldPause intValue];
  28. #endif
  29. UnityPause( shouldPauseValue );
  30. }
  31. @end