diff options
Diffstat (limited to 'Runtime/Export/WinRT/AppTrial.txt')
-rw-r--r-- | Runtime/Export/WinRT/AppTrial.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Runtime/Export/WinRT/AppTrial.txt b/Runtime/Export/WinRT/AppTrial.txt new file mode 100644 index 0000000..37ec8f6 --- /dev/null +++ b/Runtime/Export/WinRT/AppTrial.txt @@ -0,0 +1,56 @@ +C++RAW + +#include "UnityPrefix.h" +#include "Runtime/Mono/MonoManager.h" +#include "Runtime/Scripting/ScriptingUtility.h" +#include "Runtime/Scripting/ScriptingExportUtility.h" +#if UNITY_WINRT +#include "PlatformDependent\WinRT\ApplicationTrial.h" +#endif + +using namespace Unity; + +CSRAW + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using UnityEngineInternal; + +namespace UnityEngine.Windows +{ +CONDITIONAL UNITY_WINRT_API +CLASS LicenseInformation + + /// Returns whether the user is using App trial version (rather than full version) + CUSTOM_PROP static bool isOnAppTrial + { + #if UNITY_WINRT + return ::IsOnAppTrial (); + #else + return false; + #endif + } + + /// Windows Phone 8: + /// Redirects user to app page in the Store + /// Returns an empty string + /// Call isOnAppTrial to find out whether the user bought the app + /// + /// Windows Store apps: + /// Pops up a dialog for a user asking whether he wants to buy an app + /// If use buys an app, returns a valid purchase receipt string + CUSTOM public static string PurchaseApp () + { + #if UNITY_WINRT + return ::PurchaseApp (); + #else + return SCRIPTING_NULL; + #endif + } + +CSRAW +END + +CSRAW +}
\ No newline at end of file |