UnityForwardDecls.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #pragma once
  2. #include <stdint.h>
  3. #include "UnitySharedDecls.h"
  4. #ifdef __OBJC__
  5. @class UIScreen;
  6. @class UIWindow;
  7. @class UIView;
  8. @class UIViewController;
  9. @class UIEvent;
  10. @class UILocalNotification;
  11. @class NSString;
  12. @class NSDictionary;
  13. @class NSArray;
  14. @class NSSet;
  15. @class NSData;
  16. @class NSError;
  17. @class NSBundle;
  18. @class UIKeyCommand;
  19. @class UnityViewControllerBase;
  20. #else
  21. typedef struct objc_object UIScreen;
  22. typedef struct objc_object UIWindow;
  23. typedef struct objc_object UIView;
  24. typedef struct objc_object UIViewController;
  25. typedef struct objc_object UIEvent;
  26. typedef struct objc_object UILocalNotification;
  27. typedef struct objc_object NSString;
  28. typedef struct objc_object NSDictionary;
  29. typedef struct objc_object NSArray;
  30. typedef struct objc_object NSSet;
  31. typedef struct objc_object NSError;
  32. typedef struct objc_object NSData;
  33. typedef struct objc_object NSBundle;
  34. typedef struct objc_object UIKeyCommand;
  35. typedef struct objc_object UnityViewControllerBase;
  36. #endif
  37. // unity internal audio effect definition struct
  38. struct UnityAudioEffectDefinition;
  39. // new unity rendering api
  40. struct IUnityInterfaces;
  41. // be aware that this struct is shared with unity implementation so you should absolutely not change it
  42. struct UnityFrameStats
  43. {
  44. uint64_t fixedBehaviourManagerDt;
  45. uint64_t fixedPhysicsManagerDt;
  46. uint64_t dynamicBehaviourManagerDt;
  47. uint64_t coroutineDt;
  48. uint64_t skinMeshUpdateDt;
  49. uint64_t animationUpdateDt;
  50. uint64_t renderDt;
  51. uint64_t cullingDt;
  52. uint64_t clearDt;
  53. int fixedUpdateCount;
  54. int batchCount;
  55. uint64_t drawCallTime;
  56. int drawCallCount;
  57. int triCount;
  58. int vertCount;
  59. uint64_t dynamicBatchDt;
  60. int dynamicBatchCount;
  61. int dynamicBatchedDrawCallCount;
  62. int dynamicBatchedTris;
  63. int dynamicBatchedVerts;
  64. int staticBatchCount;
  65. int staticBatchedDrawCallCount;
  66. int staticBatchedTris;
  67. int staticBatchedVerts;
  68. };
  69. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  70. typedef enum
  71. LogType
  72. {
  73. logError = 0,
  74. logAssert = 1,
  75. logWarning = 2,
  76. logLog = 3,
  77. logException = 4,
  78. logDebug = 5,
  79. }
  80. LogType;
  81. // this dictates touches processing on os level: should we transform touches to unity view coords or not.
  82. // N.B. touch.position will always be adjusted to current resolution
  83. // i.e. if you touch right border of view, touch.position.x will be Screen.width, not view.width
  84. // to get coords in view space (os-coords), use touch.rawPosition
  85. typedef enum ViewTouchProcessing
  86. {
  87. // the touches originated from view will be ignored by unity
  88. touchesIgnored = 0,
  89. // touches would be processed as if they were originated in unity view:
  90. // coords will be transformed from view coords to unity view coords
  91. touchesTransformedToUnityViewCoords = 1,
  92. // touches coords will be kept intact (in originated view coords)
  93. // it is default value
  94. touchesKeptInOriginalViewCoords = 2,
  95. }
  96. ViewTouchProcessing;
  97. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  98. typedef enum KeyboardStatus
  99. {
  100. Visible = 0,
  101. Done = 1,
  102. Canceled = 2,
  103. LostFocus = 3,
  104. }
  105. KeyboardStatus;
  106. // misc
  107. #ifdef __cplusplus
  108. extern "C" {
  109. bool UnityiOS81orNewer();
  110. bool UnityiOS82orNewer();
  111. bool UnityiOS90orNewer();
  112. bool UnityiOS91orNewer();
  113. bool UnityiOS100orNewer();
  114. bool UnityiOS101orNewer();
  115. bool UnityiOS102orNewer();
  116. bool UnityiOS103orNewer();
  117. bool UnityiOS110orNewer();
  118. bool UnityiOS111orNewer();
  119. bool UnityiOS112orNewer();
  120. bool UnityiOS130orNewer();
  121. }
  122. #endif