AboutWindow.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * Licensed under the Oculus SDK License Agreement (the "License");
  6. * you may not use the Oculus SDK except in compliance with the License,
  7. * which is provided at the time of installation or download, or which
  8. * otherwise accompanies this software in either electronic or hard copy form.
  9. *
  10. * You may obtain a copy of the License at
  11. *
  12. * https://developer.oculus.com/licenses/oculussdk/
  13. *
  14. * Unless required by applicable law or agreed to in writing, the Oculus SDK
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. using Meta.Voice.VSDKHub;
  21. using Meta.Voice.Hub.Attributes;
  22. using Meta.Voice.Hub.Interfaces;
  23. using Meta.WitAi;
  24. using Oculus.Voice.Utility;
  25. using UnityEngine;
  26. namespace Meta.Voice
  27. {
  28. [MetaHubPage("About", VoiceHubConstants.CONTEXT_VOICE, priority: 1000)]
  29. public class AboutWindow : IMetaHubPage
  30. {
  31. public void OnGUI()
  32. {
  33. WitEditorUI.LayoutKeyLabel(VoiceSDKStyles.Texts.AboutVoiceSdkVersionLabel, VoiceSDKVersion.VERSION);
  34. WitEditorUI.LayoutKeyLabel(VoiceSDKStyles.Texts.AboutWitSdkVersionLabel, WitConstants.SDK_VERSION);
  35. WitEditorUI.LayoutKeyLabel(VoiceSDKStyles.Texts.AboutWitApiVersionLabel, WitConstants.API_VERSION);
  36. GUILayout.Space(16);
  37. if (GUILayout.Button(VoiceSDKStyles.Texts.AboutTutorialButtonLabel, WitStyles.TextButton))
  38. {
  39. Application.OpenURL(VoiceSDKStyles.Texts.AboutTutorialButtonUrl);
  40. }
  41. }
  42. }
  43. }