UnityForwardDecls.h 3.9 KB

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