diff --git a/Util.meta b/Util.meta new file mode 100644 index 0000000000000000000000000000000000000000..1aa0681b7dcfd0968cf2f24e3c32c337caf2ee46 --- /dev/null +++ b/Util.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb0d4ce98064bd0499ad273cf3b33368 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Util/ApplicationExit.cs b/Util/ApplicationExit.cs new file mode 100644 index 0000000000000000000000000000000000000000..05abdead865fe668df47a4f529d8b11e7d465c45 --- /dev/null +++ b/Util/ApplicationExit.cs @@ -0,0 +1,17 @@ +using UnityEngine; + +namespace Shared.Util { + // Exits the application when told + public class ApplicationExit : MonoBehaviour { + // -------------------------------------------------------------------------- + public void Exit() { +#if UNITY_EDITOR + // Make the Unity Editor stop playing + UnityEditor.EditorApplication.isPlaying = false; +#else + // Quit the running Unity application + Application.Quit(); +#endif + } + } +} diff --git a/Util/ApplicationExit.cs.meta b/Util/ApplicationExit.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9db979039c22e2c6a758336232e6ff54a2bb5d78 --- /dev/null +++ b/Util/ApplicationExit.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e637f027789c7f54186d7fc99ac125e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Util/Shared.Util.asmdef b/Util/Shared.Util.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..9478733d55594df8fdc05a30dc0ccd03d3f75a1a --- /dev/null +++ b/Util/Shared.Util.asmdef @@ -0,0 +1,12 @@ +{ + "name": "Shared.Util", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Util/Shared.Util.asmdef.meta b/Util/Shared.Util.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..bea4bfd4f812d4fa82b71da800155a994bdf6e5e --- /dev/null +++ b/Util/Shared.Util.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0288e5f631bff9c40aee25083e8fea0d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: