FileSelectionMessage.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (c) 2024 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. #pragma warning disable CS0649
  15. using System;
  16. using UnityEngine;
  17. namespace Vuplex.WebView.Internal {
  18. /// <summary>
  19. /// A class used internally to pass messages about file selection
  20. /// from the native plugins to the webview scripts.
  21. /// </summary>
  22. [Serializable]
  23. public class FileSelectionMessage {
  24. public string[] AcceptFilters;
  25. public bool MultipleAllowed;
  26. public static FileSelectionMessage FromJson(string json) {
  27. return JsonUtility.FromJson<FileSelectionMessage>(json);
  28. }
  29. }
  30. }