CanvasWebViewPrefab.Mac.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2022 Vuplex Inc. All rights reserved.
  2. //
  3. // Licensed under the Vuplex Commercial Software Library License, you may
  4. // not use this file except in compliance with the License. You may obtain
  5. // a copy of the License at
  6. //
  7. // https://vuplex.com/commercial-library-license
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #if UNITY_STANDALONE_OSX
  15. using UnityEngine;
  16. using Vuplex.WebView.Internal;
  17. namespace Vuplex.WebView {
  18. partial class CanvasWebViewPrefab {
  19. partial void OnInit() {
  20. #if !UNITY_2021_2_OR_NEWER
  21. if (_canvas?.renderMode == RenderMode.ScreenSpaceOverlay) {
  22. WebViewLogger.LogWarning("Versions of Unity older than 2021.2 have a bug on macOS that sometimes prevents 3D WebView's external textures from appearing properly in a \"Screen Space - Overlay\" Canvas. To avoid the issue, it's recommended to either upgrade to Unity 2021.3 or switch the Canvas's render mode to \"Screen Space - Camera\". https://issuetracker.unity3d.com/issues/external-texture-is-not-visible-in-player-slash-build-when-canvas-render-mode-is-set-to-screen-space-overlay");
  23. }
  24. #endif
  25. }
  26. }
  27. }
  28. #endif