GPGSPostBuild.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // <copyright file="GPGSPostBuild.cs" company="Google Inc.">
  2. // Copyright (C) 2014 Google Inc. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. // </copyright>
  16. #if UNITY_ANDROID
  17. namespace GooglePlayGames.Editor
  18. {
  19. using System.Collections.Generic;
  20. using System.IO;
  21. using UnityEditor.Callbacks;
  22. using UnityEditor;
  23. using UnityEngine;
  24. public static class GPGSPostBuild
  25. {
  26. [PostProcessBuild (99999)]
  27. public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
  28. {
  29. #if UNITY_5_3_OR_NEWER
  30. if (target != BuildTarget.iOS)
  31. {
  32. if (!GPGSProjectSettings.Instance.GetBool(GPGSUtil.ANDROIDSETUPDONEKEY, false))
  33. {
  34. EditorUtility.DisplayDialog("Google Play Games not configured!",
  35. "Warning!! Google Play Games was not configured, Game Services will not work correctly.",
  36. "OK");
  37. }
  38. return;
  39. }
  40. #endif
  41. }
  42. }
  43. }
  44. #endif