├── .gitignore ├── Assets ├── WebMonetization.meta └── WebMonetization │ ├── Plugins.meta │ ├── Plugins │ ├── WebMonetization.jslib │ ├── WebMonetization.jslib.meta │ ├── testHarness.html │ ├── testHarness.html.meta │ ├── testHarness.javascript │ └── testHarness.javascript.meta │ ├── Prefabs.meta │ ├── Prefabs │ ├── WebMonetizationBroadcaster.prefab │ └── WebMonetizationBroadcaster.prefab.meta │ ├── README.pdf │ ├── README.pdf.meta │ ├── SampleScene.meta │ ├── SampleScene │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Coin.prefab │ │ └── Coin.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── SpawnPrefabOnMonetization.cs │ │ └── SpawnPrefabOnMonetization.cs.meta │ ├── Sprites.meta │ ├── Sprites │ │ ├── Circle.png │ │ ├── Circle.png.meta │ │ ├── Square.png │ │ └── Square.png.meta │ ├── WebMonetizationSampleScene.unity │ └── WebMonetizationSampleScene.unity.meta │ ├── Scripts.meta │ └── Scripts │ ├── WMBroadcaster.cs │ ├── WMBroadcaster.cs.meta │ ├── WMReciever.cs │ ├── WMReciever.cs.meta │ ├── wm_MiniJSON.meta │ └── wm_MiniJSON │ ├── WebMonetizationMiniJSON.cs │ └── WebMonetizationMiniJSON.cs.meta ├── CONTRIBUTING.md ├── LICENSE ├── Logs └── Packages-Update.log ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset ├── README.md └── Releases └── webmon1.0.0.unitypackage /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Jetbrains Rider 12 | .idea/ 13 | 14 | # Autogenerated VS/MD/Consulo solution and project files 15 | ExportedObj/ 16 | .consulo/ 17 | *.csproj 18 | *.unityproj 19 | *.sln 20 | *.suo 21 | *.tmp 22 | *.user 23 | *.userprefs 24 | *.pidb 25 | *.booproj 26 | *.svd 27 | *.pdb 28 | *.opendb 29 | 30 | # Unity3D generated meta files 31 | *.pidb.meta 32 | *.pdb.meta 33 | 34 | # Unity3D Generated File On Crash Reports 35 | sysinfo.txt 36 | 37 | # Builds 38 | *.apk 39 | # *.unitypackage 40 | 41 | WebGLBuild/ 42 | 43 | .DS_Store -------------------------------------------------------------------------------- /Assets/WebMonetization.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f1785a2eb556494eb23ecb25aab3223 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec74b813fddb54d3ca217d7276a248da 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/WebMonetization.jslib: -------------------------------------------------------------------------------- 1 | // Web Monetization for Unity WebGL by SIMMER.io / Rocco Balsamo 2 | // 3 | // Dual licenced. 4 | // 5 | // MIT license If downloaded from Github https://opensource.org/licenses/MIT 6 | // Asset store EULA if downloaded from the Unity Asset Store https://unity3d.com/legal/as_terms 7 | // 8 | // Need help? First read the README.pdf, then reach out to simmer.io/support if you have any questions. 9 | // 10 | // We always appreciate Github stars and Asset Store reviews. It would be great if you could help out while enjoying 11 | // this free asset :-) 12 | 13 | 14 | mergeInto(LibraryManager.library, { 15 | 16 | InitializeMonetization: function (paymentPointer, verbose) { 17 | 18 | function log(){ 19 | if (verbose){ 20 | console.log.apply(this); 21 | } 22 | } 23 | 24 | var paymentPointerString = '$coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg'; 25 | 26 | if (paymentPointer) { 27 | paymentPointerString = Pointer_stringify(paymentPointer); 28 | } 29 | else{ 30 | console.log('It appears that your payment pointer is not configured properly.'); 31 | } 32 | 33 | // remove any existing payment tags 34 | var existingMonetizationTags = document.querySelectorAll('meta[name=monetization]'); 35 | existingMonetizationTags.forEach(function(el){ 36 | console.log('removing existing monetization tag', el); 37 | el.parentNode.removeChild(el); 38 | }); 39 | 40 | // we want to make sure that we recieve a new monetizationstarted event, so we wait a frame before injecting the 41 | // meta tag. (In the case where we've actually removed an existing webmonetization meta tag. 42 | setTimeout(function(){ 43 | var meta = document.createElement('meta'); 44 | meta.setAttribute('name', 'monetization'); 45 | meta.setAttribute('content', paymentPointerString); 46 | document.head.append(meta); 47 | 48 | //monetization start event. 49 | 50 | if (document.monetization){ 51 | 52 | function sendMessageToWebMonetizationBroadcaster(fnName, detail){ 53 | unityInstance.SendMessage('WebMonetizationBroadcaster', fnName, JSON.stringify(detail)); 54 | } 55 | 56 | document.monetization.addEventListener('monetizationstart', function(event){ 57 | sendMessageToWebMonetizationBroadcaster('monetizationstart', event.detail); 58 | }); 59 | 60 | document.monetization.addEventListener('monetizationprogress', function(event){ 61 | sendMessageToWebMonetizationBroadcaster('monetizationprogress', event.detail); 62 | }); 63 | } 64 | else{ 65 | console.log('no monetization found'); 66 | } 67 | }, 1) 68 | 69 | 70 | 71 | } 72 | 73 | }); -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/WebMonetization.jslib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7eb32efc388d473e8f3aa46e9dd62d6 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Facebook: WebGL 27 | second: 28 | enabled: 1 29 | settings: {} 30 | - first: 31 | WebGL: WebGL 32 | second: 33 | enabled: 1 34 | settings: {} 35 | userData: 36 | assetBundleName: 37 | assetBundleVariant: 38 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/testHarness.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 21 | 22 | Unity Web Monetization Harness 23 | 24 | 25 | 26 | 27 | 28 |

About

29 |

This test harness is used to assist with development of this Unity asset. You most likely do not need to worry about this file, but you can look at the javascript console if you're curious.

30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/testHarness.html.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0666ed1111bb40bda81f312a11fbe89 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/testHarness.javascript: -------------------------------------------------------------------------------- 1 | // Web Monetization for Unity WebGL by SIMMER.io / Rocco Balsamo 2 | // 3 | // Dual licenced. 4 | // 5 | // MIT license If downloaded from Github https://opensource.org/licenses/MIT 6 | // Asset store EULA if downloaded from the Unity Asset Store https://unity3d.com/legal/as_terms 7 | // 8 | // Need help? First read the README.pdf, then reach out to simmer.io/support if you have any questions. 9 | // 10 | // We always appreciate Github stars and Asset Store reviews. It would be great if you could help out while enjoying 11 | // this free asset :-) 12 | 13 | window.unityInstance = { 14 | SendMessage : function() { 15 | console.log('SendMessage', arguments) 16 | } 17 | }; 18 | 19 | window.LibraryManager = {library:null}; 20 | 21 | window.Pointer_stringify = function(str){return str}; 22 | 23 | window.mergeInto = function(lib, fns){ 24 | fns.InitializeMonetization('$coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg', true); 25 | }; 26 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Plugins/testHarness.javascript.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eed005f0871cc41eaa6174d89184a1b0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abb53bd5463844e0981eee03dab04ce2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Prefabs/WebMonetizationBroadcaster.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1863378661014468} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1863378661014468 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4779211102405342} 22 | - component: {fileID: 114567501363096764} 23 | m_Layer: 0 24 | m_Name: WebMonetizationBroadcaster 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4779211102405342 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1863378661014468} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: -0.09000002, y: 3.46, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114567501363096764 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1863378661014468} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 83d20e3777d1a488c98702c0f9d66e87, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | paymentPointer: $coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg 55 | simulateMonetization: 0 56 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Prefabs/WebMonetizationBroadcaster.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56ec2a799ece14320bf50376441bd622 3 | timeCreated: 1569370356 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRoccoB/web-monetization-unity-webgl/685e76c01cc65235adc5e165b60c6cbb0bf3eb85/Assets/WebMonetization/README.pdf -------------------------------------------------------------------------------- /Assets/WebMonetization/README.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b18cc8674601a466ab41ed0467fb7a0b 3 | timeCreated: 1569372933 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5841adefa82c7407ea239cf239adca8a 3 | folderAsset: yes 4 | timeCreated: 1569369132 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08cdeb01ef53c46109f5fe6e46cfddaa 3 | folderAsset: yes 4 | timeCreated: 1569369809 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Prefabs/Coin.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1930205160261368} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1930205160261368 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4540356020179242} 22 | - component: {fileID: 212515875736148370} 23 | - component: {fileID: 50791935883553696} 24 | - component: {fileID: 58403017523388294} 25 | m_Layer: 0 26 | m_Name: Coin 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!4 &4540356020179242 33 | Transform: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 1930205160261368} 38 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 39 | m_LocalPosition: {x: 0, y: 0, z: 0} 40 | m_LocalScale: {x: 1, y: 1, z: 1} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 45 | --- !u!50 &50791935883553696 46 | Rigidbody2D: 47 | serializedVersion: 4 48 | m_ObjectHideFlags: 1 49 | m_PrefabParentObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1930205160261368} 52 | m_BodyType: 0 53 | m_Simulated: 1 54 | m_UseFullKinematicContacts: 0 55 | m_UseAutoMass: 0 56 | m_Mass: 1 57 | m_LinearDrag: 0 58 | m_AngularDrag: 0.05 59 | m_GravityScale: 1 60 | m_Material: {fileID: 0} 61 | m_Interpolate: 0 62 | m_SleepingMode: 1 63 | m_CollisionDetection: 0 64 | m_Constraints: 0 65 | --- !u!58 &58403017523388294 66 | CircleCollider2D: 67 | m_ObjectHideFlags: 1 68 | m_PrefabParentObject: {fileID: 0} 69 | m_PrefabInternal: {fileID: 100100000} 70 | m_GameObject: {fileID: 1930205160261368} 71 | m_Enabled: 1 72 | m_Density: 1 73 | m_Material: {fileID: 0} 74 | m_IsTrigger: 0 75 | m_UsedByEffector: 0 76 | m_UsedByComposite: 0 77 | m_Offset: {x: 0, y: 0} 78 | serializedVersion: 2 79 | m_Radius: 0.5 80 | --- !u!212 &212515875736148370 81 | SpriteRenderer: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1930205160261368} 86 | m_Enabled: 1 87 | m_CastShadows: 0 88 | m_ReceiveShadows: 0 89 | m_MotionVectors: 1 90 | m_LightProbeUsage: 1 91 | m_ReflectionProbeUsage: 1 92 | m_Materials: 93 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 94 | m_StaticBatchInfo: 95 | firstSubMesh: 0 96 | subMeshCount: 0 97 | m_StaticBatchRoot: {fileID: 0} 98 | m_ProbeAnchor: {fileID: 0} 99 | m_LightProbeVolumeOverride: {fileID: 0} 100 | m_ScaleInLightmap: 1 101 | m_PreserveUVs: 0 102 | m_IgnoreNormalsForChartDetection: 0 103 | m_ImportantGI: 0 104 | m_SelectedEditorRenderState: 0 105 | m_MinimumChartSize: 4 106 | m_AutoUVMaxDistance: 0.5 107 | m_AutoUVMaxAngle: 89 108 | m_LightmapParameters: {fileID: 0} 109 | m_SortingLayerID: 0 110 | m_SortingLayer: 0 111 | m_SortingOrder: 0 112 | m_Sprite: {fileID: 21300000, guid: 9bfd64ced7cfd44e9a14edc2b2c8d922, type: 3} 113 | m_Color: {r: 1, g: 1, b: 0, a: 1} 114 | m_FlipX: 0 115 | m_FlipY: 0 116 | m_DrawMode: 0 117 | m_Size: {x: 1, y: 1} 118 | m_AdaptiveModeThreshold: 0.5 119 | m_SpriteTileMode: 0 120 | m_WasSpriteAssigned: 1 121 | m_MaskInteraction: 0 122 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Prefabs/Coin.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11d5ddd77944940c9af641dcd0da347d 3 | timeCreated: 1569369814 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8076a98df811d4b14a94d0497845acda 3 | folderAsset: yes 4 | timeCreated: 1569369957 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Scripts/SpawnPrefabOnMonetization.cs: -------------------------------------------------------------------------------- 1 | // Web Monetization for Unity WebGL by SIMMER.io / Rocco Balsamo 2 | // 3 | // Dual licenced. 4 | // 5 | // MIT license If downloaded from Github https://opensource.org/licenses/MIT 6 | // Asset store EULA if downloaded from the Unity Asset Store https://unity3d.com/legal/as_terms 7 | // 8 | // Need help? First read the README.pdf, then reach out to simmer.io/support if you have any questions. 9 | // 10 | // We always appreciate Github stars and Asset Store reviews. It would be great if you could help out while enjoying 11 | // this free asset :-) 12 | 13 | 14 | using System.Collections.Generic; 15 | using UnityEngine; 16 | 17 | public class SpawnPrefabOnMonetization : MonoBehaviour 18 | { 19 | 20 | public GameObject Prefab; 21 | // register one or both events if you want to use them 22 | void OnEnable() 23 | { 24 | WMBroadcaster.OnMonetizationStart += OnMonetizationStart; 25 | WMBroadcaster.OnMonetizationProgress += OnMonetizationProgress; 26 | } 27 | 28 | // unregister events that you've registered 29 | void OnDisable() 30 | { 31 | WMBroadcaster.OnMonetizationStart -= OnMonetizationStart; 32 | WMBroadcaster.OnMonetizationProgress -= OnMonetizationProgress; 33 | } 34 | 35 | // A monetization start event should occur roughly after a second or two after your game loads as WebGL. 36 | void OnMonetizationStart(Dictionary detail) 37 | { 38 | // these are the parameters that you can read from the detail dictionary. 39 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 40 | // https://coil.com/docs/#browser-start 41 | 42 | // string requestId = detail["requestId"] as string; 43 | // string id = detail["id"] as string; 44 | // string resolvedEndpoint = detail["resolvedEndpoint"] as string; 45 | // string metaContent = detail["metaContent"] as string; 46 | 47 | // Debug.Log("MonetizationStart requestId: " + requestId + ", id: " + id + ", resolvedEndpoint: " + resolvedEndpoint + ", metaContent" + metaContent); 48 | 49 | GetComponent().color = Color.green; 50 | } 51 | 52 | // A monetization progress event should occur roughly every two seconds after the monetization progress occurs 53 | void OnMonetizationProgress(Dictionary detail) 54 | { 55 | // these are the parameters that you can read from the detail dictionary. 56 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 57 | // https://coil.com/docs/#browser-progress 58 | 59 | // string amount = detail["amount"] as string; 60 | // long amountAsLong = Convert.ToInt64(amount); 61 | // string assetCode = detail["assetCode"] as string; 62 | // long scale = (long) detail["assetScale"]; 63 | 64 | // Debug.Log("MonetizationProgress amount " + amountAsLong + ", assetCode: " + assetCode + ", scale: " + scale); 65 | if (Prefab) 66 | { 67 | var spawned = Instantiate(Prefab, transform.position, transform.rotation); 68 | //Give it a little nudge, so they don't land on top of each other. 69 | spawned.GetComponent().velocity = new Vector2(UnityEngine.Random.Range(-0.5f, 0.5f), 0f); 70 | } 71 | else 72 | { 73 | Debug.Log("SpawnPrefabOnMonetization: No Prefab Found!"); 74 | } 75 | 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Scripts/SpawnPrefabOnMonetization.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e233ee4e30e67437d8d2c119cb6c91c1 3 | timeCreated: 1569369987 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8f68e93f7108450884382a6b6a1f79d 3 | folderAsset: yes 4 | timeCreated: 1569369720 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Sprites/Circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRoccoB/web-monetization-unity-webgl/685e76c01cc65235adc5e165b60c6cbb0bf3eb85/Assets/WebMonetization/SampleScene/Sprites/Circle.png -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Sprites/Circle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bfd64ced7cfd44e9a14edc2b2c8d922 3 | timeCreated: 1569369727 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: 0 34 | aniso: 16 35 | mipBias: 0 36 | wrapU: 0 37 | wrapV: 0 38 | wrapW: 0 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 3 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 4 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: 4 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | spriteSheet: 67 | serializedVersion: 2 68 | sprites: [] 69 | outline: 70 | - - {x: 0, y: 2} 71 | - {x: -0.09813535, y: 1.9975909} 72 | - {x: -0.19603428, y: 1.9903694} 73 | - {x: -0.29346094, y: 1.978353} 74 | - {x: -0.39018065, y: 1.9615705} 75 | - {x: -0.4859604, y: 1.9400625} 76 | - {x: -0.5805693, y: 1.9138807} 77 | - {x: -0.67377967, y: 1.8830881} 78 | - {x: -0.76536685, y: 1.8477591} 79 | - {x: -0.8551101, y: 1.8079786} 80 | - {x: -0.9427934, y: 1.7638426} 81 | - {x: -1.0282055, y: 1.7154572} 82 | - {x: -1.1111405, y: 1.6629392} 83 | - {x: -1.1913986, y: 1.606415} 84 | - {x: -1.2687867, y: 1.5460209} 85 | - {x: -1.343118, y: 1.4819021} 86 | - {x: -1.4142137, y: 1.4142134} 87 | - {x: -1.4819024, y: 1.3431177} 88 | - {x: -1.5460211, y: 1.2687864} 89 | - {x: -1.6064153, y: 1.1913984} 90 | - {x: -1.6629394, y: 1.1111403} 91 | - {x: -1.7154574, y: 1.0282052} 92 | - {x: -1.7638427, y: 0.94279313} 93 | - {x: -1.8079787, y: 0.8551098} 94 | - {x: -1.8477592, y: 0.76536644} 95 | - {x: -1.8830884, y: 0.6737792} 96 | - {x: -1.9138808, y: 0.5805688} 97 | - {x: -1.9400626, y: 0.48595977} 98 | - {x: -1.9615707, y: 0.39018002} 99 | - {x: -1.9783531, y: 0.29346028} 100 | - {x: -1.9903696, y: 0.19603357} 101 | - {x: -1.9975909, y: 0.098134585} 102 | - {x: -2, y: -0.0000008026785} 103 | - {x: -1.9975909, y: -0.09813619} 104 | - {x: -1.9903693, y: -0.19603516} 105 | - {x: -1.9783529, y: -0.29346186} 106 | - {x: -1.9615704, y: -0.3901816} 107 | - {x: -1.9400623, y: -0.48596132} 108 | - {x: -1.9138803, y: -0.58057034} 109 | - {x: -1.8830878, y: -0.67378074} 110 | - {x: -1.8477587, y: -0.7653679} 111 | - {x: -1.8079782, y: -0.855111} 112 | - {x: -1.7638422, y: -0.9427941} 113 | - {x: -1.715457, y: -1.028206} 114 | - {x: -1.6629391, y: -1.1111407} 115 | - {x: -1.606415, y: -1.1913987} 116 | - {x: -1.546021, y: -1.2687865} 117 | - {x: -1.4819025, y: -1.3431177} 118 | - {x: -1.4142139, y: -1.4142132} 119 | - {x: -1.3431184, y: -1.4819018} 120 | - {x: -1.2687873, y: -1.5460204} 121 | - {x: -1.1913995, y: -1.6064144} 122 | - {x: -1.1111416, y: -1.6629385} 123 | - {x: -1.0282067, y: -1.7154565} 124 | - {x: -0.9427949, y: -1.7638417} 125 | - {x: -0.85511184, y: -1.8079778} 126 | - {x: -0.76536876, y: -1.8477583} 127 | - {x: -0.6737818, y: -1.8830874} 128 | - {x: -0.5805717, y: -1.91388} 129 | - {x: -0.48596293, y: -1.9400618} 130 | - {x: -0.39018345, y: -1.96157} 131 | - {x: -0.29346398, y: -1.9783525} 132 | - {x: -0.1960375, y: -1.9903691} 133 | - {x: -0.09813879, y: -1.9975908} 134 | - {x: -0.0000036398517, y: -2} 135 | - {x: 0.098131515, y: -1.9975911} 136 | - {x: 0.19603026, y: -1.9903698} 137 | - {x: 0.29345676, y: -1.9783536} 138 | - {x: 0.3901763, y: -1.9615715} 139 | - {x: 0.48595586, y: -1.9400636} 140 | - {x: 0.58056474, y: -1.913882} 141 | - {x: 0.67377496, y: -1.8830898} 142 | - {x: 0.765362, y: -1.847761} 143 | - {x: 0.8551053, y: -1.8079809} 144 | - {x: 0.94278854, y: -1.7638452} 145 | - {x: 1.0282005, y: -1.7154602} 146 | - {x: 1.1111355, y: -1.6629425} 147 | - {x: 1.1913936, y: -1.6064187} 148 | - {x: 1.2687817, y: -1.546025} 149 | - {x: 1.3431131, y: -1.4819067} 150 | - {x: 1.4142088, y: -1.4142184} 151 | - {x: 1.4818976, y: -1.3431231} 152 | - {x: 1.5460167, y: -1.2687918} 153 | - {x: 1.6064112, y: -1.1914037} 154 | - {x: 1.6629357, y: -1.1111456} 155 | - {x: 1.7154542, y: -1.0282105} 156 | - {x: 1.7638398, y: -0.94279844} 157 | - {x: 1.8079762, y: -0.855115} 158 | - {x: 1.8477571, y: -0.76537156} 159 | - {x: 1.8830866, y: -0.6737842} 160 | - {x: 1.9138794, y: -0.5805737} 161 | - {x: 1.9400615, y: -0.48596448} 162 | - {x: 1.9615698, y: -0.39018452} 163 | - {x: 1.9783524, y: -0.29346457} 164 | - {x: 1.9903691, y: -0.19603767} 165 | - {x: 1.9975908, y: -0.09813846} 166 | - {x: 2, y: -0.0000028371733} 167 | - {x: 1.997591, y: 0.0981328} 168 | - {x: 1.9903697, y: 0.19603202} 169 | - {x: 1.9783533, y: 0.29345897} 170 | - {x: 1.9615709, y: 0.39017895} 171 | - {x: 1.9400629, y: 0.48595896} 172 | - {x: 1.9138811, y: 0.58056825} 173 | - {x: 1.8830885, y: 0.6737789} 174 | - {x: 1.8477592, y: 0.7653663} 175 | - {x: 1.8079787, y: 0.8551099} 176 | - {x: 1.7638426, y: 0.9427934} 177 | - {x: 1.7154571, y: 1.0282056} 178 | - {x: 1.662939, y: 1.1111408} 179 | - {x: 1.6064146, y: 1.1913992} 180 | - {x: 1.5460203, y: 1.2687874} 181 | - {x: 1.4819014, y: 1.3431189} 182 | - {x: 1.4142125, y: 1.4142147} 183 | - {x: 1.3431165, y: 1.4819036} 184 | - {x: 1.2687849, y: 1.5460223} 185 | - {x: 1.1913966, y: 1.6064166} 186 | - {x: 1.1111382, y: 1.6629407} 187 | - {x: 1.0282029, y: 1.7154588} 188 | - {x: 0.94279057, y: 1.7638441} 189 | - {x: 0.85510695, y: 1.8079801} 190 | - {x: 0.76536334, y: 1.8477606} 191 | - {x: 0.67377585, y: 1.8830895} 192 | - {x: 0.58056515, y: 1.9138819} 193 | - {x: 0.48595583, y: 1.9400636} 194 | - {x: 0.3901758, y: 1.9615716} 195 | - {x: 0.29345578, y: 1.9783537} 196 | - {x: 0.1960288, y: 1.99037} 197 | - {x: 0.09812956, y: 1.9975911} 198 | physicsShape: 199 | - - {x: 0, y: 2} 200 | - {x: -0.09813535, y: 1.9975909} 201 | - {x: -0.19603428, y: 1.9903694} 202 | - {x: -0.29346094, y: 1.978353} 203 | - {x: -0.39018065, y: 1.9615705} 204 | - {x: -0.4859604, y: 1.9400625} 205 | - {x: -0.5805693, y: 1.9138807} 206 | - {x: -0.67377967, y: 1.8830881} 207 | - {x: -0.76536685, y: 1.8477591} 208 | - {x: -0.8551101, y: 1.8079786} 209 | - {x: -0.9427934, y: 1.7638426} 210 | - {x: -1.0282055, y: 1.7154572} 211 | - {x: -1.1111405, y: 1.6629392} 212 | - {x: -1.1913986, y: 1.606415} 213 | - {x: -1.2687867, y: 1.5460209} 214 | - {x: -1.343118, y: 1.4819021} 215 | - {x: -1.4142137, y: 1.4142134} 216 | - {x: -1.4819024, y: 1.3431177} 217 | - {x: -1.5460211, y: 1.2687864} 218 | - {x: -1.6064153, y: 1.1913984} 219 | - {x: -1.6629394, y: 1.1111403} 220 | - {x: -1.7154574, y: 1.0282052} 221 | - {x: -1.7638427, y: 0.94279313} 222 | - {x: -1.8079787, y: 0.8551098} 223 | - {x: -1.8477592, y: 0.76536644} 224 | - {x: -1.8830884, y: 0.6737792} 225 | - {x: -1.9138808, y: 0.5805688} 226 | - {x: -1.9400626, y: 0.48595977} 227 | - {x: -1.9615707, y: 0.39018002} 228 | - {x: -1.9783531, y: 0.29346028} 229 | - {x: -1.9903696, y: 0.19603357} 230 | - {x: -1.9975909, y: 0.098134585} 231 | - {x: -2, y: -0.0000008026785} 232 | - {x: -1.9975909, y: -0.09813619} 233 | - {x: -1.9903693, y: -0.19603516} 234 | - {x: -1.9783529, y: -0.29346186} 235 | - {x: -1.9615704, y: -0.3901816} 236 | - {x: -1.9400623, y: -0.48596132} 237 | - {x: -1.9138803, y: -0.58057034} 238 | - {x: -1.8830878, y: -0.67378074} 239 | - {x: -1.8477587, y: -0.7653679} 240 | - {x: -1.8079782, y: -0.855111} 241 | - {x: -1.7638422, y: -0.9427941} 242 | - {x: -1.715457, y: -1.028206} 243 | - {x: -1.6629391, y: -1.1111407} 244 | - {x: -1.606415, y: -1.1913987} 245 | - {x: -1.546021, y: -1.2687865} 246 | - {x: -1.4819025, y: -1.3431177} 247 | - {x: -1.4142139, y: -1.4142132} 248 | - {x: -1.3431184, y: -1.4819018} 249 | - {x: -1.2687873, y: -1.5460204} 250 | - {x: -1.1913995, y: -1.6064144} 251 | - {x: -1.1111416, y: -1.6629385} 252 | - {x: -1.0282067, y: -1.7154565} 253 | - {x: -0.9427949, y: -1.7638417} 254 | - {x: -0.85511184, y: -1.8079778} 255 | - {x: -0.76536876, y: -1.8477583} 256 | - {x: -0.6737818, y: -1.8830874} 257 | - {x: -0.5805717, y: -1.91388} 258 | - {x: -0.48596293, y: -1.9400618} 259 | - {x: -0.39018345, y: -1.96157} 260 | - {x: -0.29346398, y: -1.9783525} 261 | - {x: -0.1960375, y: -1.9903691} 262 | - {x: -0.09813879, y: -1.9975908} 263 | - {x: -0.0000036398517, y: -2} 264 | - {x: 0.098131515, y: -1.9975911} 265 | - {x: 0.19603026, y: -1.9903698} 266 | - {x: 0.29345676, y: -1.9783536} 267 | - {x: 0.3901763, y: -1.9615715} 268 | - {x: 0.48595586, y: -1.9400636} 269 | - {x: 0.58056474, y: -1.913882} 270 | - {x: 0.67377496, y: -1.8830898} 271 | - {x: 0.765362, y: -1.847761} 272 | - {x: 0.8551053, y: -1.8079809} 273 | - {x: 0.94278854, y: -1.7638452} 274 | - {x: 1.0282005, y: -1.7154602} 275 | - {x: 1.1111355, y: -1.6629425} 276 | - {x: 1.1913936, y: -1.6064187} 277 | - {x: 1.2687817, y: -1.546025} 278 | - {x: 1.3431131, y: -1.4819067} 279 | - {x: 1.4142088, y: -1.4142184} 280 | - {x: 1.4818976, y: -1.3431231} 281 | - {x: 1.5460167, y: -1.2687918} 282 | - {x: 1.6064112, y: -1.1914037} 283 | - {x: 1.6629357, y: -1.1111456} 284 | - {x: 1.7154542, y: -1.0282105} 285 | - {x: 1.7638398, y: -0.94279844} 286 | - {x: 1.8079762, y: -0.855115} 287 | - {x: 1.8477571, y: -0.76537156} 288 | - {x: 1.8830866, y: -0.6737842} 289 | - {x: 1.9138794, y: -0.5805737} 290 | - {x: 1.9400615, y: -0.48596448} 291 | - {x: 1.9615698, y: -0.39018452} 292 | - {x: 1.9783524, y: -0.29346457} 293 | - {x: 1.9903691, y: -0.19603767} 294 | - {x: 1.9975908, y: -0.09813846} 295 | - {x: 2, y: -0.0000028371733} 296 | - {x: 1.997591, y: 0.0981328} 297 | - {x: 1.9903697, y: 0.19603202} 298 | - {x: 1.9783533, y: 0.29345897} 299 | - {x: 1.9615709, y: 0.39017895} 300 | - {x: 1.9400629, y: 0.48595896} 301 | - {x: 1.9138811, y: 0.58056825} 302 | - {x: 1.8830885, y: 0.6737789} 303 | - {x: 1.8477592, y: 0.7653663} 304 | - {x: 1.8079787, y: 0.8551099} 305 | - {x: 1.7638426, y: 0.9427934} 306 | - {x: 1.7154571, y: 1.0282056} 307 | - {x: 1.662939, y: 1.1111408} 308 | - {x: 1.6064146, y: 1.1913992} 309 | - {x: 1.5460203, y: 1.2687874} 310 | - {x: 1.4819014, y: 1.3431189} 311 | - {x: 1.4142125, y: 1.4142147} 312 | - {x: 1.3431165, y: 1.4819036} 313 | - {x: 1.2687849, y: 1.5460223} 314 | - {x: 1.1913966, y: 1.6064166} 315 | - {x: 1.1111382, y: 1.6629407} 316 | - {x: 1.0282029, y: 1.7154588} 317 | - {x: 0.94279057, y: 1.7638441} 318 | - {x: 0.85510695, y: 1.8079801} 319 | - {x: 0.76536334, y: 1.8477606} 320 | - {x: 0.67377585, y: 1.8830895} 321 | - {x: 0.58056515, y: 1.9138819} 322 | - {x: 0.48595583, y: 1.9400636} 323 | - {x: 0.3901758, y: 1.9615716} 324 | - {x: 0.29345578, y: 1.9783537} 325 | - {x: 0.1960288, y: 1.99037} 326 | - {x: 0.09812956, y: 1.9975911} 327 | spritePackingTag: 328 | userData: 329 | assetBundleName: 330 | assetBundleVariant: 331 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Sprites/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRoccoB/web-monetization-unity-webgl/685e76c01cc65235adc5e165b60c6cbb0bf3eb85/Assets/WebMonetization/SampleScene/Sprites/Square.png -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/Sprites/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f00dca07e3ab4aa0b1b75e64a969908 3 | timeCreated: 1569369734 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: 0 34 | aniso: 16 35 | mipBias: 0 36 | wrapU: 0 37 | wrapV: 0 38 | wrapW: 0 39 | nPOTScale: 0 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 3 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 4 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 8 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: 4 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | spriteSheet: 67 | serializedVersion: 2 68 | sprites: [] 69 | outline: 70 | - - {x: -2, y: -2} 71 | - {x: -2, y: 2} 72 | - {x: 2, y: 2} 73 | - {x: 2, y: -2} 74 | physicsShape: 75 | - - {x: -2, y: -2} 76 | - {x: -2, y: 2} 77 | - {x: 2, y: 2} 78 | - {x: 2, y: -2} 79 | spritePackingTag: 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/WebMonetizationSampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 1 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | m_NavMeshData: {fileID: 0} 113 | --- !u!1 &84440837 114 | GameObject: 115 | m_ObjectHideFlags: 0 116 | m_PrefabParentObject: {fileID: 0} 117 | m_PrefabInternal: {fileID: 0} 118 | serializedVersion: 5 119 | m_Component: 120 | - component: {fileID: 84440838} 121 | - component: {fileID: 84440841} 122 | - component: {fileID: 84440840} 123 | - component: {fileID: 84440839} 124 | m_Layer: 0 125 | m_Name: Right 126 | m_TagString: Untagged 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!4 &84440838 132 | Transform: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 84440837} 137 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 138 | m_LocalPosition: {x: 0.44, y: 0.209, z: 0} 139 | m_LocalScale: {x: 0.39549, y: 5.30268, z: 1} 140 | m_Children: [] 141 | m_Father: {fileID: 1369769578} 142 | m_RootOrder: 1 143 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 144 | --- !u!50 &84440839 145 | Rigidbody2D: 146 | serializedVersion: 4 147 | m_ObjectHideFlags: 0 148 | m_PrefabParentObject: {fileID: 0} 149 | m_PrefabInternal: {fileID: 0} 150 | m_GameObject: {fileID: 84440837} 151 | m_BodyType: 2 152 | m_Simulated: 1 153 | m_UseFullKinematicContacts: 0 154 | m_UseAutoMass: 0 155 | m_Mass: 1 156 | m_LinearDrag: 0 157 | m_AngularDrag: 0.05 158 | m_GravityScale: 1 159 | m_Material: {fileID: 0} 160 | m_Interpolate: 0 161 | m_SleepingMode: 1 162 | m_CollisionDetection: 0 163 | m_Constraints: 0 164 | --- !u!61 &84440840 165 | BoxCollider2D: 166 | m_ObjectHideFlags: 0 167 | m_PrefabParentObject: {fileID: 0} 168 | m_PrefabInternal: {fileID: 0} 169 | m_GameObject: {fileID: 84440837} 170 | m_Enabled: 1 171 | m_Density: 1 172 | m_Material: {fileID: 0} 173 | m_IsTrigger: 0 174 | m_UsedByEffector: 0 175 | m_UsedByComposite: 0 176 | m_Offset: {x: 0, y: 0} 177 | m_SpriteTilingProperty: 178 | border: {x: 0, y: 0, z: 0, w: 0} 179 | pivot: {x: 0.5, y: 0.5} 180 | oldSize: {x: 1, y: 1} 181 | newSize: {x: 1, y: 1} 182 | adaptiveTilingThreshold: 0.5 183 | drawMode: 0 184 | adaptiveTiling: 0 185 | m_AutoTiling: 0 186 | serializedVersion: 2 187 | m_Size: {x: 1, y: 1} 188 | m_EdgeRadius: 0 189 | --- !u!212 &84440841 190 | SpriteRenderer: 191 | m_ObjectHideFlags: 0 192 | m_PrefabParentObject: {fileID: 0} 193 | m_PrefabInternal: {fileID: 0} 194 | m_GameObject: {fileID: 84440837} 195 | m_Enabled: 1 196 | m_CastShadows: 0 197 | m_ReceiveShadows: 0 198 | m_MotionVectors: 1 199 | m_LightProbeUsage: 1 200 | m_ReflectionProbeUsage: 1 201 | m_Materials: 202 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 203 | m_StaticBatchInfo: 204 | firstSubMesh: 0 205 | subMeshCount: 0 206 | m_StaticBatchRoot: {fileID: 0} 207 | m_ProbeAnchor: {fileID: 0} 208 | m_LightProbeVolumeOverride: {fileID: 0} 209 | m_ScaleInLightmap: 1 210 | m_PreserveUVs: 0 211 | m_IgnoreNormalsForChartDetection: 0 212 | m_ImportantGI: 0 213 | m_SelectedEditorRenderState: 0 214 | m_MinimumChartSize: 4 215 | m_AutoUVMaxDistance: 0.5 216 | m_AutoUVMaxAngle: 89 217 | m_LightmapParameters: {fileID: 0} 218 | m_SortingLayerID: 0 219 | m_SortingLayer: 0 220 | m_SortingOrder: 0 221 | m_Sprite: {fileID: 21300000, guid: 1f00dca07e3ab4aa0b1b75e64a969908, type: 3} 222 | m_Color: {r: 1, g: 1, b: 1, a: 1} 223 | m_FlipX: 0 224 | m_FlipY: 0 225 | m_DrawMode: 0 226 | m_Size: {x: 1, y: 1} 227 | m_AdaptiveModeThreshold: 0.5 228 | m_SpriteTileMode: 0 229 | m_WasSpriteAssigned: 1 230 | m_MaskInteraction: 0 231 | --- !u!1 &232915529 232 | GameObject: 233 | m_ObjectHideFlags: 0 234 | m_PrefabParentObject: {fileID: 0} 235 | m_PrefabInternal: {fileID: 0} 236 | serializedVersion: 5 237 | m_Component: 238 | - component: {fileID: 232915530} 239 | - component: {fileID: 232915532} 240 | - component: {fileID: 232915531} 241 | m_Layer: 5 242 | m_Name: Title 243 | m_TagString: Untagged 244 | m_Icon: {fileID: 0} 245 | m_NavMeshLayer: 0 246 | m_StaticEditorFlags: 0 247 | m_IsActive: 1 248 | --- !u!224 &232915530 249 | RectTransform: 250 | m_ObjectHideFlags: 0 251 | m_PrefabParentObject: {fileID: 0} 252 | m_PrefabInternal: {fileID: 0} 253 | m_GameObject: {fileID: 232915529} 254 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 255 | m_LocalPosition: {x: 0, y: 0, z: 0} 256 | m_LocalScale: {x: 1, y: 1, z: 1} 257 | m_Children: [] 258 | m_Father: {fileID: 1515350646} 259 | m_RootOrder: 0 260 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 261 | m_AnchorMin: {x: 0.5, y: 1} 262 | m_AnchorMax: {x: 0.5, y: 1} 263 | m_AnchoredPosition: {x: 0, y: -18} 264 | m_SizeDelta: {x: 671.1, y: 61.399994} 265 | m_Pivot: {x: 0.5, y: 1} 266 | --- !u!114 &232915531 267 | MonoBehaviour: 268 | m_ObjectHideFlags: 0 269 | m_PrefabParentObject: {fileID: 0} 270 | m_PrefabInternal: {fileID: 0} 271 | m_GameObject: {fileID: 232915529} 272 | m_Enabled: 1 273 | m_EditorHideFlags: 0 274 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 275 | m_Name: 276 | m_EditorClassIdentifier: 277 | m_Material: {fileID: 0} 278 | m_Color: {r: 1, g: 1, b: 1, a: 1} 279 | m_RaycastTarget: 1 280 | m_OnCullStateChanged: 281 | m_PersistentCalls: 282 | m_Calls: [] 283 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 284 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 285 | m_FontData: 286 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 287 | m_FontSize: 40 288 | m_FontStyle: 0 289 | m_BestFit: 0 290 | m_MinSize: 0 291 | m_MaxSize: 50 292 | m_Alignment: 4 293 | m_AlignByGeometry: 0 294 | m_RichText: 1 295 | m_HorizontalOverflow: 0 296 | m_VerticalOverflow: 0 297 | m_LineSpacing: 1 298 | m_Text: Web Monetization Demo 299 | --- !u!222 &232915532 300 | CanvasRenderer: 301 | m_ObjectHideFlags: 0 302 | m_PrefabParentObject: {fileID: 0} 303 | m_PrefabInternal: {fileID: 0} 304 | m_GameObject: {fileID: 232915529} 305 | --- !u!1 &238941746 306 | GameObject: 307 | m_ObjectHideFlags: 0 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 0} 310 | serializedVersion: 5 311 | m_Component: 312 | - component: {fileID: 238941747} 313 | - component: {fileID: 238941750} 314 | - component: {fileID: 238941749} 315 | - component: {fileID: 238941748} 316 | m_Layer: 0 317 | m_Name: Bottom 318 | m_TagString: Untagged 319 | m_Icon: {fileID: 0} 320 | m_NavMeshLayer: 0 321 | m_StaticEditorFlags: 0 322 | m_IsActive: 1 323 | --- !u!4 &238941747 324 | Transform: 325 | m_ObjectHideFlags: 0 326 | m_PrefabParentObject: {fileID: 0} 327 | m_PrefabInternal: {fileID: 0} 328 | m_GameObject: {fileID: 238941746} 329 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 330 | m_LocalPosition: {x: -5.028, y: -2.206, z: 0} 331 | m_LocalScale: {x: 11.330599, y: 0.47301102, z: 1} 332 | m_Children: [] 333 | m_Father: {fileID: 1369769578} 334 | m_RootOrder: 2 335 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 336 | --- !u!50 &238941748 337 | Rigidbody2D: 338 | serializedVersion: 4 339 | m_ObjectHideFlags: 0 340 | m_PrefabParentObject: {fileID: 0} 341 | m_PrefabInternal: {fileID: 0} 342 | m_GameObject: {fileID: 238941746} 343 | m_BodyType: 2 344 | m_Simulated: 1 345 | m_UseFullKinematicContacts: 0 346 | m_UseAutoMass: 0 347 | m_Mass: 1 348 | m_LinearDrag: 0 349 | m_AngularDrag: 0.05 350 | m_GravityScale: 1 351 | m_Material: {fileID: 0} 352 | m_Interpolate: 0 353 | m_SleepingMode: 1 354 | m_CollisionDetection: 0 355 | m_Constraints: 0 356 | --- !u!61 &238941749 357 | BoxCollider2D: 358 | m_ObjectHideFlags: 0 359 | m_PrefabParentObject: {fileID: 0} 360 | m_PrefabInternal: {fileID: 0} 361 | m_GameObject: {fileID: 238941746} 362 | m_Enabled: 1 363 | m_Density: 1 364 | m_Material: {fileID: 0} 365 | m_IsTrigger: 0 366 | m_UsedByEffector: 0 367 | m_UsedByComposite: 0 368 | m_Offset: {x: 0, y: 0} 369 | m_SpriteTilingProperty: 370 | border: {x: 0, y: 0, z: 0, w: 0} 371 | pivot: {x: 0.5, y: 0.5} 372 | oldSize: {x: 1, y: 1} 373 | newSize: {x: 1, y: 1} 374 | adaptiveTilingThreshold: 0.5 375 | drawMode: 0 376 | adaptiveTiling: 0 377 | m_AutoTiling: 0 378 | serializedVersion: 2 379 | m_Size: {x: 1, y: 1} 380 | m_EdgeRadius: 0 381 | --- !u!212 &238941750 382 | SpriteRenderer: 383 | m_ObjectHideFlags: 0 384 | m_PrefabParentObject: {fileID: 0} 385 | m_PrefabInternal: {fileID: 0} 386 | m_GameObject: {fileID: 238941746} 387 | m_Enabled: 1 388 | m_CastShadows: 0 389 | m_ReceiveShadows: 0 390 | m_MotionVectors: 1 391 | m_LightProbeUsage: 1 392 | m_ReflectionProbeUsage: 1 393 | m_Materials: 394 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 395 | m_StaticBatchInfo: 396 | firstSubMesh: 0 397 | subMeshCount: 0 398 | m_StaticBatchRoot: {fileID: 0} 399 | m_ProbeAnchor: {fileID: 0} 400 | m_LightProbeVolumeOverride: {fileID: 0} 401 | m_ScaleInLightmap: 1 402 | m_PreserveUVs: 0 403 | m_IgnoreNormalsForChartDetection: 0 404 | m_ImportantGI: 0 405 | m_SelectedEditorRenderState: 0 406 | m_MinimumChartSize: 4 407 | m_AutoUVMaxDistance: 0.5 408 | m_AutoUVMaxAngle: 89 409 | m_LightmapParameters: {fileID: 0} 410 | m_SortingLayerID: 0 411 | m_SortingLayer: 0 412 | m_SortingOrder: 0 413 | m_Sprite: {fileID: 21300000, guid: 1f00dca07e3ab4aa0b1b75e64a969908, type: 3} 414 | m_Color: {r: 1, g: 1, b: 1, a: 1} 415 | m_FlipX: 0 416 | m_FlipY: 0 417 | m_DrawMode: 0 418 | m_Size: {x: 1, y: 1} 419 | m_AdaptiveModeThreshold: 0.5 420 | m_SpriteTileMode: 0 421 | m_WasSpriteAssigned: 1 422 | m_MaskInteraction: 0 423 | --- !u!1001 &482401683 424 | Prefab: 425 | m_ObjectHideFlags: 0 426 | serializedVersion: 2 427 | m_Modification: 428 | m_TransformParent: {fileID: 0} 429 | m_Modifications: 430 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 431 | propertyPath: m_LocalPosition.x 432 | value: -0.09000002 433 | objectReference: {fileID: 0} 434 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 435 | propertyPath: m_LocalPosition.y 436 | value: 3.46 437 | objectReference: {fileID: 0} 438 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 439 | propertyPath: m_LocalPosition.z 440 | value: 0 441 | objectReference: {fileID: 0} 442 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 443 | propertyPath: m_LocalRotation.x 444 | value: 0 445 | objectReference: {fileID: 0} 446 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 447 | propertyPath: m_LocalRotation.y 448 | value: 0 449 | objectReference: {fileID: 0} 450 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 451 | propertyPath: m_LocalRotation.z 452 | value: 0 453 | objectReference: {fileID: 0} 454 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 455 | propertyPath: m_LocalRotation.w 456 | value: 1 457 | objectReference: {fileID: 0} 458 | - target: {fileID: 4779211102405342, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 459 | propertyPath: m_RootOrder 460 | value: 1 461 | objectReference: {fileID: 0} 462 | - target: {fileID: 114567501363096764, guid: 56ec2a799ece14320bf50376441bd622, 463 | type: 2} 464 | propertyPath: simulateMonetization 465 | value: 0 466 | objectReference: {fileID: 0} 467 | m_RemovedComponents: [] 468 | m_ParentPrefab: {fileID: 100100000, guid: 56ec2a799ece14320bf50376441bd622, type: 2} 469 | m_IsPrefabParent: 0 470 | --- !u!1 &734531621 471 | GameObject: 472 | m_ObjectHideFlags: 0 473 | m_PrefabParentObject: {fileID: 0} 474 | m_PrefabInternal: {fileID: 0} 475 | serializedVersion: 5 476 | m_Component: 477 | - component: {fileID: 734531622} 478 | - component: {fileID: 734531625} 479 | - component: {fileID: 734531624} 480 | - component: {fileID: 734531623} 481 | m_Layer: 5 482 | m_Name: SimulateButton 483 | m_TagString: Untagged 484 | m_Icon: {fileID: 0} 485 | m_NavMeshLayer: 0 486 | m_StaticEditorFlags: 0 487 | m_IsActive: 1 488 | --- !u!224 &734531622 489 | RectTransform: 490 | m_ObjectHideFlags: 0 491 | m_PrefabParentObject: {fileID: 0} 492 | m_PrefabInternal: {fileID: 0} 493 | m_GameObject: {fileID: 734531621} 494 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 495 | m_LocalPosition: {x: 0, y: 0, z: 0} 496 | m_LocalScale: {x: 1, y: 1, z: 1} 497 | m_Children: 498 | - {fileID: 824011517} 499 | m_Father: {fileID: 1515350646} 500 | m_RootOrder: 1 501 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 502 | m_AnchorMin: {x: 1, y: 0} 503 | m_AnchorMax: {x: 1, y: 0} 504 | m_AnchoredPosition: {x: -24, y: 29} 505 | m_SizeDelta: {x: 172.8, y: 30} 506 | m_Pivot: {x: 1, y: 0} 507 | --- !u!114 &734531623 508 | MonoBehaviour: 509 | m_ObjectHideFlags: 0 510 | m_PrefabParentObject: {fileID: 0} 511 | m_PrefabInternal: {fileID: 0} 512 | m_GameObject: {fileID: 734531621} 513 | m_Enabled: 1 514 | m_EditorHideFlags: 0 515 | m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 516 | m_Name: 517 | m_EditorClassIdentifier: 518 | m_Navigation: 519 | m_Mode: 3 520 | m_SelectOnUp: {fileID: 0} 521 | m_SelectOnDown: {fileID: 0} 522 | m_SelectOnLeft: {fileID: 0} 523 | m_SelectOnRight: {fileID: 0} 524 | m_Transition: 1 525 | m_Colors: 526 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 527 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 528 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 529 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 530 | m_ColorMultiplier: 1 531 | m_FadeDuration: 0.1 532 | m_SpriteState: 533 | m_HighlightedSprite: {fileID: 0} 534 | m_PressedSprite: {fileID: 0} 535 | m_DisabledSprite: {fileID: 0} 536 | m_AnimationTriggers: 537 | m_NormalTrigger: Normal 538 | m_HighlightedTrigger: Highlighted 539 | m_PressedTrigger: Pressed 540 | m_DisabledTrigger: Disabled 541 | m_Interactable: 1 542 | m_TargetGraphic: {fileID: 734531624} 543 | m_OnClick: 544 | m_PersistentCalls: 545 | m_Calls: 546 | - m_Target: {fileID: 1863711789} 547 | m_MethodName: StartSimulation 548 | m_Mode: 1 549 | m_Arguments: 550 | m_ObjectArgument: {fileID: 0} 551 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 552 | m_IntArgument: 0 553 | m_FloatArgument: 0 554 | m_StringArgument: 555 | m_BoolArgument: 0 556 | m_CallState: 2 557 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 558 | Culture=neutral, PublicKeyToken=null 559 | --- !u!114 &734531624 560 | MonoBehaviour: 561 | m_ObjectHideFlags: 0 562 | m_PrefabParentObject: {fileID: 0} 563 | m_PrefabInternal: {fileID: 0} 564 | m_GameObject: {fileID: 734531621} 565 | m_Enabled: 1 566 | m_EditorHideFlags: 0 567 | m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 568 | m_Name: 569 | m_EditorClassIdentifier: 570 | m_Material: {fileID: 0} 571 | m_Color: {r: 1, g: 1, b: 1, a: 1} 572 | m_RaycastTarget: 1 573 | m_OnCullStateChanged: 574 | m_PersistentCalls: 575 | m_Calls: [] 576 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 577 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 578 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 579 | m_Type: 1 580 | m_PreserveAspect: 0 581 | m_FillCenter: 1 582 | m_FillMethod: 4 583 | m_FillAmount: 1 584 | m_FillClockwise: 1 585 | m_FillOrigin: 0 586 | --- !u!222 &734531625 587 | CanvasRenderer: 588 | m_ObjectHideFlags: 0 589 | m_PrefabParentObject: {fileID: 0} 590 | m_PrefabInternal: {fileID: 0} 591 | m_GameObject: {fileID: 734531621} 592 | --- !u!1 &791334714 593 | GameObject: 594 | m_ObjectHideFlags: 0 595 | m_PrefabParentObject: {fileID: 0} 596 | m_PrefabInternal: {fileID: 0} 597 | serializedVersion: 5 598 | m_Component: 599 | - component: {fileID: 791334716} 600 | - component: {fileID: 791334715} 601 | - component: {fileID: 791334717} 602 | m_Layer: 0 603 | m_Name: CoinSpawner 604 | m_TagString: Untagged 605 | m_Icon: {fileID: 0} 606 | m_NavMeshLayer: 0 607 | m_StaticEditorFlags: 0 608 | m_IsActive: 1 609 | --- !u!212 &791334715 610 | SpriteRenderer: 611 | m_ObjectHideFlags: 0 612 | m_PrefabParentObject: {fileID: 0} 613 | m_PrefabInternal: {fileID: 0} 614 | m_GameObject: {fileID: 791334714} 615 | m_Enabled: 1 616 | m_CastShadows: 0 617 | m_ReceiveShadows: 0 618 | m_MotionVectors: 1 619 | m_LightProbeUsage: 1 620 | m_ReflectionProbeUsage: 1 621 | m_Materials: 622 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 623 | m_StaticBatchInfo: 624 | firstSubMesh: 0 625 | subMeshCount: 0 626 | m_StaticBatchRoot: {fileID: 0} 627 | m_ProbeAnchor: {fileID: 0} 628 | m_LightProbeVolumeOverride: {fileID: 0} 629 | m_ScaleInLightmap: 1 630 | m_PreserveUVs: 0 631 | m_IgnoreNormalsForChartDetection: 0 632 | m_ImportantGI: 0 633 | m_SelectedEditorRenderState: 0 634 | m_MinimumChartSize: 4 635 | m_AutoUVMaxDistance: 0.5 636 | m_AutoUVMaxAngle: 89 637 | m_LightmapParameters: {fileID: 0} 638 | m_SortingLayerID: 0 639 | m_SortingLayer: 0 640 | m_SortingOrder: 0 641 | m_Sprite: {fileID: 21300000, guid: 1f00dca07e3ab4aa0b1b75e64a969908, type: 3} 642 | m_Color: {r: 1, g: 1, b: 1, a: 1} 643 | m_FlipX: 0 644 | m_FlipY: 0 645 | m_DrawMode: 0 646 | m_Size: {x: 1, y: 1} 647 | m_AdaptiveModeThreshold: 0.5 648 | m_SpriteTileMode: 0 649 | m_WasSpriteAssigned: 1 650 | m_MaskInteraction: 0 651 | --- !u!4 &791334716 652 | Transform: 653 | m_ObjectHideFlags: 0 654 | m_PrefabParentObject: {fileID: 0} 655 | m_PrefabInternal: {fileID: 0} 656 | m_GameObject: {fileID: 791334714} 657 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 658 | m_LocalPosition: {x: -0.09, y: 2.98, z: 0} 659 | m_LocalScale: {x: 1, y: 1, z: 1} 660 | m_Children: [] 661 | m_Father: {fileID: 0} 662 | m_RootOrder: 3 663 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 664 | --- !u!114 &791334717 665 | MonoBehaviour: 666 | m_ObjectHideFlags: 0 667 | m_PrefabParentObject: {fileID: 0} 668 | m_PrefabInternal: {fileID: 0} 669 | m_GameObject: {fileID: 791334714} 670 | m_Enabled: 1 671 | m_EditorHideFlags: 0 672 | m_Script: {fileID: 11500000, guid: e233ee4e30e67437d8d2c119cb6c91c1, type: 3} 673 | m_Name: 674 | m_EditorClassIdentifier: 675 | Prefab: {fileID: 1930205160261368, guid: 11d5ddd77944940c9af641dcd0da347d, type: 2} 676 | --- !u!1 &824011516 677 | GameObject: 678 | m_ObjectHideFlags: 0 679 | m_PrefabParentObject: {fileID: 0} 680 | m_PrefabInternal: {fileID: 0} 681 | serializedVersion: 5 682 | m_Component: 683 | - component: {fileID: 824011517} 684 | - component: {fileID: 824011519} 685 | - component: {fileID: 824011518} 686 | m_Layer: 5 687 | m_Name: Text 688 | m_TagString: Untagged 689 | m_Icon: {fileID: 0} 690 | m_NavMeshLayer: 0 691 | m_StaticEditorFlags: 0 692 | m_IsActive: 1 693 | --- !u!224 &824011517 694 | RectTransform: 695 | m_ObjectHideFlags: 0 696 | m_PrefabParentObject: {fileID: 0} 697 | m_PrefabInternal: {fileID: 0} 698 | m_GameObject: {fileID: 824011516} 699 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 700 | m_LocalPosition: {x: 0, y: 0, z: 0} 701 | m_LocalScale: {x: 1, y: 1, z: 1} 702 | m_Children: [] 703 | m_Father: {fileID: 734531622} 704 | m_RootOrder: 0 705 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 706 | m_AnchorMin: {x: 0, y: 0} 707 | m_AnchorMax: {x: 1, y: 1} 708 | m_AnchoredPosition: {x: 0, y: 0} 709 | m_SizeDelta: {x: 0, y: 0} 710 | m_Pivot: {x: 0.5, y: 0.5} 711 | --- !u!114 &824011518 712 | MonoBehaviour: 713 | m_ObjectHideFlags: 0 714 | m_PrefabParentObject: {fileID: 0} 715 | m_PrefabInternal: {fileID: 0} 716 | m_GameObject: {fileID: 824011516} 717 | m_Enabled: 1 718 | m_EditorHideFlags: 0 719 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 720 | m_Name: 721 | m_EditorClassIdentifier: 722 | m_Material: {fileID: 0} 723 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 724 | m_RaycastTarget: 1 725 | m_OnCullStateChanged: 726 | m_PersistentCalls: 727 | m_Calls: [] 728 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 729 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 730 | m_FontData: 731 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 732 | m_FontSize: 14 733 | m_FontStyle: 0 734 | m_BestFit: 0 735 | m_MinSize: 10 736 | m_MaxSize: 40 737 | m_Alignment: 4 738 | m_AlignByGeometry: 0 739 | m_RichText: 1 740 | m_HorizontalOverflow: 0 741 | m_VerticalOverflow: 0 742 | m_LineSpacing: 1 743 | m_Text: Simulate Monetization 744 | --- !u!222 &824011519 745 | CanvasRenderer: 746 | m_ObjectHideFlags: 0 747 | m_PrefabParentObject: {fileID: 0} 748 | m_PrefabInternal: {fileID: 0} 749 | m_GameObject: {fileID: 824011516} 750 | --- !u!1 &1285797777 751 | GameObject: 752 | m_ObjectHideFlags: 0 753 | m_PrefabParentObject: {fileID: 0} 754 | m_PrefabInternal: {fileID: 0} 755 | serializedVersion: 5 756 | m_Component: 757 | - component: {fileID: 1285797780} 758 | - component: {fileID: 1285797779} 759 | - component: {fileID: 1285797778} 760 | m_Layer: 0 761 | m_Name: EventSystem 762 | m_TagString: Untagged 763 | m_Icon: {fileID: 0} 764 | m_NavMeshLayer: 0 765 | m_StaticEditorFlags: 0 766 | m_IsActive: 1 767 | --- !u!114 &1285797778 768 | MonoBehaviour: 769 | m_ObjectHideFlags: 0 770 | m_PrefabParentObject: {fileID: 0} 771 | m_PrefabInternal: {fileID: 0} 772 | m_GameObject: {fileID: 1285797777} 773 | m_Enabled: 1 774 | m_EditorHideFlags: 0 775 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 776 | m_Name: 777 | m_EditorClassIdentifier: 778 | m_HorizontalAxis: Horizontal 779 | m_VerticalAxis: Vertical 780 | m_SubmitButton: Submit 781 | m_CancelButton: Cancel 782 | m_InputActionsPerSecond: 10 783 | m_RepeatDelay: 0.5 784 | m_ForceModuleActive: 0 785 | --- !u!114 &1285797779 786 | MonoBehaviour: 787 | m_ObjectHideFlags: 0 788 | m_PrefabParentObject: {fileID: 0} 789 | m_PrefabInternal: {fileID: 0} 790 | m_GameObject: {fileID: 1285797777} 791 | m_Enabled: 1 792 | m_EditorHideFlags: 0 793 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 794 | m_Name: 795 | m_EditorClassIdentifier: 796 | m_FirstSelected: {fileID: 0} 797 | m_sendNavigationEvents: 1 798 | m_DragThreshold: 5 799 | --- !u!4 &1285797780 800 | Transform: 801 | m_ObjectHideFlags: 0 802 | m_PrefabParentObject: {fileID: 0} 803 | m_PrefabInternal: {fileID: 0} 804 | m_GameObject: {fileID: 1285797777} 805 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 806 | m_LocalPosition: {x: 0, y: 0, z: 0} 807 | m_LocalScale: {x: 1, y: 1, z: 1} 808 | m_Children: [] 809 | m_Father: {fileID: 0} 810 | m_RootOrder: 4 811 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 812 | --- !u!1 &1369769577 813 | GameObject: 814 | m_ObjectHideFlags: 0 815 | m_PrefabParentObject: {fileID: 0} 816 | m_PrefabInternal: {fileID: 0} 817 | serializedVersion: 5 818 | m_Component: 819 | - component: {fileID: 1369769578} 820 | m_Layer: 0 821 | m_Name: CoinBucket 822 | m_TagString: Untagged 823 | m_Icon: {fileID: 0} 824 | m_NavMeshLayer: 0 825 | m_StaticEditorFlags: 0 826 | m_IsActive: 1 827 | --- !u!4 &1369769578 828 | Transform: 829 | m_ObjectHideFlags: 0 830 | m_PrefabParentObject: {fileID: 0} 831 | m_PrefabInternal: {fileID: 0} 832 | m_GameObject: {fileID: 1369769577} 833 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 834 | m_LocalPosition: {x: 5.19, y: -0.012563944, z: 0} 835 | m_LocalScale: {x: 1, y: 1, z: 1} 836 | m_Children: 837 | - {fileID: 1749424722} 838 | - {fileID: 84440838} 839 | - {fileID: 238941747} 840 | m_Father: {fileID: 0} 841 | m_RootOrder: 2 842 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 843 | --- !u!1 &1515350642 844 | GameObject: 845 | m_ObjectHideFlags: 0 846 | m_PrefabParentObject: {fileID: 0} 847 | m_PrefabInternal: {fileID: 0} 848 | serializedVersion: 5 849 | m_Component: 850 | - component: {fileID: 1515350646} 851 | - component: {fileID: 1515350645} 852 | - component: {fileID: 1515350644} 853 | - component: {fileID: 1515350643} 854 | m_Layer: 5 855 | m_Name: Canvas 856 | m_TagString: Untagged 857 | m_Icon: {fileID: 0} 858 | m_NavMeshLayer: 0 859 | m_StaticEditorFlags: 0 860 | m_IsActive: 1 861 | --- !u!114 &1515350643 862 | MonoBehaviour: 863 | m_ObjectHideFlags: 0 864 | m_PrefabParentObject: {fileID: 0} 865 | m_PrefabInternal: {fileID: 0} 866 | m_GameObject: {fileID: 1515350642} 867 | m_Enabled: 1 868 | m_EditorHideFlags: 0 869 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 870 | m_Name: 871 | m_EditorClassIdentifier: 872 | m_IgnoreReversedGraphics: 1 873 | m_BlockingObjects: 0 874 | m_BlockingMask: 875 | serializedVersion: 2 876 | m_Bits: 4294967295 877 | --- !u!114 &1515350644 878 | MonoBehaviour: 879 | m_ObjectHideFlags: 0 880 | m_PrefabParentObject: {fileID: 0} 881 | m_PrefabInternal: {fileID: 0} 882 | m_GameObject: {fileID: 1515350642} 883 | m_Enabled: 1 884 | m_EditorHideFlags: 0 885 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 886 | m_Name: 887 | m_EditorClassIdentifier: 888 | m_UiScaleMode: 0 889 | m_ReferencePixelsPerUnit: 100 890 | m_ScaleFactor: 1 891 | m_ReferenceResolution: {x: 800, y: 600} 892 | m_ScreenMatchMode: 0 893 | m_MatchWidthOrHeight: 0 894 | m_PhysicalUnit: 3 895 | m_FallbackScreenDPI: 96 896 | m_DefaultSpriteDPI: 96 897 | m_DynamicPixelsPerUnit: 1 898 | --- !u!223 &1515350645 899 | Canvas: 900 | m_ObjectHideFlags: 0 901 | m_PrefabParentObject: {fileID: 0} 902 | m_PrefabInternal: {fileID: 0} 903 | m_GameObject: {fileID: 1515350642} 904 | m_Enabled: 1 905 | serializedVersion: 3 906 | m_RenderMode: 0 907 | m_Camera: {fileID: 0} 908 | m_PlaneDistance: 100 909 | m_PixelPerfect: 0 910 | m_ReceivesEvents: 1 911 | m_OverrideSorting: 0 912 | m_OverridePixelPerfect: 0 913 | m_SortingBucketNormalizedSize: 0 914 | m_AdditionalShaderChannelsFlag: 0 915 | m_SortingLayerID: 0 916 | m_SortingOrder: 0 917 | m_TargetDisplay: 0 918 | --- !u!224 &1515350646 919 | RectTransform: 920 | m_ObjectHideFlags: 0 921 | m_PrefabParentObject: {fileID: 0} 922 | m_PrefabInternal: {fileID: 0} 923 | m_GameObject: {fileID: 1515350642} 924 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 925 | m_LocalPosition: {x: 0, y: 0, z: 0} 926 | m_LocalScale: {x: 0, y: 0, z: 0} 927 | m_Children: 928 | - {fileID: 232915530} 929 | - {fileID: 734531622} 930 | m_Father: {fileID: 0} 931 | m_RootOrder: 5 932 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 933 | m_AnchorMin: {x: 0, y: 0} 934 | m_AnchorMax: {x: 0, y: 0} 935 | m_AnchoredPosition: {x: 0, y: 0} 936 | m_SizeDelta: {x: 0, y: 0} 937 | m_Pivot: {x: 0, y: 0} 938 | --- !u!1 &1749424721 939 | GameObject: 940 | m_ObjectHideFlags: 0 941 | m_PrefabParentObject: {fileID: 0} 942 | m_PrefabInternal: {fileID: 0} 943 | serializedVersion: 5 944 | m_Component: 945 | - component: {fileID: 1749424722} 946 | - component: {fileID: 1749424725} 947 | - component: {fileID: 1749424724} 948 | - component: {fileID: 1749424723} 949 | m_Layer: 0 950 | m_Name: Left 951 | m_TagString: Untagged 952 | m_Icon: {fileID: 0} 953 | m_NavMeshLayer: 0 954 | m_StaticEditorFlags: 0 955 | m_IsActive: 1 956 | --- !u!4 &1749424722 957 | Transform: 958 | m_ObjectHideFlags: 0 959 | m_PrefabParentObject: {fileID: 0} 960 | m_PrefabInternal: {fileID: 0} 961 | m_GameObject: {fileID: 1749424721} 962 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 963 | m_LocalPosition: {x: -10.72, y: 0.209, z: 0} 964 | m_LocalScale: {x: 0.39549157, y: 5.302679, z: 1} 965 | m_Children: [] 966 | m_Father: {fileID: 1369769578} 967 | m_RootOrder: 0 968 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 969 | --- !u!50 &1749424723 970 | Rigidbody2D: 971 | serializedVersion: 4 972 | m_ObjectHideFlags: 0 973 | m_PrefabParentObject: {fileID: 0} 974 | m_PrefabInternal: {fileID: 0} 975 | m_GameObject: {fileID: 1749424721} 976 | m_BodyType: 2 977 | m_Simulated: 1 978 | m_UseFullKinematicContacts: 0 979 | m_UseAutoMass: 0 980 | m_Mass: 1 981 | m_LinearDrag: 0 982 | m_AngularDrag: 0.05 983 | m_GravityScale: 1 984 | m_Material: {fileID: 0} 985 | m_Interpolate: 0 986 | m_SleepingMode: 1 987 | m_CollisionDetection: 0 988 | m_Constraints: 0 989 | --- !u!61 &1749424724 990 | BoxCollider2D: 991 | m_ObjectHideFlags: 0 992 | m_PrefabParentObject: {fileID: 0} 993 | m_PrefabInternal: {fileID: 0} 994 | m_GameObject: {fileID: 1749424721} 995 | m_Enabled: 1 996 | m_Density: 1 997 | m_Material: {fileID: 0} 998 | m_IsTrigger: 0 999 | m_UsedByEffector: 0 1000 | m_UsedByComposite: 0 1001 | m_Offset: {x: 0, y: 0} 1002 | m_SpriteTilingProperty: 1003 | border: {x: 0, y: 0, z: 0, w: 0} 1004 | pivot: {x: 0.5, y: 0.5} 1005 | oldSize: {x: 1, y: 1} 1006 | newSize: {x: 1, y: 1} 1007 | adaptiveTilingThreshold: 0.5 1008 | drawMode: 0 1009 | adaptiveTiling: 0 1010 | m_AutoTiling: 0 1011 | serializedVersion: 2 1012 | m_Size: {x: 1, y: 1} 1013 | m_EdgeRadius: 0 1014 | --- !u!212 &1749424725 1015 | SpriteRenderer: 1016 | m_ObjectHideFlags: 0 1017 | m_PrefabParentObject: {fileID: 0} 1018 | m_PrefabInternal: {fileID: 0} 1019 | m_GameObject: {fileID: 1749424721} 1020 | m_Enabled: 1 1021 | m_CastShadows: 0 1022 | m_ReceiveShadows: 0 1023 | m_MotionVectors: 1 1024 | m_LightProbeUsage: 1 1025 | m_ReflectionProbeUsage: 1 1026 | m_Materials: 1027 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 1028 | m_StaticBatchInfo: 1029 | firstSubMesh: 0 1030 | subMeshCount: 0 1031 | m_StaticBatchRoot: {fileID: 0} 1032 | m_ProbeAnchor: {fileID: 0} 1033 | m_LightProbeVolumeOverride: {fileID: 0} 1034 | m_ScaleInLightmap: 1 1035 | m_PreserveUVs: 0 1036 | m_IgnoreNormalsForChartDetection: 0 1037 | m_ImportantGI: 0 1038 | m_SelectedEditorRenderState: 0 1039 | m_MinimumChartSize: 4 1040 | m_AutoUVMaxDistance: 0.5 1041 | m_AutoUVMaxAngle: 89 1042 | m_LightmapParameters: {fileID: 0} 1043 | m_SortingLayerID: 0 1044 | m_SortingLayer: 0 1045 | m_SortingOrder: 0 1046 | m_Sprite: {fileID: 21300000, guid: 1f00dca07e3ab4aa0b1b75e64a969908, type: 3} 1047 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1048 | m_FlipX: 0 1049 | m_FlipY: 0 1050 | m_DrawMode: 0 1051 | m_Size: {x: 1, y: 1} 1052 | m_AdaptiveModeThreshold: 0.5 1053 | m_SpriteTileMode: 0 1054 | m_WasSpriteAssigned: 1 1055 | m_MaskInteraction: 0 1056 | --- !u!1 &1835738026 1057 | GameObject: 1058 | m_ObjectHideFlags: 0 1059 | m_PrefabParentObject: {fileID: 0} 1060 | m_PrefabInternal: {fileID: 0} 1061 | serializedVersion: 5 1062 | m_Component: 1063 | - component: {fileID: 1835738031} 1064 | - component: {fileID: 1835738030} 1065 | - component: {fileID: 1835738029} 1066 | - component: {fileID: 1835738028} 1067 | - component: {fileID: 1835738027} 1068 | m_Layer: 0 1069 | m_Name: Main Camera 1070 | m_TagString: MainCamera 1071 | m_Icon: {fileID: 0} 1072 | m_NavMeshLayer: 0 1073 | m_StaticEditorFlags: 0 1074 | m_IsActive: 1 1075 | --- !u!81 &1835738027 1076 | AudioListener: 1077 | m_ObjectHideFlags: 0 1078 | m_PrefabParentObject: {fileID: 0} 1079 | m_PrefabInternal: {fileID: 0} 1080 | m_GameObject: {fileID: 1835738026} 1081 | m_Enabled: 1 1082 | --- !u!124 &1835738028 1083 | Behaviour: 1084 | m_ObjectHideFlags: 0 1085 | m_PrefabParentObject: {fileID: 0} 1086 | m_PrefabInternal: {fileID: 0} 1087 | m_GameObject: {fileID: 1835738026} 1088 | m_Enabled: 1 1089 | --- !u!92 &1835738029 1090 | Behaviour: 1091 | m_ObjectHideFlags: 0 1092 | m_PrefabParentObject: {fileID: 0} 1093 | m_PrefabInternal: {fileID: 0} 1094 | m_GameObject: {fileID: 1835738026} 1095 | m_Enabled: 1 1096 | --- !u!20 &1835738030 1097 | Camera: 1098 | m_ObjectHideFlags: 0 1099 | m_PrefabParentObject: {fileID: 0} 1100 | m_PrefabInternal: {fileID: 0} 1101 | m_GameObject: {fileID: 1835738026} 1102 | m_Enabled: 1 1103 | serializedVersion: 2 1104 | m_ClearFlags: 1 1105 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 1106 | m_NormalizedViewPortRect: 1107 | serializedVersion: 2 1108 | x: 0 1109 | y: 0 1110 | width: 1 1111 | height: 1 1112 | near clip plane: 0.3 1113 | far clip plane: 1000 1114 | field of view: 60 1115 | orthographic: 1 1116 | orthographic size: 5 1117 | m_Depth: -1 1118 | m_CullingMask: 1119 | serializedVersion: 2 1120 | m_Bits: 4294967295 1121 | m_RenderingPath: -1 1122 | m_TargetTexture: {fileID: 0} 1123 | m_TargetDisplay: 0 1124 | m_TargetEye: 3 1125 | m_HDR: 1 1126 | m_AllowMSAA: 1 1127 | m_ForceIntoRT: 0 1128 | m_OcclusionCulling: 1 1129 | m_StereoConvergence: 10 1130 | m_StereoSeparation: 0.022 1131 | m_StereoMirrorMode: 0 1132 | --- !u!4 &1835738031 1133 | Transform: 1134 | m_ObjectHideFlags: 0 1135 | m_PrefabParentObject: {fileID: 0} 1136 | m_PrefabInternal: {fileID: 0} 1137 | m_GameObject: {fileID: 1835738026} 1138 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1139 | m_LocalPosition: {x: 0, y: 0, z: -10} 1140 | m_LocalScale: {x: 1, y: 1, z: 1} 1141 | m_Children: [] 1142 | m_Father: {fileID: 0} 1143 | m_RootOrder: 0 1144 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1145 | --- !u!114 &1863711789 stripped 1146 | MonoBehaviour: 1147 | m_PrefabParentObject: {fileID: 114567501363096764, guid: 56ec2a799ece14320bf50376441bd622, 1148 | type: 2} 1149 | m_PrefabInternal: {fileID: 482401683} 1150 | m_Script: {fileID: 11500000, guid: 83d20e3777d1a488c98702c0f9d66e87, type: 3} 1151 | -------------------------------------------------------------------------------- /Assets/WebMonetization/SampleScene/WebMonetizationSampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37b363b0bc87e4bdaae9e33915a3ab4d 3 | timeCreated: 1569369204 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0590fb8e5714f42d78cde216a017571e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/WMBroadcaster.cs: -------------------------------------------------------------------------------- 1 | // Web Monetization for Unity WebGL by SIMMER.io / Rocco Balsamo 2 | // 3 | // Dual licenced. 4 | // 5 | // MIT license If downloaded from Github https://opensource.org/licenses/MIT 6 | // Asset store EULA if downloaded from the Unity Asset Store https://unity3d.com/legal/as_terms 7 | // 8 | // Need help? First read the README.pdf, then reach out to simmer.io/support if you have any questions. 9 | // 10 | // We always appreciate Github stars and Asset Store reviews. It would be great if you could help out while enjoying 11 | // this free asset :-) 12 | 13 | using System; 14 | using System.Collections; 15 | using System.Collections.Generic; 16 | using UnityEngine; 17 | 18 | using System.Runtime.InteropServices; 19 | 20 | public class WMBroadcaster : MonoBehaviour 21 | { 22 | 23 | public string paymentPointer = "$coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg"; 24 | public bool simulateMonetization = false; 25 | 26 | public delegate void MonetizationStartAction(Dictionary detail); 27 | public static event MonetizationStartAction OnMonetizationStart; 28 | 29 | public delegate void MonetizationProgressAction(Dictionary detail); 30 | public static event MonetizationProgressAction OnMonetizationProgress; 31 | 32 | private string _simulatedStartDetail = 33 | "{\"requestId\":\"344d36cf-a27c-45b9-9e85-86ed48364ff5\",\"id\":\"344d36cf-a27c-45b9-9e85-86ed48364ff5\",\"resolvedEndpoint\":\"https://coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg\",\"metaContent\":\"$coil.xrptipbot.com/JABJLDXNSje7h_bY26_6wg\"}"; 34 | 35 | private string _simulatedProgressDetail = "{\"amount\":\"200000\",\"assetCode\":\"USD\",\"assetScale\":9}"; 36 | 37 | private bool isSimulating = false; 38 | 39 | #if UNITY_WEBGL 40 | #if UNITY_EDITOR 41 | private static void InitializeMonetization(string paymentPointer) 42 | { 43 | } 44 | #else 45 | [DllImport("__Internal")] 46 | private static extern void InitializeMonetization(string paymentPointer); 47 | #endif 48 | #endif 49 | 50 | // Start is called before the first frame update 51 | void Start() 52 | { 53 | #if UNITY_WEBGL 54 | InitializeMonetization(paymentPointer); 55 | #else 56 | Debug.Log("Web Monetization is defined only for WebGL, but you can test in Unity Editor."); 57 | #endif 58 | 59 | if (simulateMonetization) 60 | { 61 | Debug.Log("Simulating Monetization Events! Don't forget to shut this off for release!"); 62 | StartSimulation(); 63 | } 64 | } 65 | 66 | public void monetizationstart(String detailJson) 67 | { 68 | var detail = wm_MiniJSON.Json.Deserialize(detailJson) as Dictionary; 69 | OnMonetizationStart?.Invoke(detail); 70 | 71 | } 72 | 73 | public void monetizationprogress(String detailJson) 74 | { 75 | var detail = wm_MiniJSON.Json.Deserialize(detailJson) as Dictionary; 76 | OnMonetizationProgress?.Invoke(detail); 77 | } 78 | 79 | public void StartSimulation() 80 | { 81 | Debug.Log("Starting Simulation"); 82 | if (!isSimulating) 83 | { 84 | StartCoroutine(SimulateEventsCoroutine()); 85 | isSimulating = true; 86 | } 87 | 88 | } 89 | 90 | IEnumerator SimulateEventsCoroutine() 91 | { 92 | Debug.Log("Simulating Monetization Start"); 93 | monetizationstart(_simulatedStartDetail); 94 | 95 | while (true) 96 | { 97 | Debug.Log("Simulating Monetization Progress"); 98 | monetizationprogress(_simulatedProgressDetail); 99 | yield return new WaitForSeconds(2f); 100 | } 101 | 102 | } 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/WMBroadcaster.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83d20e3777d1a488c98702c0f9d66e87 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/WMReciever.cs: -------------------------------------------------------------------------------- 1 | // Web Monetization for Unity WebGL by SIMMER.io / Rocco Balsamo 2 | // 3 | // Dual licenced. 4 | // 5 | // MIT license If downloaded from Github https://opensource.org/licenses/MIT 6 | // Asset store EULA if downloaded from the Unity Asset Store https://unity3d.com/legal/as_terms 7 | // 8 | // Need help? First read the README.pdf, then reach out to simmer.io/support if you have any questions. 9 | // 10 | // We always appreciate Github stars and Asset Store reviews. It would be great if you could help out while enjoying 11 | // this free asset :-) 12 | 13 | using System.Collections.Generic; 14 | using UnityEngine; 15 | 16 | public class WebMonetizationReciever : MonoBehaviour 17 | { 18 | // register one or both events if you want to use them 19 | void OnEnable() 20 | { 21 | WMBroadcaster.OnMonetizationStart += OnMonetizationStart; 22 | WMBroadcaster.OnMonetizationProgress += OnMonetizationProgress; 23 | } 24 | 25 | // unregister events that you've registered 26 | void OnDisable() 27 | { 28 | WMBroadcaster.OnMonetizationStart -= OnMonetizationStart; 29 | WMBroadcaster.OnMonetizationProgress -= OnMonetizationProgress; 30 | } 31 | 32 | // A monetization start event should occur roughly after a second or two after your game loads as WebGL. 33 | void OnMonetizationStart(Dictionary detail) 34 | { 35 | // these are the parameters that you can read from the detail dictionary. 36 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 37 | // https://coil.com/docs/#browser-start 38 | 39 | // string requestId = detail["requestId"] as string; 40 | // string id = detail["id"] as string; 41 | // string resolvedEndpoint = detail["resolvedEndpoint"] as string; 42 | // string metaContent = detail["metaContent"] as string; 43 | 44 | // Debug.Log("MonetizationStart requestId: " + requestId + ", id: " + id + ", resolvedEndpoint: " + resolvedEndpoint + ", metaContent" + metaContent); 45 | 46 | Debug.Log("MonetizationStart"); 47 | } 48 | 49 | // A monetization progress event should occur roughly every two seconds after the monetization progress occurs 50 | void OnMonetizationProgress(Dictionary detail) 51 | { 52 | // these are the parameters that you can read from the detail dictionary. 53 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 54 | // https://coil.com/docs/#browser-progress 55 | 56 | // string amount = detail["amount"] as string; 57 | // long amountAsLong = Convert.ToInt64(amount); 58 | // string assetCode = detail["assetCode"] as string; 59 | // long scale = (long) detail["assetScale"]; 60 | 61 | // Debug.Log("MonetizationProgress amount " + amountAsLong + ", assetCode: " + assetCode + ", scale: " + scale); 62 | 63 | Debug.Log("MonetizationProgress"); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/WMReciever.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d9d7772e175f4f3eab46ce25f8a2057 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/wm_MiniJSON.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209def0b073f4217a2f32b27f58cf76d 3 | timeCreated: 1568943229 -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/wm_MiniJSON/WebMonetizationMiniJSON.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Calvin Rien 3 | * 4 | * Based on the JSON parser by Patrick van Bergen 5 | * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html 6 | * 7 | * Simplified it so that it doesn't throw exceptions 8 | * and can be used in Unity iPhone with maximum code stripping. 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining 11 | * a copy of this software and associated documentation files (the 12 | * "Software"), to deal in the Software without restriction, including 13 | * without limitation the rights to use, copy, modify, merge, publish, 14 | * distribute, sublicense, and/or sell copies of the Software, and to 15 | * permit persons to whom the Software is furnished to do so, subject to 16 | * the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be 19 | * included in all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | */ 29 | using System; 30 | using System.Collections; 31 | using System.Collections.Generic; 32 | using System.IO; 33 | using System.Text; 34 | 35 | namespace wm_MiniJSON { 36 | // Example usage: 37 | // 38 | // using UnityEngine; 39 | // using System.Collections; 40 | // using System.Collections.Generic; 41 | // using MiniJSON; 42 | // 43 | // public class MiniJSONTest : MonoBehaviour { 44 | // void Start () { 45 | // var jsonString = "{ \"array\": [1.44,2,3], " + 46 | // "\"object\": {\"key1\":\"value1\", \"key2\":256}, " + 47 | // "\"string\": \"The quick brown fox \\\"jumps\\\" over the lazy dog \", " + 48 | // "\"unicode\": \"\\u3041 Men\u00fa sesi\u00f3n\", " + 49 | // "\"int\": 65536, " + 50 | // "\"float\": 3.1415926, " + 51 | // "\"bool\": true, " + 52 | // "\"null\": null }"; 53 | // 54 | // var dict = Json.Deserialize(jsonString) as Dictionary; 55 | // 56 | // Debug.Log("deserialized: " + dict.GetType()); 57 | // Debug.Log("dict['array'][0]: " + ((List) dict["array"])[0]); 58 | // Debug.Log("dict['string']: " + (string) dict["string"]); 59 | // Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles 60 | // Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs 61 | // Debug.Log("dict['unicode']: " + (string) dict["unicode"]); 62 | // 63 | // var str = Json.Serialize(dict); 64 | // 65 | // Debug.Log("serialized: " + str); 66 | // } 67 | // } 68 | 69 | /// 70 | /// This class encodes and decodes JSON strings. 71 | /// Spec. details, see http://www.json.org/ 72 | /// 73 | /// JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. 74 | /// All numbers are parsed to doubles. 75 | /// 76 | public static class Json { 77 | /// 78 | /// Parses the string json into a value 79 | /// 80 | /// A JSON string. 81 | /// An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false 82 | public static object Deserialize(string json) { 83 | // save the string for debug information 84 | if (json == null) { 85 | return null; 86 | } 87 | 88 | return Parser.Parse(json); 89 | } 90 | 91 | sealed class Parser : IDisposable { 92 | const string WORD_BREAK = "{}[],:\""; 93 | 94 | public static bool IsWordBreak(char c) { 95 | return Char.IsWhiteSpace(c) || WORD_BREAK.IndexOf(c) != -1; 96 | } 97 | 98 | enum TOKEN { 99 | NONE, 100 | CURLY_OPEN, 101 | CURLY_CLOSE, 102 | SQUARED_OPEN, 103 | SQUARED_CLOSE, 104 | COLON, 105 | COMMA, 106 | STRING, 107 | NUMBER, 108 | TRUE, 109 | FALSE, 110 | NULL 111 | }; 112 | 113 | StringReader json; 114 | 115 | Parser(string jsonString) { 116 | json = new StringReader(jsonString); 117 | } 118 | 119 | public static object Parse(string jsonString) { 120 | using (var instance = new Parser(jsonString)) { 121 | return instance.ParseValue(); 122 | } 123 | } 124 | 125 | public void Dispose() { 126 | json.Dispose(); 127 | json = null; 128 | } 129 | 130 | Dictionary ParseObject() { 131 | Dictionary table = new Dictionary(); 132 | 133 | // ditch opening brace 134 | json.Read(); 135 | 136 | // { 137 | while (true) { 138 | switch (NextToken) { 139 | case TOKEN.NONE: 140 | return null; 141 | case TOKEN.COMMA: 142 | continue; 143 | case TOKEN.CURLY_CLOSE: 144 | return table; 145 | default: 146 | // name 147 | string name = ParseString(); 148 | if (name == null) { 149 | return null; 150 | } 151 | 152 | // : 153 | if (NextToken != TOKEN.COLON) { 154 | return null; 155 | } 156 | // ditch the colon 157 | json.Read(); 158 | 159 | // value 160 | table[name] = ParseValue(); 161 | break; 162 | } 163 | } 164 | } 165 | 166 | List ParseArray() { 167 | List array = new List(); 168 | 169 | // ditch opening bracket 170 | json.Read(); 171 | 172 | // [ 173 | var parsing = true; 174 | while (parsing) { 175 | TOKEN nextToken = NextToken; 176 | 177 | switch (nextToken) { 178 | case TOKEN.NONE: 179 | return null; 180 | case TOKEN.COMMA: 181 | continue; 182 | case TOKEN.SQUARED_CLOSE: 183 | parsing = false; 184 | break; 185 | default: 186 | object value = ParseByToken(nextToken); 187 | 188 | array.Add(value); 189 | break; 190 | } 191 | } 192 | 193 | return array; 194 | } 195 | 196 | object ParseValue() { 197 | TOKEN nextToken = NextToken; 198 | return ParseByToken(nextToken); 199 | } 200 | 201 | object ParseByToken(TOKEN token) { 202 | switch (token) { 203 | case TOKEN.STRING: 204 | return ParseString(); 205 | case TOKEN.NUMBER: 206 | return ParseNumber(); 207 | case TOKEN.CURLY_OPEN: 208 | return ParseObject(); 209 | case TOKEN.SQUARED_OPEN: 210 | return ParseArray(); 211 | case TOKEN.TRUE: 212 | return true; 213 | case TOKEN.FALSE: 214 | return false; 215 | case TOKEN.NULL: 216 | return null; 217 | default: 218 | return null; 219 | } 220 | } 221 | 222 | string ParseString() { 223 | StringBuilder s = new StringBuilder(); 224 | char c; 225 | 226 | // ditch opening quote 227 | json.Read(); 228 | 229 | bool parsing = true; 230 | while (parsing) { 231 | 232 | if (json.Peek() == -1) { 233 | parsing = false; 234 | break; 235 | } 236 | 237 | c = NextChar; 238 | switch (c) { 239 | case '"': 240 | parsing = false; 241 | break; 242 | case '\\': 243 | if (json.Peek() == -1) { 244 | parsing = false; 245 | break; 246 | } 247 | 248 | c = NextChar; 249 | switch (c) { 250 | case '"': 251 | case '\\': 252 | case '/': 253 | s.Append(c); 254 | break; 255 | case 'b': 256 | s.Append('\b'); 257 | break; 258 | case 'f': 259 | s.Append('\f'); 260 | break; 261 | case 'n': 262 | s.Append('\n'); 263 | break; 264 | case 'r': 265 | s.Append('\r'); 266 | break; 267 | case 't': 268 | s.Append('\t'); 269 | break; 270 | case 'u': 271 | var hex = new char[4]; 272 | 273 | for (int i=0; i< 4; i++) { 274 | hex[i] = NextChar; 275 | } 276 | 277 | s.Append((char) Convert.ToInt32(new string(hex), 16)); 278 | break; 279 | } 280 | break; 281 | default: 282 | s.Append(c); 283 | break; 284 | } 285 | } 286 | 287 | return s.ToString(); 288 | } 289 | 290 | object ParseNumber() { 291 | string number = NextWord; 292 | 293 | if (number.IndexOf('.') == -1) { 294 | long parsedInt; 295 | Int64.TryParse(number, out parsedInt); 296 | return parsedInt; 297 | } 298 | 299 | double parsedDouble; 300 | Double.TryParse(number, out parsedDouble); 301 | return parsedDouble; 302 | } 303 | 304 | void EatWhitespace() { 305 | while (Char.IsWhiteSpace(PeekChar)) { 306 | json.Read(); 307 | 308 | if (json.Peek() == -1) { 309 | break; 310 | } 311 | } 312 | } 313 | 314 | char PeekChar { 315 | get { 316 | return Convert.ToChar(json.Peek()); 317 | } 318 | } 319 | 320 | char NextChar { 321 | get { 322 | return Convert.ToChar(json.Read()); 323 | } 324 | } 325 | 326 | string NextWord { 327 | get { 328 | StringBuilder word = new StringBuilder(); 329 | 330 | while (!IsWordBreak(PeekChar)) { 331 | word.Append(NextChar); 332 | 333 | if (json.Peek() == -1) { 334 | break; 335 | } 336 | } 337 | 338 | return word.ToString(); 339 | } 340 | } 341 | 342 | TOKEN NextToken { 343 | get { 344 | EatWhitespace(); 345 | 346 | if (json.Peek() == -1) { 347 | return TOKEN.NONE; 348 | } 349 | 350 | switch (PeekChar) { 351 | case '{': 352 | return TOKEN.CURLY_OPEN; 353 | case '}': 354 | json.Read(); 355 | return TOKEN.CURLY_CLOSE; 356 | case '[': 357 | return TOKEN.SQUARED_OPEN; 358 | case ']': 359 | json.Read(); 360 | return TOKEN.SQUARED_CLOSE; 361 | case ',': 362 | json.Read(); 363 | return TOKEN.COMMA; 364 | case '"': 365 | return TOKEN.STRING; 366 | case ':': 367 | return TOKEN.COLON; 368 | case '0': 369 | case '1': 370 | case '2': 371 | case '3': 372 | case '4': 373 | case '5': 374 | case '6': 375 | case '7': 376 | case '8': 377 | case '9': 378 | case '-': 379 | return TOKEN.NUMBER; 380 | } 381 | 382 | switch (NextWord) { 383 | case "false": 384 | return TOKEN.FALSE; 385 | case "true": 386 | return TOKEN.TRUE; 387 | case "null": 388 | return TOKEN.NULL; 389 | } 390 | 391 | return TOKEN.NONE; 392 | } 393 | } 394 | } 395 | 396 | /// 397 | /// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string 398 | /// 399 | /// A Dictionary<string, object> / List<object> 400 | /// A JSON encoded string, or null if object 'json' is not serializable 401 | public static string Serialize(object obj) { 402 | return Serializer.Serialize(obj); 403 | } 404 | 405 | sealed class Serializer { 406 | StringBuilder builder; 407 | 408 | Serializer() { 409 | builder = new StringBuilder(); 410 | } 411 | 412 | public static string Serialize(object obj) { 413 | var instance = new Serializer(); 414 | 415 | instance.SerializeValue(obj); 416 | 417 | return instance.builder.ToString(); 418 | } 419 | 420 | void SerializeValue(object value) { 421 | IList asList; 422 | IDictionary asDict; 423 | string asStr; 424 | 425 | if (value == null) { 426 | builder.Append("null"); 427 | } else if ((asStr = value as string) != null) { 428 | SerializeString(asStr); 429 | } else if (value is bool) { 430 | builder.Append((bool) value ? "true" : "false"); 431 | } else if ((asList = value as IList) != null) { 432 | SerializeArray(asList); 433 | } else if ((asDict = value as IDictionary) != null) { 434 | SerializeObject(asDict); 435 | } else if (value is char) { 436 | SerializeString(new string((char) value, 1)); 437 | } else { 438 | SerializeOther(value); 439 | } 440 | } 441 | 442 | void SerializeObject(IDictionary obj) { 443 | bool first = true; 444 | 445 | builder.Append('{'); 446 | 447 | foreach (object e in obj.Keys) { 448 | if (!first) { 449 | builder.Append(','); 450 | } 451 | 452 | SerializeString(e.ToString()); 453 | builder.Append(':'); 454 | 455 | SerializeValue(obj[e]); 456 | 457 | first = false; 458 | } 459 | 460 | builder.Append('}'); 461 | } 462 | 463 | void SerializeArray(IList anArray) { 464 | builder.Append('['); 465 | 466 | bool first = true; 467 | 468 | foreach (object obj in anArray) { 469 | if (!first) { 470 | builder.Append(','); 471 | } 472 | 473 | SerializeValue(obj); 474 | 475 | first = false; 476 | } 477 | 478 | builder.Append(']'); 479 | } 480 | 481 | void SerializeString(string str) { 482 | builder.Append('\"'); 483 | 484 | char[] charArray = str.ToCharArray(); 485 | foreach (var c in charArray) { 486 | switch (c) { 487 | case '"': 488 | builder.Append("\\\""); 489 | break; 490 | case '\\': 491 | builder.Append("\\\\"); 492 | break; 493 | case '\b': 494 | builder.Append("\\b"); 495 | break; 496 | case '\f': 497 | builder.Append("\\f"); 498 | break; 499 | case '\n': 500 | builder.Append("\\n"); 501 | break; 502 | case '\r': 503 | builder.Append("\\r"); 504 | break; 505 | case '\t': 506 | builder.Append("\\t"); 507 | break; 508 | default: 509 | int codepoint = Convert.ToInt32(c); 510 | if ((codepoint >= 32) && (codepoint <= 126)) { 511 | builder.Append(c); 512 | } else { 513 | builder.Append("\\u"); 514 | builder.Append(codepoint.ToString("x4")); 515 | } 516 | break; 517 | } 518 | } 519 | 520 | builder.Append('\"'); 521 | } 522 | 523 | void SerializeOther(object value) { 524 | // NOTE: decimals lose precision during serialization. 525 | // They always have, I'm just letting you know. 526 | // Previously floats and doubles lost precision too. 527 | if (value is float) { 528 | builder.Append(((float) value).ToString("R")); 529 | } else if (value is int 530 | || value is uint 531 | || value is long 532 | || value is sbyte 533 | || value is byte 534 | || value is short 535 | || value is ushort 536 | || value is ulong) { 537 | builder.Append(value); 538 | } else if (value is double 539 | || value is decimal) { 540 | builder.Append(Convert.ToDouble(value).ToString("R")); 541 | } else { 542 | SerializeString(value.ToString()); 543 | } 544 | } 545 | } 546 | } 547 | } -------------------------------------------------------------------------------- /Assets/WebMonetization/Scripts/wm_MiniJSON/WebMonetizationMiniJSON.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b9ebf7d85a974131b92dc436699b6d5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Internal development 2 | 3 | You can use `Plugins/testharness.html` to test out the `WebMonetization.jslib` [https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html](https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html). Look at the javascript console for details. 4 | 5 | ## Building the README.pdf from README.md 6 | 7 | Download node.js 8 | ``` 9 | npm i -g md-to-pdf 10 | md-to-pdf README.md 11 | md-to-pdf README.md Assets/WebMonetization/README.pdf 12 | ``` 13 | 14 | ## Making a release 15 | 16 | Try to use oldest version of Unity available (currently 2017.1) that makes it compatible w/ more installs. 17 | 18 | In Unity, Assets => Export Package => (add the web monetization folder). Save to `/Releases` with a new version number. 19 | 20 | Use AssetStoreTools to actually release to the Unity asset store. Contact support (https://simmer.io/support) if you want to have me do this. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Rocco Balsamo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Logs/Packages-Update.log: -------------------------------------------------------------------------------- 1 | 2 | === Sun Aug 25 15:09:35 2019 3 | 4 | Packages were changed. 5 | Update Mode: mergeDefaultDependencies 6 | 7 | The following packages were added: 8 | com.unity.package-manager-ui@2.2.0 9 | com.unity.ext.nunit@1.0.0 10 | com.unity.test-framework@1.0.13 11 | com.unity.ide.vscode@1.0.7 12 | com.unity.ide.rider@1.0.8 13 | com.unity.ugui@1.0.0 14 | com.unity.modules.androidjni@1.0.0 15 | The following packages were updated: 16 | com.unity.collab-proxy from version 1.2.9 to 1.2.16 17 | com.unity.textmeshpro from version 2.0.0 to 2.0.1 18 | com.unity.timeline from version 0.0.0-builtin to 1.1.0 19 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.collab-proxy": "1.2.16", 6 | "com.unity.ext.nunit": "1.0.0", 7 | "com.unity.ide.rider": "1.0.8", 8 | "com.unity.ide.vscode": "1.0.7", 9 | "com.unity.package-manager-ui": "2.2.0", 10 | "com.unity.test-framework": "1.0.13", 11 | "com.unity.textmeshpro": "2.0.1", 12 | "com.unity.timeline": "1.1.0", 13 | "com.unity.ugui": "1.0.0", 14 | "com.unity.modules.ai": "1.0.0", 15 | "com.unity.modules.androidjni": "1.0.0", 16 | "com.unity.modules.animation": "1.0.0", 17 | "com.unity.modules.assetbundle": "1.0.0", 18 | "com.unity.modules.audio": "1.0.0", 19 | "com.unity.modules.cloth": "1.0.0", 20 | "com.unity.modules.director": "1.0.0", 21 | "com.unity.modules.imageconversion": "1.0.0", 22 | "com.unity.modules.imgui": "1.0.0", 23 | "com.unity.modules.jsonserialize": "1.0.0", 24 | "com.unity.modules.particlesystem": "1.0.0", 25 | "com.unity.modules.physics": "1.0.0", 26 | "com.unity.modules.physics2d": "1.0.0", 27 | "com.unity.modules.screencapture": "1.0.0", 28 | "com.unity.modules.terrain": "1.0.0", 29 | "com.unity.modules.terrainphysics": "1.0.0", 30 | "com.unity.modules.tilemap": "1.0.0", 31 | "com.unity.modules.ui": "1.0.0", 32 | "com.unity.modules.uielements": "1.0.0", 33 | "com.unity.modules.umbra": "1.0.0", 34 | "com.unity.modules.unityanalytics": "1.0.0", 35 | "com.unity.modules.unitywebrequest": "1.0.0", 36 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 37 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 38 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 39 | "com.unity.modules.unitywebrequestwww": "1.0.0", 40 | "com.unity.modules.vehicles": "1.0.0", 41 | "com.unity.modules.video": "1.0.0", 42 | "com.unity.modules.vr": "1.0.0", 43 | "com.unity.modules.wind": "1.0.0", 44 | "com.unity.modules.xr": "1.0.0" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/WebMonetization/SampleScene/WebMonetizationSampleScene.unity 10 | guid: 2cda990e2423bbf4892e6590ba056729 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 1 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref;asmdef 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_ShowLightmapResolutionOverlay: 1 27 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 37 | m_PreloadedShaders: [] 38 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 39 | type: 0} 40 | m_CustomRenderPipeline: {fileID: 0} 41 | m_TransparencySortMode: 0 42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 43 | m_DefaultRenderingPath: 1 44 | m_DefaultMobileRenderingPath: 1 45 | m_TierSettings: [] 46 | m_LightmapStripping: 0 47 | m_FogStripping: 0 48 | m_InstancingStripping: 0 49 | m_LightmapKeepPlain: 1 50 | m_LightmapKeepDirCombined: 1 51 | m_LightmapKeepDynamicPlain: 1 52 | m_LightmapKeepDynamicDirCombined: 1 53 | m_LightmapKeepShadowMask: 1 54 | m_LightmapKeepSubtractive: 1 55 | m_FogKeepLinear: 1 56 | m_FogKeepExp: 1 57 | m_FogKeepExp2: 1 58 | m_AlbedoSwatchInfos: [] 59 | m_LightsUseLinearIntensity: 0 60 | m_LightsUseColorTemperature: 0 61 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 18 7 | productGUID: 8a7fac88322d94c9e902cf2eca6d9ca2 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: micropayment 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | displayResolutionDialog: 0 56 | iosUseCustomAppBackgroundBehavior: 0 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 1 68 | androidUseSwappy: 0 69 | androidBlitType: 0 70 | defaultIsNativeResolution: 1 71 | macRetinaSupport: 1 72 | runInBackground: 1 73 | captureSingleScreen: 0 74 | muteOtherAudioSources: 0 75 | Prepare IOS For Recording: 0 76 | Force IOS Speakers When Recording: 0 77 | deferSystemGesturesMode: 0 78 | hideHomeButton: 0 79 | submitAnalytics: 1 80 | usePlayerLog: 1 81 | bakeCollisionMeshes: 0 82 | forceSingleInstance: 0 83 | useFlipModelSwapchain: 1 84 | resizableWindow: 0 85 | useMacAppStoreValidation: 0 86 | macAppStoreCategory: public.app-category.games 87 | gpuSkinning: 0 88 | graphicsJobs: 0 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | graphicsJobMode: 0 97 | fullscreenMode: 1 98 | xboxSpeechDB: 0 99 | xboxEnableHeadOrientation: 0 100 | xboxEnableGuest: 0 101 | xboxEnablePIXSampling: 0 102 | metalFramebufferOnly: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | vulkanEnableSetSRGBWrite: 0 117 | m_SupportedAspectRatios: 118 | 4:3: 1 119 | 5:4: 1 120 | 16:10: 1 121 | 16:9: 1 122 | Others: 1 123 | bundleVersion: 0.1 124 | preloadedAssets: [] 125 | metroInputSource: 0 126 | wsaTransparentSwapchain: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 1 129 | xboxOneEnable7thCore: 1 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | enableVideoLayer: 0 138 | useProtectedVideoMemory: 0 139 | minimumSupportedHeadTracking: 0 140 | maximumSupportedHeadTracking: 1 141 | hololens: 142 | depthFormat: 1 143 | depthBufferSharingEnabled: 1 144 | lumin: 145 | depthFormat: 0 146 | frameTiming: 2 147 | enableGLCache: 0 148 | glCacheMaxBlobSize: 524288 149 | glCacheMaxFileSize: 8388608 150 | oculus: 151 | sharedDepthBuffer: 1 152 | dashSupport: 1 153 | lowOverheadMode: 0 154 | enable360StereoCapture: 0 155 | isWsaHolographicRemotingEnabled: 0 156 | protectGraphicsMemory: 0 157 | enableFrameTimingStats: 0 158 | useHDRDisplay: 0 159 | m_ColorGamuts: 00000000 160 | targetPixelDensity: 30 161 | resolutionScalingMode: 0 162 | androidSupportedAspectRatio: 1 163 | androidMaxAspectRatio: 2.1 164 | applicationIdentifier: 165 | Standalone: com.Company.ProductName 166 | buildNumber: {} 167 | AndroidBundleVersionCode: 1 168 | AndroidMinSdkVersion: 16 169 | AndroidTargetSdkVersion: 0 170 | AndroidPreferredInstallLocation: 1 171 | aotOptions: 172 | stripEngineCode: 1 173 | iPhoneStrippingLevel: 0 174 | iPhoneScriptCallOptimization: 0 175 | ForceInternetPermission: 0 176 | ForceSDCardPermission: 0 177 | CreateWallpaper: 0 178 | APKExpansionFiles: 0 179 | keepLoadedShadersAlive: 0 180 | StripUnusedMeshComponents: 1 181 | VertexChannelCompressionMask: 4054 182 | iPhoneSdkVersion: 988 183 | iOSTargetOSVersionString: 9.0 184 | tvOSSdkVersion: 0 185 | tvOSRequireExtendedGameController: 0 186 | tvOSTargetOSVersionString: 9.0 187 | uIPrerenderedIcon: 0 188 | uIRequiresPersistentWiFi: 0 189 | uIRequiresFullScreen: 1 190 | uIStatusBarHidden: 1 191 | uIExitOnSuspend: 0 192 | uIStatusBarStyle: 0 193 | iPhoneSplashScreen: {fileID: 0} 194 | iPhoneHighResSplashScreen: {fileID: 0} 195 | iPhoneTallHighResSplashScreen: {fileID: 0} 196 | iPhone47inSplashScreen: {fileID: 0} 197 | iPhone55inPortraitSplashScreen: {fileID: 0} 198 | iPhone55inLandscapeSplashScreen: {fileID: 0} 199 | iPhone58inPortraitSplashScreen: {fileID: 0} 200 | iPhone58inLandscapeSplashScreen: {fileID: 0} 201 | iPadPortraitSplashScreen: {fileID: 0} 202 | iPadHighResPortraitSplashScreen: {fileID: 0} 203 | iPadLandscapeSplashScreen: {fileID: 0} 204 | iPadHighResLandscapeSplashScreen: {fileID: 0} 205 | iPhone65inPortraitSplashScreen: {fileID: 0} 206 | iPhone65inLandscapeSplashScreen: {fileID: 0} 207 | iPhone61inPortraitSplashScreen: {fileID: 0} 208 | iPhone61inLandscapeSplashScreen: {fileID: 0} 209 | appleTVSplashScreen: {fileID: 0} 210 | appleTVSplashScreen2x: {fileID: 0} 211 | tvOSSmallIconLayers: [] 212 | tvOSSmallIconLayers2x: [] 213 | tvOSLargeIconLayers: [] 214 | tvOSLargeIconLayers2x: [] 215 | tvOSTopShelfImageLayers: [] 216 | tvOSTopShelfImageLayers2x: [] 217 | tvOSTopShelfImageWideLayers: [] 218 | tvOSTopShelfImageWideLayers2x: [] 219 | iOSLaunchScreenType: 0 220 | iOSLaunchScreenPortrait: {fileID: 0} 221 | iOSLaunchScreenLandscape: {fileID: 0} 222 | iOSLaunchScreenBackgroundColor: 223 | serializedVersion: 2 224 | rgba: 0 225 | iOSLaunchScreenFillPct: 100 226 | iOSLaunchScreenSize: 100 227 | iOSLaunchScreenCustomXibPath: 228 | iOSLaunchScreeniPadType: 0 229 | iOSLaunchScreeniPadImage: {fileID: 0} 230 | iOSLaunchScreeniPadBackgroundColor: 231 | serializedVersion: 2 232 | rgba: 0 233 | iOSLaunchScreeniPadFillPct: 100 234 | iOSLaunchScreeniPadSize: 100 235 | iOSLaunchScreeniPadCustomXibPath: 236 | iOSUseLaunchScreenStoryboard: 0 237 | iOSLaunchScreenCustomStoryboardPath: 238 | iOSDeviceRequirements: [] 239 | iOSURLSchemes: [] 240 | iOSBackgroundModes: 0 241 | iOSMetalForceHardShadows: 0 242 | metalEditorSupport: 1 243 | metalAPIValidation: 1 244 | iOSRenderExtraFrameOnPause: 0 245 | appleDeveloperTeamID: 246 | iOSManualSigningProvisioningProfileID: 247 | tvOSManualSigningProvisioningProfileID: 248 | iOSManualSigningProvisioningProfileType: 0 249 | tvOSManualSigningProvisioningProfileType: 0 250 | appleEnableAutomaticSigning: 0 251 | iOSRequireARKit: 0 252 | iOSAutomaticallyDetectAndAddCapabilities: 1 253 | appleEnableProMotion: 0 254 | clonedFromGUID: 5f34be1353de5cf4398729fda238591b 255 | templatePackageId: com.unity.template.2d@3.2.0 256 | templateDefaultScene: Assets/Scenes/SampleScene.unity 257 | AndroidTargetArchitectures: 1 258 | AndroidSplashScreenScale: 0 259 | androidSplashScreen: {fileID: 0} 260 | AndroidKeystoreName: '{inproject}: ' 261 | AndroidKeyaliasName: 262 | AndroidBuildApkPerCpuArchitecture: 0 263 | AndroidTVCompatibility: 0 264 | AndroidIsGame: 1 265 | AndroidEnableTango: 0 266 | androidEnableBanner: 1 267 | androidUseLowAccuracyLocation: 0 268 | androidUseCustomKeystore: 0 269 | m_AndroidBanners: 270 | - width: 320 271 | height: 180 272 | banner: {fileID: 0} 273 | androidGamepadSupportLevel: 0 274 | AndroidValidateAppBundleSize: 1 275 | AndroidAppBundleSizeToValidate: 150 276 | resolutionDialogBanner: {fileID: 0} 277 | m_BuildTargetIcons: [] 278 | m_BuildTargetPlatformIcons: [] 279 | m_BuildTargetBatching: [] 280 | m_BuildTargetGraphicsAPIs: 281 | - m_BuildTarget: AndroidPlayer 282 | m_APIs: 150000000b000000 283 | m_Automatic: 0 284 | m_BuildTargetVRSettings: [] 285 | openGLRequireES31: 0 286 | openGLRequireES31AEP: 0 287 | openGLRequireES32: 0 288 | vuforiaEnabled: 0 289 | m_TemplateCustomTags: {} 290 | mobileMTRendering: 291 | Android: 1 292 | iPhone: 1 293 | tvOS: 1 294 | m_BuildTargetGroupLightmapEncodingQuality: [] 295 | m_BuildTargetGroupLightmapSettings: [] 296 | playModeTestRunnerEnabled: 0 297 | runPlayModeTestAsEditModeTest: 0 298 | actionOnDotNetUnhandledException: 1 299 | enableInternalProfiler: 0 300 | logObjCUncaughtExceptions: 1 301 | enableCrashReportAPI: 0 302 | cameraUsageDescription: 303 | locationUsageDescription: 304 | microphoneUsageDescription: 305 | switchNetLibKey: 306 | switchSocketMemoryPoolSize: 6144 307 | switchSocketAllocatorPoolSize: 128 308 | switchSocketConcurrencyLimit: 14 309 | switchScreenResolutionBehavior: 2 310 | switchUseCPUProfiler: 0 311 | switchApplicationID: 0x01004b9000490000 312 | switchNSODependencies: 313 | switchTitleNames_0: 314 | switchTitleNames_1: 315 | switchTitleNames_2: 316 | switchTitleNames_3: 317 | switchTitleNames_4: 318 | switchTitleNames_5: 319 | switchTitleNames_6: 320 | switchTitleNames_7: 321 | switchTitleNames_8: 322 | switchTitleNames_9: 323 | switchTitleNames_10: 324 | switchTitleNames_11: 325 | switchTitleNames_12: 326 | switchTitleNames_13: 327 | switchTitleNames_14: 328 | switchPublisherNames_0: 329 | switchPublisherNames_1: 330 | switchPublisherNames_2: 331 | switchPublisherNames_3: 332 | switchPublisherNames_4: 333 | switchPublisherNames_5: 334 | switchPublisherNames_6: 335 | switchPublisherNames_7: 336 | switchPublisherNames_8: 337 | switchPublisherNames_9: 338 | switchPublisherNames_10: 339 | switchPublisherNames_11: 340 | switchPublisherNames_12: 341 | switchPublisherNames_13: 342 | switchPublisherNames_14: 343 | switchIcons_0: {fileID: 0} 344 | switchIcons_1: {fileID: 0} 345 | switchIcons_2: {fileID: 0} 346 | switchIcons_3: {fileID: 0} 347 | switchIcons_4: {fileID: 0} 348 | switchIcons_5: {fileID: 0} 349 | switchIcons_6: {fileID: 0} 350 | switchIcons_7: {fileID: 0} 351 | switchIcons_8: {fileID: 0} 352 | switchIcons_9: {fileID: 0} 353 | switchIcons_10: {fileID: 0} 354 | switchIcons_11: {fileID: 0} 355 | switchIcons_12: {fileID: 0} 356 | switchIcons_13: {fileID: 0} 357 | switchIcons_14: {fileID: 0} 358 | switchSmallIcons_0: {fileID: 0} 359 | switchSmallIcons_1: {fileID: 0} 360 | switchSmallIcons_2: {fileID: 0} 361 | switchSmallIcons_3: {fileID: 0} 362 | switchSmallIcons_4: {fileID: 0} 363 | switchSmallIcons_5: {fileID: 0} 364 | switchSmallIcons_6: {fileID: 0} 365 | switchSmallIcons_7: {fileID: 0} 366 | switchSmallIcons_8: {fileID: 0} 367 | switchSmallIcons_9: {fileID: 0} 368 | switchSmallIcons_10: {fileID: 0} 369 | switchSmallIcons_11: {fileID: 0} 370 | switchSmallIcons_12: {fileID: 0} 371 | switchSmallIcons_13: {fileID: 0} 372 | switchSmallIcons_14: {fileID: 0} 373 | switchManualHTML: 374 | switchAccessibleURLs: 375 | switchLegalInformation: 376 | switchMainThreadStackSize: 1048576 377 | switchPresenceGroupId: 378 | switchLogoHandling: 0 379 | switchReleaseVersion: 0 380 | switchDisplayVersion: 1.0.0 381 | switchStartupUserAccount: 0 382 | switchTouchScreenUsage: 0 383 | switchSupportedLanguagesMask: 0 384 | switchLogoType: 0 385 | switchApplicationErrorCodeCategory: 386 | switchUserAccountSaveDataSize: 0 387 | switchUserAccountSaveDataJournalSize: 0 388 | switchApplicationAttribute: 0 389 | switchCardSpecSize: -1 390 | switchCardSpecClock: -1 391 | switchRatingsMask: 0 392 | switchRatingsInt_0: 0 393 | switchRatingsInt_1: 0 394 | switchRatingsInt_2: 0 395 | switchRatingsInt_3: 0 396 | switchRatingsInt_4: 0 397 | switchRatingsInt_5: 0 398 | switchRatingsInt_6: 0 399 | switchRatingsInt_7: 0 400 | switchRatingsInt_8: 0 401 | switchRatingsInt_9: 0 402 | switchRatingsInt_10: 0 403 | switchRatingsInt_11: 0 404 | switchLocalCommunicationIds_0: 405 | switchLocalCommunicationIds_1: 406 | switchLocalCommunicationIds_2: 407 | switchLocalCommunicationIds_3: 408 | switchLocalCommunicationIds_4: 409 | switchLocalCommunicationIds_5: 410 | switchLocalCommunicationIds_6: 411 | switchLocalCommunicationIds_7: 412 | switchParentalControl: 0 413 | switchAllowsScreenshot: 1 414 | switchAllowsVideoCapturing: 1 415 | switchAllowsRuntimeAddOnContentInstall: 0 416 | switchDataLossConfirmation: 0 417 | switchUserAccountLockEnabled: 0 418 | switchSystemResourceMemory: 16777216 419 | switchSupportedNpadStyles: 3 420 | switchNativeFsCacheSize: 32 421 | switchIsHoldTypeHorizontal: 0 422 | switchSupportedNpadCount: 8 423 | switchSocketConfigEnabled: 0 424 | switchTcpInitialSendBufferSize: 32 425 | switchTcpInitialReceiveBufferSize: 64 426 | switchTcpAutoSendBufferSizeMax: 256 427 | switchTcpAutoReceiveBufferSizeMax: 256 428 | switchUdpSendBufferSize: 9 429 | switchUdpReceiveBufferSize: 42 430 | switchSocketBufferEfficiency: 4 431 | switchSocketInitializeEnabled: 1 432 | switchNetworkInterfaceManagerInitializeEnabled: 1 433 | switchPlayerConnectionEnabled: 1 434 | ps4NPAgeRating: 12 435 | ps4NPTitleSecret: 436 | ps4NPTrophyPackPath: 437 | ps4ParentalLevel: 11 438 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 439 | ps4Category: 0 440 | ps4MasterVersion: 01.00 441 | ps4AppVersion: 01.00 442 | ps4AppType: 0 443 | ps4ParamSfxPath: 444 | ps4VideoOutPixelFormat: 0 445 | ps4VideoOutInitialWidth: 1920 446 | ps4VideoOutBaseModeInitialWidth: 1920 447 | ps4VideoOutReprojectionRate: 60 448 | ps4PronunciationXMLPath: 449 | ps4PronunciationSIGPath: 450 | ps4BackgroundImagePath: 451 | ps4StartupImagePath: 452 | ps4StartupImagesFolder: 453 | ps4IconImagesFolder: 454 | ps4SaveDataImagePath: 455 | ps4SdkOverride: 456 | ps4BGMPath: 457 | ps4ShareFilePath: 458 | ps4ShareOverlayImagePath: 459 | ps4PrivacyGuardImagePath: 460 | ps4NPtitleDatPath: 461 | ps4RemotePlayKeyAssignment: -1 462 | ps4RemotePlayKeyMappingDir: 463 | ps4PlayTogetherPlayerCount: 0 464 | ps4EnterButtonAssignment: 1 465 | ps4ApplicationParam1: 0 466 | ps4ApplicationParam2: 0 467 | ps4ApplicationParam3: 0 468 | ps4ApplicationParam4: 0 469 | ps4DownloadDataSize: 0 470 | ps4GarlicHeapSize: 2048 471 | ps4ProGarlicHeapSize: 2560 472 | playerPrefsMaxSize: 32768 473 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 474 | ps4pnSessions: 1 475 | ps4pnPresence: 1 476 | ps4pnFriends: 1 477 | ps4pnGameCustomData: 1 478 | playerPrefsSupport: 0 479 | enableApplicationExit: 0 480 | resetTempFolder: 1 481 | restrictedAudioUsageRights: 0 482 | ps4UseResolutionFallback: 0 483 | ps4ReprojectionSupport: 0 484 | ps4UseAudio3dBackend: 0 485 | ps4SocialScreenEnabled: 0 486 | ps4ScriptOptimizationLevel: 0 487 | ps4Audio3dVirtualSpeakerCount: 14 488 | ps4attribCpuUsage: 0 489 | ps4PatchPkgPath: 490 | ps4PatchLatestPkgPath: 491 | ps4PatchChangeinfoPath: 492 | ps4PatchDayOne: 0 493 | ps4attribUserManagement: 0 494 | ps4attribMoveSupport: 0 495 | ps4attrib3DSupport: 0 496 | ps4attribShareSupport: 0 497 | ps4attribExclusiveVR: 0 498 | ps4disableAutoHideSplash: 0 499 | ps4videoRecordingFeaturesUsed: 0 500 | ps4contentSearchFeaturesUsed: 0 501 | ps4attribEyeToEyeDistanceSettingVR: 0 502 | ps4IncludedModules: [] 503 | monoEnv: 504 | splashScreenBackgroundSourceLandscape: {fileID: 0} 505 | splashScreenBackgroundSourcePortrait: {fileID: 0} 506 | blurSplashScreenBackground: 1 507 | spritePackerPolicy: 508 | webGLMemorySize: 16 509 | webGLExceptionSupport: 1 510 | webGLNameFilesAsHashes: 0 511 | webGLDataCaching: 1 512 | webGLDebugSymbols: 0 513 | webGLEmscriptenArgs: 514 | webGLModulesDirectory: 515 | webGLTemplate: APPLICATION:Default 516 | webGLAnalyzeBuildSize: 0 517 | webGLUseEmbeddedResources: 0 518 | webGLCompressionFormat: 1 519 | webGLLinkerTarget: 1 520 | webGLThreadsSupport: 0 521 | webGLWasmStreaming: 0 522 | scriptingDefineSymbols: {} 523 | platformArchitecture: {} 524 | scriptingBackend: {} 525 | il2cppCompilerConfiguration: {} 526 | managedStrippingLevel: {} 527 | incrementalIl2cppBuild: {} 528 | allowUnsafeCode: 0 529 | additionalIl2CppArgs: 530 | scriptingRuntimeVersion: 1 531 | gcIncremental: 0 532 | gcWBarrierValidation: 0 533 | apiCompatibilityLevelPerPlatform: {} 534 | m_RenderingPath: 1 535 | m_MobileRenderingPath: 1 536 | metroPackageName: Template_2D 537 | metroPackageVersion: 538 | metroCertificatePath: 539 | metroCertificatePassword: 540 | metroCertificateSubject: 541 | metroCertificateIssuer: 542 | metroCertificateNotAfter: 0000000000000000 543 | metroApplicationDescription: Template_2D 544 | wsaImages: {} 545 | metroTileShortName: 546 | metroTileShowName: 0 547 | metroMediumTileShowName: 0 548 | metroLargeTileShowName: 0 549 | metroWideTileShowName: 0 550 | metroSupportStreamingInstall: 0 551 | metroLastRequiredScene: 0 552 | metroDefaultTileSize: 1 553 | metroTileForegroundText: 2 554 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 555 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 556 | a: 1} 557 | metroSplashScreenUseBackgroundColor: 0 558 | platformCapabilities: {} 559 | metroTargetDeviceFamilies: {} 560 | metroFTAName: 561 | metroFTAFileTypes: [] 562 | metroProtocolName: 563 | XboxOneProductId: 564 | XboxOneUpdateKey: 565 | XboxOneSandboxId: 566 | XboxOneContentId: 567 | XboxOneTitleId: 568 | XboxOneSCId: 569 | XboxOneGameOsOverridePath: 570 | XboxOnePackagingOverridePath: 571 | XboxOneAppManifestOverridePath: 572 | XboxOneVersion: 1.0.0.0 573 | XboxOnePackageEncryption: 0 574 | XboxOnePackageUpdateGranularity: 2 575 | XboxOneDescription: 576 | XboxOneLanguage: 577 | - enus 578 | XboxOneCapability: [] 579 | XboxOneGameRating: {} 580 | XboxOneIsContentPackage: 0 581 | XboxOneEnableGPUVariability: 1 582 | XboxOneSockets: {} 583 | XboxOneSplashScreen: {fileID: 0} 584 | XboxOneAllowedProductIds: [] 585 | XboxOnePersistentLocalStorageSize: 0 586 | XboxOneXTitleMemory: 8 587 | xboxOneScriptCompiler: 1 588 | XboxOneOverrideIdentityName: 589 | vrEditorSettings: 590 | daydream: 591 | daydreamIconForeground: {fileID: 0} 592 | daydreamIconBackground: {fileID: 0} 593 | cloudServicesEnabled: 594 | UNet: 1 595 | luminIcon: 596 | m_Name: 597 | m_ModelFolderPath: 598 | m_PortalFolderPath: 599 | luminCert: 600 | m_CertPath: 601 | m_SignPackage: 1 602 | luminIsChannelApp: 0 603 | luminVersion: 604 | m_VersionCode: 1 605 | m_VersionName: 606 | facebookSdkVersion: 7.9.4 607 | facebookAppId: 608 | facebookCookies: 1 609 | facebookLogging: 1 610 | facebookStatus: 1 611 | facebookXfbml: 0 612 | facebookFrictionlessRequests: 1 613 | apiCompatibilityLevel: 6 614 | cloudProjectId: 615 | framebufferDepthMemorylessMode: 0 616 | projectName: 617 | organizationId: 618 | cloudEnabled: 0 619 | enableNativePlatformBackendsForNewInputSystem: 0 620 | disableOldInputManagerSupport: 0 621 | legacyClampBlendShapeWeights: 1 622 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.5f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 16 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 16 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 0 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 0 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 16 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 0 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 0 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 0 112 | billboardsFaceCameraPosition: 0 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 16 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 0 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 0 136 | antiAliasing: 0 137 | softParticles: 0 138 | softVegetation: 1 139 | realtimeReflectionProbes: 0 140 | billboardsFaceCameraPosition: 0 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 16 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 0 153 | shadowResolution: 0 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 16 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 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 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_RenderPipeSettingsPath: 8 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Web Monetization API for Unity WebGL 2 | 3 | This project allows you to register a web monetization `meta` tag to your Unity WebGL game so that you can make money with your game on the web. It also allows you to create an in-game benefit to players who are monetizing your game. 4 | 5 | The [Web Monetization API](https://webmonetization.org) is a proposed [W3C standard](https://adrianhopebailie.github.io/web-monetization/). There is currently just one Web Monetization provider, [coil.com](https://coil.com). 6 | 7 | This project is provided for free by [SIMMER.io](https://simmer.io), because we want you to be able to make money with your web games whether or not you use our platform. If you have a cool game to share, consider [uploading it](https://simmer.io) to our site! 8 | 9 | Requires Unity 2017.1 or later 10 | 11 | # Video Tutorial 12 | 13 | Watch [our tutorial](https://youtu.be/ySjl7HlW7EA) on Youtube. 14 | 15 | # Download 16 | 17 | [Download 1.0](https://github.com/TheRoccoB/web-monetization-unity-webgl/blob/master/Releases/webmon1.0.0.unitypackage?raw=true) 18 | 19 | [All Releases](https://github.com/TheRoccoB/web-monetization-unity-webgl/tree/master/Releases). 20 | 21 | # Quickstart 22 | 23 | You might want to first read [Writing a Web Monetized Game](https://coil.com/p/sharafian/Writing-a-Web-Monetized-Game/1i3t_1Frk) for an overview of a simple explanation of monetizing a game (non unity specific). 24 | 25 | First import the .unitypackage file into Unity 2017.1+. (Assets => Import Package => Custom Package...) 26 | 27 | Once loaded, you can also export `SampleScene/WebMonetizationSampleScene` to WebGL. If you have a Web Monetization browser plugin (Coil - [Chrome](https://chrome.google.com/webstore/detail/coil/locbifcbeldmnphbgkdigjmkbfkhbnca) | [Firefox](https://addons.mozilla.org/en-US/firefox/addon/coil/)) and a paid account, you'll see a coin jar filling up with coins. If you don't have the extension or a paid account, you can click the "Simulate Monetization" button in the game to see what it's supposed to look like. 28 | 29 | Add monetization to your game: 30 | 31 | 1. Add `Prefabs/WebMonetizationBroadcaster` to your scene 32 | 1. Get a creator account at [coil.com](https://coil.com) and set the `Payment Pointer` in the `WebMonetizationBroadcaster` properties window. (I found that it was easiest to setup an XRP wallet vs a Stronghold bank account). 33 | 34 | Recommended: Add player benefits when monetization events occur: 35 | 36 | 1. Add the sample code from `Scripts/WMReciever.cs` to a `GameObject` monobehavior script. (copy/paste `OnEnable`, `OnDisable`, `OnMonetizationStart` and `OnMonetizationProgress` to your `GameObject` that will do something special when monetization events occur). 37 | 1. Add your player benefits in `OnMonetizationProgress` or `OnMonetizationStart`. 38 | 1. [Export to WebGL](https://www.youtube.com/watch?v=JZqTHjjtQHM), and test. 39 | 40 | Simulate from Unity: 41 | 42 | 1. You can turn on `Simulate Monetization` in the `WebMonetizationBroadcaster` properties window (Don't forget to turn it off when you deploy your game to the web). 43 | 1. You can also call `WebMonetizationBroadcaster` `StartSimulation()` from a UI click handler (button). 44 | 45 | Simulate from Browser: 46 | 47 | 1. I recommend getting a paid coil ($5/mo) account for testing (so that you can support other creators). If that's not an option, I've also put up a tool for simulating monetization events from the browser. Available at [testwebmonetization.com](https://testwebmonetization.com). Search for "bookmarklet". 48 | 49 | 50 | # Details 51 | 52 | Here are details of the events that you can recieve from the `WebMonetizationBroadcaster`: 53 | 54 | ### Register and Unregister Events 55 | ``` 56 | // register one or both events if you want to use them 57 | void OnEnable() 58 | { 59 | WebMonetization.OnMonetizationStart += OnMonetizationStart; 60 | WebMonetization.OnMonetizationProgress += OnMonetizationProgress; 61 | } 62 | 63 | // unregister events that you've registered 64 | void OnDisable() 65 | { 66 | WebMonetization.OnMonetizationStart -= OnMonetizationStart; 67 | WebMonetization.OnMonetizationProgress -= OnMonetizationProgress; 68 | } 69 | ``` 70 | 71 | ### Act upon those events 72 | 73 | You might just want to provide a general benefit to the player when you know they're monetizing. In that case you could just set a boolean to true in the first time `onMonetizationProgress` is called. I would discourage use of `onMonetizationStart` because it won't be called if you load another scene. So my recommendation is to always use `onMonetizationProgress`. 74 | 75 | Here is the code you'd add to your `GameObject` script for each of these handlers: 76 | 77 | #### OnMonetizationStart 78 | ``` 79 | void OnMonetizationStart(Dictionary detail) 80 | { 81 | // these are the parameters that you can read from the detail dictionary. 82 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 83 | // https://coil.com/docs/#browser-start 84 | 85 | // string requestId = detail["requestId"] as string; 86 | // string id = detail["id"] as string; 87 | // string resolvedEndpoint = detail["resolvedEndpoint"] as string; 88 | // string metaContent = detail["metaContent"] as string; 89 | 90 | // Debug.Log("MonetizationStart requestId: " + requestId + ", id: " + id + ", resolvedEndpoint: " + resolvedEndpoint + ", metaContent" + metaContent); 91 | 92 | Debug.Log("MonetizationStart"); 93 | } 94 | ``` 95 | 96 | 97 | #### OnMonetizationProgress 98 | 99 | The `detail` object here provides additional data, such as `amount`, `assetCode` (USD, XRP, etc), and `assetScale`. You could provide a certain amount of in-game currency as payments trickle in using these parameters. See [Coil Developer Docs](https://coil.com/docs/#browser-progress) for details. 100 | ``` 101 | // A monetization progress event should occur roughly every two seconds after the monetization progress occurs 102 | void OnMonetizationProgress(Dictionary detail) 103 | { 104 | // these are the parameters that you can read from the detail dictionary. 105 | // recommended: wrap parsing of each of these values in a try/catch in case the spec changes. 106 | // https://coil.com/docs/#browser-progress 107 | 108 | // string amount = detail["amount"] as string; 109 | // long amountAsLong = Convert.ToInt64(amount); 110 | // string assetCode = detail["assetCode"] as string; 111 | // long scale = (long) detail["assetScale"]; 112 | 113 | // Debug.Log("MonetizationProgress amount " + amountAsLong + ", assetCode: " + assetCode + ", scale: " + scale); 114 | 115 | Debug.Log("MonetizationProgress"); 116 | } 117 | ``` 118 | 119 | The `detail` dictionary is built with [MiniJSON](https://gist.github.com/darktable/1411710). Read the comments on top of that file for more details on parsing the dictionary. 120 | 121 | 122 | # A note about deployment 123 | Many game portals (itch.io, kongregate, etc) run your game in an `iframe`. Web monetization does not automatically work in `iframe`'s. On [SIMMER.io](https://simmer.io), we bubble up the web monetization `` tag to the main frame, and bubble down the monetization events so that you can get paid, and can show cool stuff to your user. 124 | 125 | If this is something you want, I'd recommend reaching out to the operators of other game portals and request that they add code to support this type of monetization. 126 | 127 | # Support 128 | Please fill out a form at [https://simmer.io/support](https://simmer.io/support) for help. I'd appreciate you reaching out for help vs leaving a poor review on the asset store. I really do respond to most requests in 24 hours unless I'm traveling. 129 | 130 | Thanks 131 | 132 | -Rocco 133 | 134 | # Contributing 135 | 136 | Github pull requests are always appreciated if you find a bug. In the github project there's also a file: 137 | 138 | `CONTRIBUTING.md` that covers some things for internal development of this asset. 139 | 140 | # Thank You! 141 | If you found this useful, please leave an asset store review or "Star" on Github. Every little bit makes a big difference! Also consider sharing your game at [https://simmer.io/upload](https://simmer.io/upload). It's truly drag and drop! 142 | 143 | Also, you can [follow us on twitter](https://twitter.com/simmer_io). 144 | 145 | 146 | 147 | # License 148 | The project was developed by SIMMER.io, and you can use it in your projects for free. If downloaded from Github it is released under the MIT License. If downloaded from the Unity Asset Store it is licenced under the [Unity Asset Store EULA](https://unity3d.com/legal/as_terms). Credit is always nice, but not required! 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /Releases/webmon1.0.0.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheRoccoB/web-monetization-unity-webgl/685e76c01cc65235adc5e165b60c6cbb0bf3eb85/Releases/webmon1.0.0.unitypackage --------------------------------------------------------------------------------