暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. @interface UnityRenderingView : UIView
  3. {
  4. }
  5. + (void)InitializeForAPI:(UnityRenderingAPI)api;
  6. @end
  7. @interface UnityView : UnityRenderingView
  8. {
  9. @private ScreenOrientation _curOrientation;
  10. @private BOOL _shouldRecreateView;
  11. @private BOOL _viewIsRotating;
  12. }
  13. // we take scale factor into account because gl backbuffer size depends on it
  14. - (id)initWithFrame:(CGRect)frame scaleFactor:(CGFloat)scale;
  15. - (id)initWithFrame:(CGRect)frame;
  16. - (id)initFromMainScreen;
  17. - (void)resumeRendering;
  18. // in here we will go through subviews and call onUnityUpdateViewLayout selector (if present)
  19. // that allows to handle simple overlay child view layout without doing view controller magic
  20. - (void)layoutSubviews;
  21. - (void)recreateRenderingSurfaceIfNeeded;
  22. - (void)recreateRenderingSurface;
  23. // will match script-side Screen.orientation
  24. @property (nonatomic, readonly) ScreenOrientation contentOrientation;
  25. @property BOOL skipRendering;
  26. @end
  27. @interface UnityView (Deprecated)
  28. - (void)recreateGLESSurfaceIfNeeded __deprecated_msg("use recreateRenderingSurfaceIfNeeded instead.");
  29. - (void)recreateGLESSurface __deprecated_msg("use recreateRenderingSurface instead.");
  30. @end
  31. @interface UnityView (Keyboard)
  32. - (void)processKeyboard;
  33. @end
  34. @interface UnityView (UnityAppController)
  35. // if we know that unity view bounds have changed but need to update unity-side size/orientation immediately
  36. // otherwise the update will be delayed to next layoutSubviews
  37. - (void)boundsUpdated;
  38. @end
  39. #if PLATFORM_IOS || PLATFORM_VISIONOS
  40. #include "UnityView+iOS.h"
  41. #elif PLATFORM_TVOS
  42. #include "UnityView+tvOS.h"
  43. #endif
  44. void ReportSafeAreaChangeForView(UIView* view);
  45. // Computes safe area for a view in Unity coordinate system (origin of the view
  46. // is bottom-left, as compared to standard top-left)
  47. CGRect ComputeSafeArea(UIView* view);
  48. CGSize GetCutoutToScreenRatio();