blob: 37ec8f6939ce5f53cf6ea306c81feec7ef95d458 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
}
|