LiuQilin 8 years ago
parent
commit
b4f6ac7b72
100 changed files with 100 additions and 4996 deletions
  1. 0 33
      Assets/Editor/OneWaySDKSetting.cs
  2. 0 12
      Assets/Editor/OneWaySDKSetting.cs.meta
  3. 0 9
      Assets/Editor/Vungle.meta
  4. 0 103
      Assets/Editor/Vungle/VunglePostBuilder.cs
  5. 0 10
      Assets/Editor/Vungle/VunglePostBuilder.cs.meta
  6. 0 31
      Assets/Editor/Vungle/VunglePostProcessor.py
  7. 0 6
      Assets/Editor/Vungle/VunglePostProcessor.py.meta
  8. 0 9
      Assets/Editor/Vungle/VungleSDK.meta
  9. 0 171
      Assets/Editor/Vungle/VungleSDK/VungleBinding.m
  10. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleBinding.m.meta
  11. 0 22
      Assets/Editor/Vungle/VungleSDK/VungleManager.h
  12. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleManager.h.meta
  13. 0 112
      Assets/Editor/Vungle/VungleSDK/VungleManager.mm
  14. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleManager.mm.meta
  15. 0 22
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework.meta
  16. 0 9
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers.meta
  17. 0 209
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers/VungleSDK.h
  18. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers/VungleSDK.h.meta
  19. BIN
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Info.plist
  20. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Info.plist.meta
  21. BIN
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK
  22. 0 6
      Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK.meta
  23. 0 1469
      Assets/Editor/Vungle/mod_pbxproj.py
  24. 0 6
      Assets/Editor/Vungle/mod_pbxproj.py.meta
  25. BIN
      Assets/Editor/Vungle/mod_pbxproj.pyc
  26. 0 6
      Assets/Editor/Vungle/mod_pbxproj.pyc.meta
  27. 0 36
      Assets/Editor/VungleBuildHelper.cs
  28. 0 10
      Assets/Editor/VungleBuildHelper.cs.meta
  29. 0 25
      Assets/Plugins/Android/Vungle_lib.meta
  30. 0 34
      Assets/Plugins/Android/Vungle_lib/AndroidManifest.xml
  31. 0 6
      Assets/Plugins/Android/Vungle_lib/AndroidManifest.xml.meta
  32. 0 9
      Assets/Plugins/Android/Vungle_lib/libs.meta
  33. BIN
      Assets/Plugins/Android/Vungle_lib/libs/vunglePlugin.jar
  34. 0 6
      Assets/Plugins/Android/Vungle_lib/libs/vunglePlugin.jar.meta
  35. BIN
      Assets/Plugins/Android/Vungle_lib/libs/vunglePub.jar
  36. 0 6
      Assets/Plugins/Android/Vungle_lib/libs/vunglePub.jar.meta
  37. 0 15
      Assets/Plugins/Android/Vungle_lib/project.properties
  38. 0 6
      Assets/Plugins/Android/Vungle_lib/project.properties.meta
  39. 0 9
      Assets/Plugins/OneWaySDK.meta
  40. 0 9
      Assets/Plugins/OneWaySDK/Android.meta
  41. BIN
      Assets/Plugins/OneWaySDK/Android/OneWaySdkPlugin.jar
  42. 0 33
      Assets/Plugins/OneWaySDK/Android/OneWaySdkPlugin.jar.meta
  43. BIN
      Assets/Plugins/OneWaySDK/Android/onewaysdk130.jar
  44. 0 33
      Assets/Plugins/OneWaySDK/Android/onewaysdk130.jar.meta
  45. 0 547
      Assets/Plugins/OneWaySDK/MiniJSONV.cs
  46. 0 12
      Assets/Plugins/OneWaySDK/MiniJSONV.cs.meta
  47. 0 236
      Assets/Plugins/OneWaySDK/OneWaySDK.cs
  48. 0 12
      Assets/Plugins/OneWaySDK/OneWaySDK.cs.meta
  49. 0 9
      Assets/Plugins/OneWaySDK/iOS.meta
  50. 0 9
      Assets/Plugins/OneWaySDK/iOS/OWUserMetaData.h
  51. 0 20
      Assets/Plugins/OneWaySDK/iOS/OWUserMetaData.h.meta
  52. 0 260
      Assets/Plugins/OneWaySDK/iOS/OneWaySDK.h
  53. 0 20
      Assets/Plugins/OneWaySDK/iOS/OneWaySDK.h.meta
  54. 0 9
      Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.h
  55. 0 20
      Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.h.meta
  56. 0 70
      Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.m
  57. 0 26
      Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.m.meta
  58. BIN
      Assets/Plugins/OneWaySDK/iOS/OnewaySDK.a
  59. 0 20
      Assets/Plugins/OneWaySDK/iOS/OnewaySDK.a.meta
  60. 0 9
      Assets/Plugins/Vungle.meta
  61. 0 12
      Assets/Plugins/Vungle/AdFinishedEventArgs.cs
  62. 0 10
      Assets/Plugins/Vungle/AdFinishedEventArgs.cs.meta
  63. 0 9
      Assets/Plugins/Vungle/Android.meta
  64. 0 113
      Assets/Plugins/Vungle/Android/VungleAndroid.cs
  65. 0 10
      Assets/Plugins/Vungle/Android/VungleAndroid.cs.meta
  66. 0 337
      Assets/Plugins/Vungle/Vungle.cs
  67. 0 10
      Assets/Plugins/Vungle/Vungle.cs.meta
  68. 0 146
      Assets/Plugins/Vungle/VungleManager.cs
  69. 0 10
      Assets/Plugins/Vungle/VungleManager.cs.meta
  70. 0 82
      Assets/Plugins/Vungle/VungleSceneLoom.cs
  71. 0 10
      Assets/Plugins/Vungle/VungleSceneLoom.cs.meta
  72. 0 9
      Assets/Plugins/Vungle/iOS.meta
  73. 0 124
      Assets/Plugins/Vungle/iOS/VungleBinding.cs
  74. 0 10
      Assets/Plugins/Vungle/iOS/VungleBinding.cs.meta
  75. 0 9
      Assets/Plugins/Vungle/win.meta
  76. 0 125
      Assets/Plugins/Vungle/win/VungleWin.cs
  77. 0 10
      Assets/Plugins/Vungle/win/VungleWin.cs.meta
  78. BIN
      Assets/Plugins/VungleSDKProxy.dll
  79. 0 15
      Assets/Plugins/VungleSDKProxy.dll.meta
  80. BIN
      Assets/Plugins/metro/UWP/VungleSDK.winmd
  81. 0 6
      Assets/Plugins/metro/UWP/VungleSDK.winmd.meta
  82. BIN
      Assets/Plugins/metro/VungleSDK.winmd
  83. 0 6
      Assets/Plugins/metro/VungleSDK.winmd.meta
  84. BIN
      Assets/Plugins/metro/VungleSDKProxy.winmd
  85. 0 6
      Assets/Plugins/metro/VungleSDKProxy.winmd.meta
  86. BIN
      Assets/Plugins/metro/WindowsPhone81/VungleSDK.winmd
  87. 0 6
      Assets/Plugins/metro/WindowsPhone81/VungleSDK.winmd.meta
  88. 23 23
      Assets/Resource/Prefab/Object/Garden.prefab
  89. 1 1
      Assets/Resource/XML/lan/ChineseSimplified.xml
  90. 1 1
      Assets/Resource/XML/lan/ChineseTraditional.xml
  91. 1 1
      Assets/Resource/XML/lan/English.xml
  92. BIN
      Assets/Resource/Xlsx/language_config.xlsx
  93. 0 1
      Assets/Script/Manage/ManaGarden.cs
  94. 1 33
      Assets/Script/Manage/ManaIAP.cs
  95. 4 12
      Assets/Script/Manage/ManaUI.cs
  96. 18 3
      Assets/Script/Manage/ManaVisit.cs
  97. 4 4
      Assets/Script/Object/Garden.cs
  98. 47 2
      Assets/Script/Object/Player.cs
  99. 0 9
      Assets/Script/ThirdParty/OneWayAds.meta
  100. 0 40
      Assets/Script/ThirdParty/OneWayAds/OneWayAdsManager.cs

+ 0 - 33
Assets/Editor/OneWaySDKSetting.cs

@@ -1,33 +0,0 @@
-using UnityEngine;
-
-#if UNITY_EDITOR
-using UnityEditor;
-using UnityEditor.Callbacks;
-using UnityEditor.iOS.Xcode;
-using System.Xml;
-#endif
-using System.IO;
-
-
-public static class OneWaySDKSetting
-{
-		[PostProcessBuildAttribute (100)]
-		static void OnPostprocessBuild(BuildTarget target, string pathToBuildProject){
-
-		if (target != BuildTarget.iOS) {
-			Debug.LogWarning ("Target is not iPhone. XCodePostProcess will not run");
-			return;
-		}
-
-		string _projPath = PBXProject.GetPBXProjectPath (pathToBuildProject);
-		PBXProject _pbxProj = new PBXProject ();
-
-		_pbxProj.ReadFromString (File.ReadAllText (_projPath));
-		string _targetGuid = _pbxProj.TargetGuidByName ("Unity-iPhone");
-
-		//*******************************设置buildsetting*******************************//
-		_pbxProj.SetBuildProperty (_targetGuid, "OTHER_LDFLAGS", "-all_load");  
-
-		File.WriteAllText (_projPath, _pbxProj.WriteToString ());
-	}
-}

+ 0 - 12
Assets/Editor/OneWaySDKSetting.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: e6f6cb8d9d4d442578b32986abc79920
-timeCreated: 1494574980
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Editor/Vungle.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: b1cc84848453f1149881d79f8815727f
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 103
Assets/Editor/Vungle/VunglePostBuilder.cs

@@ -1,103 +0,0 @@
-using UnityEngine;
-using UnityEditor;
-using UnityEditor.Callbacks;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-using System.Linq;
-using System.IO;
-using System.Diagnostics;
-
-public class VunglePostBuilder : MonoBehaviour
-{
-	private static string _postBuildDirectoryKey { get { return "VunglePostBuildPath-" + PlayerSettings.productName; } }
-	private static string postBuildDirectory
-	{
-		get
-		{
-			return EditorPrefs.GetString( _postBuildDirectoryKey );
-		}
-		set
-		{
-			EditorPrefs.SetString( _postBuildDirectoryKey, value );
-		}
-	}
-
-
-	[PostProcessBuild( 800 )]
-	private static void onPostProcessBuildPlayer( BuildTarget target, string pathToBuiltProject )
-	{
-		#if UNITY5_SCRIPTING_IN_UNITY4
-			if( target == BuildTarget.iPhone )
-		#else
-			if( target == BuildTarget.iOS )
-		#endif
-		{
-			postBuildDirectory = pathToBuiltProject;
-
-			// grab the path to the postProcessor.py file
-			var scriptPath = Path.Combine( Application.dataPath, "Editor/Vungle/VunglePostProcessor.py" );
-
-			// sanity check
-			if( !File.Exists( scriptPath ) )
-			{
-				UnityEngine.Debug.LogError( "Vungle post builder could not find the VunglePostProcessor.py file. Did you accidentally delete it?" );
-				return;
-			}
-
-			var pathToNativeCodeFiles = Path.Combine( Application.dataPath, "Editor/Vungle/VungleSDK" );
-
-			var args = string.Format( "\"{0}\" \"{1}\" \"{2}\"", scriptPath, pathToBuiltProject, pathToNativeCodeFiles );
-			var proc = new Process
-			{
-				StartInfo = new ProcessStartInfo
-				{
-					FileName = "python",
-					Arguments = args,
-					UseShellExecute = false,
-					RedirectStandardOutput = true,
-					CreateNoWindow = true
-				}
-			};
-
-			proc.Start();
-			proc.WaitForExit();
-
-			UnityEngine.Debug.Log( "Vungle post processor completed" );
-		}
-	}
-
-
-	[UnityEditor.MenuItem( "Tools/Vungle/Open Documentation Website..." )]
-	static void documentationSite()
-	{
-		UnityEditor.Help.BrowseURL( "https://github.com/Vungle/vungle-resources/tree/master/English/Unity" );
-	}
-
-
-	[UnityEditor.MenuItem( "Tools/Vungle/Run iOS Post Processor" )]
-	static void runPostBuilder()
-	{
-		onPostProcessBuildPlayer( 		
-#if UNITY5_SCRIPTING_IN_UNITY4
-	BuildTarget.iPhone
-#else
-	BuildTarget.iOS
-#endif
-		                         , postBuildDirectory );
-	}
-
-	[UnityEditor.MenuItem( "Tools/Vungle/Run iOS Post Processor", true )]
-	static bool validateRunPostBuilder()
-	{
-		var iPhoneProjectPath = postBuildDirectory;
-		if( iPhoneProjectPath == null || !Directory.Exists( iPhoneProjectPath ) )
-			return false;
-
-		var projectFile = Path.Combine( iPhoneProjectPath, "Unity-iPhone.xcodeproj/project.pbxproj" );
-		if( !File.Exists( projectFile ) )
-			return false;
-
-		return true;
-	}
-}

+ 0 - 10
Assets/Editor/Vungle/VunglePostBuilder.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: efa0399450b3e49cdbef8884085ed3f8
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 31
Assets/Editor/Vungle/VunglePostProcessor.py

@@ -1,31 +0,0 @@
-#!/usr/bin/python
-
-import sys
-from mod_pbxproj import XcodeProject
-
-pathToProjectFile = sys.argv[1] + '/Unity-iPhone.xcodeproj/project.pbxproj'
-pathToNativeCodeFiles = sys.argv[2]
-
-project = XcodeProject.Load( pathToProjectFile )
-
-for obj in list(project.objects.values()):
-    if 'path' in obj:
-        if project.path_leaf( 'System/Library/Frameworks/AdSupport.framework' ) == project.path_leaf(obj.get('path')):
-            project.remove_file(obj.id)
-
-if project.modified:
-    project.save()
-
-project.add_folder( pathToNativeCodeFiles, excludes=["^.*\.meta$"] )
-
-project.add_file_if_doesnt_exist( 'System/Library/Frameworks/AdSupport.framework', tree='SDKROOT', weak=True, parent='Frameworks' )
-project.add_file_if_doesnt_exist( 'System/Library/Frameworks/StoreKit.framework', tree='SDKROOT', parent='Frameworks' )
-project.add_file_if_doesnt_exist( 'System/Library/Frameworks/WebKit.framework', tree='SDKROOT', parent='Frameworks' )
-project.add_file_if_doesnt_exist( 'usr/lib/libsqlite3.dylib', tree='SDKROOT', parent='Frameworks' )
-project.add_file_if_doesnt_exist( 'usr/lib/libz.1.1.3.dylib', tree='SDKROOT', parent='Frameworks' )
-
-project.add_other_ldflags(['-ObjC'])
-
-if project.modified:
-    project.save()
-

+ 0 - 6
Assets/Editor/Vungle/VunglePostProcessor.py.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: ec057a987c5b94f49b430039da5a0475
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Editor/Vungle/VungleSDK.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: f1ffc0b1c3bbcf540a01b54951d25381
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 171
Assets/Editor/Vungle/VungleSDK/VungleBinding.m

@@ -1,171 +0,0 @@
-//
-//  VungleBinding.m
-//  VungleTest
-//
-//
-#import <VungleSDK/VungleSDK.h>
-#import "VungleManager.h"
-
-
-// Converts C style string to NSString
-#define GetStringParam( _x_ ) ( _x_ != NULL ) ? [NSString stringWithUTF8String:_x_] : [NSString stringWithUTF8String:""]
-
-// Converts C style string to NSString as long as it isnt empty
-#define GetStringParamOrNil( _x_ ) ( _x_ != NULL && strlen( _x_ ) ) ? [NSString stringWithUTF8String:_x_] : nil
-
-#define VUNGLE_API_KEY   @"vungle.api_endpoint"
-
-void UnitySendMessage( const char * className, const char * methodName, const char * param );
-UIViewController *UnityGetGLViewController();
-
-static BOOL bInit = false;
-void _vungleStartWithAppId( const char * appId, const char* placements[], int placementsCount, const char * pluginVersion )
-{
-	if (bInit)
-		return;
-	if( [[VungleSDK sharedSDK] respondsToSelector:@selector(setPluginName:version:)] )
-		[[VungleSDK sharedSDK] performSelector:@selector(setPluginName:version:) withObject:@"unity" withObject:GetStringParam(pluginVersion)];
-
-    NSError * error;
-    NSMutableArray * _placements = [NSMutableArray array];
-    for (int i = 0; i < placementsCount; i++)
-        [_placements addObject:GetStringParam(placements[i])];
-    
-    [VungleSDK sharedSDK].delegate = [VungleManager sharedManager];
-    [[VungleSDK sharedSDK] startWithAppId:GetStringParam(appId) placements:_placements error:&error];
-    bInit = true;
-    
-    [[VungleSDK sharedSDK] setLoggingEnabled:true];
-    [[VungleSDK sharedSDK] attachLogger:[VungleManager sharedManager]];
-}
-
-
-void _vungleSetSoundEnabled( BOOL enabled )
-{
-	[VungleSDK sharedSDK].muted = !enabled;
-}
-
-
-void _vungleEnableLogging( BOOL shouldEnable )
-{
-	[[VungleSDK sharedSDK] setLoggingEnabled:shouldEnable];
-}
-
-
-BOOL _vungleIsAdAvailable(const char* placementID)
-{
-	return [[VungleSDK sharedSDK] isAdCachedForPlacementID:GetStringParam(placementID)];
-}
-
-UIInterfaceOrientationMask makeOrientation(NSNumber* code) {
-    UIInterfaceOrientationMask orientationMask;
-    int i = [code intValue];
-    switch( i )
-    {
-        case 1:
-            orientationMask = UIInterfaceOrientationMaskPortrait;
-            break;
-        case 2:
-            orientationMask = UIInterfaceOrientationMaskLandscapeLeft;
-            break;
-        case 3:
-            orientationMask = UIInterfaceOrientationMaskLandscapeRight;
-            break;
-        case 4:
-            orientationMask = UIInterfaceOrientationMaskPortraitUpsideDown;
-            break;
-        case 5:
-            orientationMask = UIInterfaceOrientationMaskLandscape;
-            break;
-        case 6:
-            orientationMask = UIInterfaceOrientationMaskAll;
-            break;
-        case 7:
-            orientationMask = UIInterfaceOrientationMaskAllButUpsideDown;
-            break;
-        default:
-            orientationMask = UIInterfaceOrientationMaskAllButUpsideDown;
-    }
-    return orientationMask;
-}
-
-BOOL _vungleLoadAd(const char* placementID)
-{
-    NSError * error;
-    return [[VungleSDK sharedSDK] loadPlacementWithID:GetStringParam(placementID) error:&error];
-}
-
-void _vunglePlayAd(char* opt, const char* placementID) {
-    NSObject* obj = [VungleManager objectFromJson:GetStringParam( opt )];
-    if([obj isKindOfClass:[NSDictionary class]])
-    {
-        NSError * error;
-        NSDictionary *from = obj;
-        NSMutableDictionary *options = [NSMutableDictionary dictionary];
-//        options[VunglePlayAdOptionKeyIncentivized] = from[@"incentivized"];
-        options[VunglePlayAdOptionKeyOrientations] = @(makeOrientation(from[@"orientation"]));
-//        options[VunglePlayAdOptionKeyLargeButtons] = from[@"large"];
-        if (from[@"userTag"])
-            options[VunglePlayAdOptionKeyUser]  = from[@"userTag"];
-        if (from[@"alertTitle"])
-            options[VunglePlayAdOptionKeyIncentivizedAlertTitleText] = from[@"alertTitle"];
-        if (from[@"alertText"])
-            options[VunglePlayAdOptionKeyIncentivizedAlertBodyText] = from[@"alertText"];
-        if (from[@"closeText"])
-            options[VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText] = from[@"closeText"];
-        if (from[@"continueText"])
-            options[VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText] = from[@"continueText"];
-        //options[VunglePlayAdOptionKeyPlacement] = from[@"placement"];
-        /*
-        NSMutableDictionary *extra = [NSMutableDictionary dictionary];
-        if (from[@"key1"])
-            extra[VunglePlayAdOptionKeyExtra1] = from[@"key1"];
-        if (from[@"key2"])
-            extra[VunglePlayAdOptionKeyExtra2] = from[@"key2"];
-        if (from[@"key3"])
-            extra[VunglePlayAdOptionKeyExtra3] = from[@"key3"];
-        if (from[@"key4"])
-            extra[VunglePlayAdOptionKeyExtra4] = from[@"key4"];
-        if (from[@"key5"])
-            extra[VunglePlayAdOptionKeyExtra5] = from[@"key5"];
-        if (from[@"key6"])
-            extra[VunglePlayAdOptionKeyExtra6] = from[@"key6"];
-        if (from[@"key7"])
-            extra[VunglePlayAdOptionKeyExtra7] = from[@"key7"];
-        if (from[@"key8"])
-            extra[VunglePlayAdOptionKeyExtra8] = from[@"key8"];
-        options[VunglePlayAdOptionKeyExtraInfoDictionary] = extra;
-         */
-        [[VungleSDK sharedSDK] playAd:UnityGetGLViewController() options:options placementID:GetStringParam(placementID) error:&error];
-    }
-}
-
-void _vungleClearSleep( )
-{
-    [[VungleSDK sharedSDK] clearSleep];
-}
-
-void _vungleSetEndPoint(const char * endPoint) {
-    NSString *endPointString = GetStringParamOrNil( endPoint );
-    if (endPointString) {
-        NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
-        [defaults setObject:endPointString forKey:VUNGLE_API_KEY];
-    }
-}
-
-static char* MakeStringCopy (const char* string) {
-    if (string == NULL) {
-        return NULL;
-    }
-    
-    char* res = (char*)malloc(strlen(string) + 1);
-    strcpy(res, string);
-    return res;
-}
-
-char * _vungleGetEndPoint() {
-    NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
-    return MakeStringCopy([[defaults objectForKey:VUNGLE_API_KEY] UTF8String]);
-}
-
-

+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleBinding.m.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 60baefe11f614445e84561018026ad5e
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 22
Assets/Editor/Vungle/VungleSDK/VungleManager.h

@@ -1,22 +0,0 @@
-//
-//  VungleManager.h
-//  VungleTest
-//
-//  Created by Mike Desaro on 6/5/12.
-//  Copyright (c) 2012 prime31. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import <VungleSDK/VungleSDK.h>
-
-
-@interface VungleManager : NSObject <VungleSDKDelegate>
-
-
-+ (VungleManager*)sharedManager;
-
-+ (id)objectFromJson:(NSString*)json;
-
-+ (NSString*)jsonFromObject:(id)object;
-
-@end

+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleManager.h.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: b70cd8a4a99c04cafbf72885b96e7c10
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 112
Assets/Editor/Vungle/VungleSDK/VungleManager.mm

@@ -1,112 +0,0 @@
-//
-//  VungleManager.m
-//  VungleTest
-//
-//  Created by Mike Desaro on 6/5/12.
-//  Copyright (c) 2012 prime31. All rights reserved.
-//
-
-#import "VungleManager.h"
-#import <objc/runtime.h>
-
-
-#if UNITY_VERSION < 500
-void UnityPause( bool pause );
-#else
-void UnityPause( int pause );
-#endif
-
-UIViewController *UnityGetGLViewController();
-
-void UnitySendMessage( const char * className, const char * methodName, const char * param );
-
-
-
-#if __has_feature(objc_arc)
-#define SAFE_ARC_AUTORELEASE(x) (x)
-#else
-#define SAFE_ARC_AUTORELEASE(x) ([(x) autorelease])
-#endif
-
-
-@implementation VungleManager
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark Class Methods
-
-+ (VungleManager*)sharedManager
-{
-	static VungleManager *sharedSingleton;
-	
-	if( !sharedSingleton )
-		sharedSingleton = [[VungleManager alloc] init];
-	
-	return sharedSingleton;
-}
-
-
-+ (NSString*)jsonFromObject:(id)object
-{
-	NSError *error = nil;
-	NSData *jsonData = [NSJSONSerialization dataWithJSONObject:object options:0 error:&error];
-	
-	if( jsonData && !error )
-		return SAFE_ARC_AUTORELEASE( [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding] );
-	else
-		NSLog( @"jsonData was null, error: %@", [error localizedDescription] );
-
-    return @"{}";
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - Public
-
-+ (id)objectFromJson:(NSString*)json
-{
-    NSError *error = nil;
-    NSData *data = [NSData dataWithBytes:json.UTF8String length:json.length];
-    NSObject *object = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];
-    
-    if( error )
-        NSLog( @"failed to deserialize JSON: %@ with error: %@", json, [error localizedDescription] );
-    
-    return object;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - VGVunglePubDelegate
-
-- (BOOL)vungleWillShowAdForPlacementID:(nullable NSString *)placementID {
-    UnitySendMessage("VungleManager", "OnAdStart", placementID?[placementID UTF8String]:"");
-    return true;
-}
-
-- (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID {
-    NSDictionary *dict = @{
-                           @"isAdAvailable": [NSNumber numberWithBool:isAdPlayable],
-                           @"placementID": placementID ?: @""
-                           };
-    UnitySendMessage("VungleManager", "OnAdPlayable", [VungleManager jsonFromObject:dict].UTF8String);
-}
-
-- (void)vungleWillCloseAdWithViewInfo:(nonnull VungleViewInfo *)info placementID:(nonnull NSString *)placementID {
-    NSDictionary *dict = @{
-                           @"completedView": [info completedView] ?: [NSNull null],
-                           @"playTime": [info playTime] ?: [NSNull null],
-                           @"didDownload": [info didDownload] ?: [NSNull null],
-                           @"placementID": placementID ?: @""
-                           };
-	UnitySendMessage("VungleManager", "OnAdEnd", [VungleManager jsonFromObject:dict].UTF8String);
-}
-
-- (void)vungleSDKDidInitialize {
-    UnitySendMessage( "VungleManager", "OnInitialize", "" );
-}
-
-- (void)vungleSDKLog:(NSString*)message
-{
-       	UnitySendMessage( "VungleManager", "OnSDKLog", [message UTF8String]);
-}
-
-@end

+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleManager.mm.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: d141aa1bac7a54c228f6f12ed05ead7e
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 22
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework.meta

@@ -1,22 +0,0 @@
-fileFormatVersion: 2
-guid: 958a513129a59544a90c4541e486551e
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  isOverridable: 0
-  platformData:
-    Any:
-      enabled: 0
-      settings: {}
-    Editor:
-      enabled: 1
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 52cc562542e537d409915b5d2db5368a
-folderAsset: yes
-timeCreated: 1501174342
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 209
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers/VungleSDK.h

@@ -1,209 +0,0 @@
-//
-//  VungleSDK.h
-//  Vungle iOS SDK
-//  SDK Version: 5.1.0
-//
-//  Copyright (c) 2013-Present Vungle Inc. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * VungleViewInfo is a container object for state passed
- * indicating how the play experience went
- */
-@interface VungleViewInfo : NSObject <NSCopying>
-
-/**
- * Represents a BOOL whether or not the video can be considered a full view.
- */
-@property (nonatomic, readonly) NSNumber *completedView;
-
-/**
- * The time in seconds that the user watched the video.
- */
-@property (nonatomic, readonly) NSNumber *playTime;
-
-/**
- * Represents a BOOL whether or not the user clicked the download button.
- */
-@property (nonatomic, readonly) NSNumber *didDownload;
-
-@end
-
-@protocol VungleAssetLoader;
-
-extern NSString *VungleSDKVersion;
-extern NSString *VunglePlayAdOptionKeyIncentivizedAlertTitleText;
-extern NSString *VunglePlayAdOptionKeyIncentivizedAlertBodyText;
-extern NSString *VunglePlayAdOptionKeyIncentivizedAlertCloseButtonText;
-extern NSString *VunglePlayAdOptionKeyIncentivizedAlertContinueButtonText;
-extern NSString *VunglePlayAdOptionKeyOrientations;
-extern NSString *VunglePlayAdOptionKeyUser;
-extern NSString *VunglePlayAdOptionKeyExtraInfoDictionary;
-extern NSString *VunglePlayAdOptionKeyExtra1;
-extern NSString *VunglePlayAdOptionKeyExtra2;
-extern NSString *VunglePlayAdOptionKeyExtra3;
-extern NSString *VunglePlayAdOptionKeyExtra4;
-extern NSString *VunglePlayAdOptionKeyExtra5;
-extern NSString *VunglePlayAdOptionKeyExtra6;
-extern NSString *VunglePlayAdOptionKeyExtra7;
-extern NSString *VunglePlayAdOptionKeyExtra8;
-extern NSString *VunglePlayAdOptionKeyLargeButtons;
-
-typedef enum {
-    VungleSDKErrorInvalidPlayAdOption = 1,
-    VungleSDKErrorInvalidPlayAdExtraKey,
-    VungleSDKErrorCannotPlayAd,
-    VungleSDKErrorCannotPlayAdAlreadyPlaying,
-    VungleSDKErrorCannotPlayAdWaiting,
-    VungleSDKErrorNoAppID,
-    InvalidPlacementsArray,
-    VungleSDKErrorInvalidiOSVersion,
-    VungleSDKErrorTopMostViewControllerMismatch,
-    VungleSDKErrorUnknownPlacementID,
-    VungleSDKErrorSDKNotInitialized
-} VungleSDKErrorCode;
-
-@protocol VungleSDKLogger <NSObject>
-- (void)vungleSDKLog:(NSString *)message;
-@end
-
-@class VungleSDK;
-
-@protocol VungleSDKDelegate <NSObject>
-@optional
-
-/**
- * If implemented, this will get called when the SDK has an ad ready to be displayed. Also it will
- * get called with an argument `NO` for `isAdPlayable` when for some reason, there is
- * no ad available, for instance there is a corrupt ad or the OS wiped the cache.
- * Please note that receiving a `NO` here does not mean that you can't play an Ad: if you haven't
- * opted-out of our Exchange, you might be able to get a streaming ad if you call `play`.
- * @param isAdPlayable A boolean indicating if an ad is currently in a playable state
- * @param placementID The ID of a placement which is ready to be played
- */
-- (void)vungleAdPlayabilityUpdate:(BOOL)isAdPlayable placementID:(nullable NSString *)placementID;
-/**
- * If implemented, this will get called when the SDK is about to show an ad. This point
- * might be a good time to pause your game, and turn off any sound you might be playing.
- * @param placementID The placement which is about to be shown.
- */
-- (void)vungleWillShowAdForPlacementID:(nullable NSString *)placementID;
-
-/**
- * If implemented, this method gets called when a Vungle Ad Unit is about to be completely dismissed.
- * At this point, it's recommended to resume your Game or App.
- */
-- (void)vungleWillCloseAdWithViewInfo:(nonnull VungleViewInfo *)info placementID:(nonnull NSString *)placementID;
-
-- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo
-                 willPresentProductSheet:(BOOL)willPresentProductSheet __attribute__((deprecated("Use vungleSDKWillCloseAdWithViewInfo: instead.")));
-
-- (void)vungleSDKwillCloseProductSheet:(id)productSheet __attribute__((deprecated("Use vungleSDKWillCloseAdWithViewInfo: instead.")));
-
-/**
- * If implemented, this will get called when VungleSDK has finished initialization.
- * It's only at this point that one can call `playAd:options:placementID:error`
- * and `loadPlacementWithID:` without getting initialization errors
- */
-- (void)vungleSDKDidInitialize;
-
-/**
- * If implemented, this will get called if the VungleSDK fails to initialize.
- * The included NSError object should give some information as to the failure reason.
- * @note If initialization fails, you will need to restart the VungleSDK.
- */
-- (void)vungleSDKFailedToInitializeWithError:(NSError *)error;
-
-@end
-
-@interface VungleSDK : NSObject
-@property (strong) NSDictionary *userData;
-@property (strong) id<VungleSDKDelegate> delegate;
-@property (strong) id<VungleAssetLoader> assetLoader;
-@property (assign) BOOL muted;
-@property (atomic, readonly, getter=isInitialized) BOOL initialized;
-
-/**
- * Returns the singleton instance.
- */
-+ (VungleSDK *)sharedSDK;
-
-/**
- * Setup the SDK with an asset loader. This must be called before any call to sharedSDK in order
- * to properly set the asset loader.
- */
-+ (VungleSDK *)setupSDKWithAssetLoader:(id<VungleAssetLoader>)loader;
-
-/**
- * Initializes the SDK. You can get your app id on Vungle's dashboard: https://v.vungle.com
- * @param appID the unique identifier for your app
- * @param placements An array of strings representing placements defined in the dashboard.
- * @param error An error object containing information about why initialization failed
- * @return YES if the SDK has started, NO otherwise
- */
-- (BOOL)startWithAppId:(nonnull NSString *)appID placements:(nonnull NSArray<NSString *> *)placements error:(NSError **)error;
-
-/**
- * Will play Ad Unit presenting it over the `controller` parameter
- * @param controller A subclass of UIViewController. Should correspond to the ViewControler at the top of the ViewController hierarchy
- * @param options A reference to an instance of NSDictionary with customized ad playback options
- * @param placementID The placement defined on the Vungle dashboard
- * @param error An optional double reference to an NSError. In case this method returns `NO` it will be non-nil
- * @return YES/NO in case of success/error while presenting an AdUnit
- * @warning Should be called from the main-thread.
- */
-- (BOOL)playAd:(UIViewController *)controller options:(nullable NSDictionary *)options placementID:(nullable NSString *)placementID error:( NSError *__autoreleasing _Nullable *_Nullable)error;
-
-/**
- * Returns `YES` when there is certainty that an ad will be able to play for a given placementID.
- * Returning `NO`, you can still try to play and get a streaming Ad.
- * @param placementID the specific ID of the placement you are trying to present
- */
-- (BOOL)isAdCachedForPlacementID:(nonnull NSString *)placementID;
-
-/**
- * Prepares a placement when you know that you will want
- * to show an ad experience tied to a specific placementID.
- * @param placementID the specific ID of the placement you would like to present at some point soon
- * @return NO if something goes immediately wrong with loading, YES otherwise
- */
-- (BOOL)loadPlacementWithID:(NSString *)placementID error:(NSError **)error;
-
-/**
- * Returns debug info.
- */
-- (NSDictionary *)debugInfo;
-
-/**
- * By default, logging is off.
- */
-- (void)setLoggingEnabled:(BOOL)enable;
-
-/**
- * Log a new message. The message will be sent to all loggers.
- */
-- (void)log:(NSString *)message, ...NS_FORMAT_FUNCTION(1, 2);
-
-/**
- * Attach a new logger. It will get called on every log generated by Vungle (internally and externally).
- */
-- (void)attachLogger:(id<VungleSDKLogger>)logger;
-
-/**
- * Detaches a logger. Make sure to do this, otherwise you might leak memory.
- */
-- (void)detachLogger:(id<VungleSDKLogger>)logger;
-
-/**
- * This only works on the simulator
- */
-- (void)clearSleep;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Headers/VungleSDK.h.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: e4d7c844ef7fc4de0b7dacd2ff8adda3
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Info.plist


+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/Info.plist.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 0252f7570e86f4855a30b08f01d6be37
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK


+ 0 - 6
Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: f9fb609c43801437b815f3d81f055410
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 1469
Assets/Editor/Vungle/mod_pbxproj.py

@@ -1,1469 +0,0 @@
-#  Copyright 2012 Calvin Rien
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-
-#  A pbxproj file is an OpenStep format plist
-#  {} represents dictionary of key=value pairs delimited by ;
-#  () represents list of values delimited by ,
-#  file starts with a comment specifying the character type
-#  // !$*UTF8*$!
-
-#  when adding a file to a project, create the PBXFileReference
-#  add the PBXFileReference's guid to a group
-#  create a PBXBuildFile with the PBXFileReference's guid
-#  add the PBXBuildFile to the appropriate build phase
-
-#  when adding a header search path add
-#  HEADER_SEARCH_PATHS = "path/**";
-#  to each XCBuildConfiguration object
-
-#  Xcode4 will read either a OpenStep or XML plist.
-#  this script uses `plutil` to validate, read and write
-#  the pbxproj file.  Plutil is available in OS X 10.2 and higher
-#  Plutil can't write OpenStep plists, so I save as XML
-
-import datetime
-import json
-import ntpath
-import os
-import plistlib
-import re
-import shutil
-import subprocess
-import uuid
-
-from UserDict import IterableUserDict
-from UserList import UserList
-
-regex = '[a-zA-Z0-9\\._/-]*'
-
-
-class PBXEncoder(json.JSONEncoder):
-    def default(self, obj):
-        """Tests the input object, obj, to encode as JSON."""
-
-        if isinstance(obj, (PBXList, PBXDict)):
-            return obj.data
-
-        return json.JSONEncoder.default(self, obj)
-
-
-class PBXDict(IterableUserDict):
-    def __init__(self, d=None):
-        if d:
-            d = dict([(PBXType.Convert(k), PBXType.Convert(v)) for k, v in d.items()])
-
-        IterableUserDict.__init__(self, d)
-
-    def __setitem__(self, key, value):
-        IterableUserDict.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
-
-    def remove(self, key):
-        self.data.pop(PBXType.Convert(key), None)
-
-
-class PBXList(UserList):
-    def __init__(self, l=None):
-        if isinstance(l, basestring):
-            UserList.__init__(self)
-            self.add(l)
-            return
-        elif l:
-            l = [PBXType.Convert(v) for v in l]
-
-        UserList.__init__(self, l)
-
-    def add(self, value):
-        value = PBXType.Convert(value)
-
-        if value in self.data:
-            return False
-
-        self.data.append(value)
-        return True
-
-    def remove(self, value):
-        value = PBXType.Convert(value)
-
-        if value in self.data:
-            self.data.remove(value)
-            return True
-        return False
-
-    def __setitem__(self, key, value):
-        UserList.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
-
-
-class PBXType(PBXDict):
-    def __init__(self, d=None):
-        PBXDict.__init__(self, d)
-
-        if 'isa' not in self:
-            self['isa'] = self.__class__.__name__
-        self.id = None
-
-    @staticmethod
-    def Convert(o):
-        if isinstance(o, list):
-            return PBXList(o)
-        elif isinstance(o, dict):
-            isa = o.get('isa')
-
-            if not isa:
-                return PBXDict(o)
-
-            cls = globals().get(isa)
-
-            if cls and issubclass(cls, PBXType):
-                return cls(o)
-
-            print 'warning: unknown PBX type: %s' % isa
-            return PBXDict(o)
-        else:
-            return o
-
-    @staticmethod
-    def IsGuid(o):
-        return re.match('^[A-F0-9]{24}$', str(o))
-
-    @classmethod
-    def GenerateId(cls):
-        return ''.join(str(uuid.uuid4()).upper().split('-')[1:])
-
-    @classmethod
-    def Create(cls, *args, **kwargs):
-        return cls(*args, **kwargs)
-
-
-class PBXFileReference(PBXType):
-    def __init__(self, d=None):
-        PBXType.__init__(self, d)
-        self.build_phase = None
-
-    types = {
-        '.a': ('archive.ar', 'PBXFrameworksBuildPhase'),
-        '.app': ('wrapper.application', None),
-        '.s': ('sourcecode.asm', 'PBXSourcesBuildPhase'),
-        '.c': ('sourcecode.c.c', 'PBXSourcesBuildPhase'),
-        '.cpp': ('sourcecode.cpp.cpp', 'PBXSourcesBuildPhase'),
-        '.framework': ('wrapper.framework', 'PBXFrameworksBuildPhase'),
-        '.h': ('sourcecode.c.h', None),
-        '.hpp': ('sourcecode.c.h', None),
-        '.swift': ('sourcecode.swift', 'PBXSourcesBuildPhase'),
-        '.icns': ('image.icns', 'PBXResourcesBuildPhase'),
-        '.m': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
-        '.j': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
-        '.mm': ('sourcecode.cpp.objcpp', 'PBXSourcesBuildPhase'),
-        '.nib': ('wrapper.nib', 'PBXResourcesBuildPhase'),
-        '.plist': ('text.plist.xml', 'PBXResourcesBuildPhase'),
-        '.json': ('text.json', 'PBXResourcesBuildPhase'),
-        '.png': ('image.png', 'PBXResourcesBuildPhase'),
-        '.rtf': ('text.rtf', 'PBXResourcesBuildPhase'),
-        '.tiff': ('image.tiff', 'PBXResourcesBuildPhase'),
-        '.txt': ('text', 'PBXResourcesBuildPhase'),
-        '.xcodeproj': ('wrapper.pb-project', None),
-        '.xib': ('file.xib', 'PBXResourcesBuildPhase'),
-        '.strings': ('text.plist.strings', 'PBXResourcesBuildPhase'),
-        '.bundle': ('wrapper.plug-in', 'PBXResourcesBuildPhase'),
-        '.dylib': ('compiled.mach-o.dylib', 'PBXFrameworksBuildPhase'),
-        '.xcdatamodeld': ('wrapper.xcdatamodel', 'PBXSourcesBuildPhase'),
-        '.xcassets': ('folder.assetcatalog', 'PBXResourcesBuildPhase')
-    }
-
-    trees = [
-        '<absolute>',
-        '<group>',
-        'BUILT_PRODUCTS_DIR',
-        'DEVELOPER_DIR',
-        'SDKROOT',
-        'SOURCE_ROOT',
-        ]
-
-    def guess_file_type(self, ignore_unknown_type=False):
-        self.remove('explicitFileType')
-        self.remove('lastKnownFileType')
-
-
-        ext = os.path.splitext(self.get('name', ''))[1]
-        if os.path.isdir(self.get('path')) and ext not in XcodeProject.special_folders:
-            f_type = 'folder'
-            build_phase = None
-            ext = ''
-        else:
-            f_type, build_phase = PBXFileReference.types.get(ext, ('?', 'PBXResourcesBuildPhase'))
-
-        self['lastKnownFileType'] = f_type
-        self.build_phase = build_phase
-
-        if f_type == '?' and not ignore_unknown_type:
-            print 'unknown file extension: %s' % ext
-            print 'please add extension and Xcode type to PBXFileReference.types'
-
-        return f_type
-
-    def set_file_type(self, ft):
-        self.remove('explicitFileType')
-        self.remove('lastKnownFileType')
-
-        self['explicitFileType'] = ft
-
-    @classmethod
-    def Create(cls, os_path, tree='SOURCE_ROOT', ignore_unknown_type=False):
-        if tree not in cls.trees:
-            print 'Not a valid sourceTree type: %s' % tree
-            return None
-
-        fr = cls()
-        fr.id = cls.GenerateId()
-        fr['path'] = os_path
-        fr['name'] = os.path.split(os_path)[1]
-        fr['sourceTree'] = '<absolute>' if os.path.isabs(os_path) else tree
-        fr.guess_file_type(ignore_unknown_type=ignore_unknown_type)
-
-        return fr
-
-
-class PBXBuildFile(PBXType):
-    def set_weak_link(self, weak=False):
-        k_settings = 'settings'
-        k_attributes = 'ATTRIBUTES'
-
-        s = self.get(k_settings)
-
-        if not s:
-            if weak:
-                self[k_settings] = PBXDict({k_attributes: PBXList(['Weak'])})
-
-            return True
-
-        atr = s.get(k_attributes)
-
-        if not atr:
-            if weak:
-                atr = PBXList()
-            else:
-                return False
-
-        if weak:
-            atr.add('Weak')
-        else:
-            atr.remove('Weak')
-
-        self[k_settings][k_attributes] = atr
-
-        return True
-
-    def add_compiler_flag(self, flag):
-        k_settings = 'settings'
-        k_attributes = 'COMPILER_FLAGS'
-
-        if k_settings not in self:
-            self[k_settings] = PBXDict()
-
-        if k_attributes not in self[k_settings]:
-            self[k_settings][k_attributes] = flag
-            return True
-
-        flags = self[k_settings][k_attributes].split(' ')
-
-        if flag in flags:
-            return False
-
-        flags.append(flag)
-
-        self[k_settings][k_attributes] = ' '.join(flags)
-
-    @classmethod
-    def Create(cls, file_ref, weak=False):
-        if isinstance(file_ref, PBXFileReference):
-            file_ref = file_ref.id
-
-        bf = cls()
-        bf.id = cls.GenerateId()
-        bf['fileRef'] = file_ref
-
-        if weak:
-            bf.set_weak_link(True)
-
-        return bf
-
-
-class PBXGroup(PBXType):
-    def add_child(self, ref):
-        if not isinstance(ref, PBXDict):
-            return None
-
-        isa = ref.get('isa')
-
-        if isa != 'PBXFileReference' and isa != 'PBXGroup':
-            return None
-
-        if 'children' not in self:
-            self['children'] = PBXList()
-
-        self['children'].add(ref.id)
-
-        return ref.id
-
-    def remove_child(self, id):
-        if 'children' not in self:
-            self['children'] = PBXList()
-            return
-
-        if not PBXType.IsGuid(id):
-            id = id.id
-
-        self['children'].remove(id)
-
-    def has_child(self, id):
-        if 'children' not in self:
-            self['children'] = PBXList()
-            return False
-
-        if not PBXType.IsGuid(id):
-            id = id.id
-
-        return id in self['children']
-
-    def get_name(self):
-        path_name = os.path.split(self.get('path', ''))[1]
-        return self.get('name', path_name)
-
-    @classmethod
-    def Create(cls, name, path=None, tree='SOURCE_ROOT'):
-        grp = cls()
-        grp.id = cls.GenerateId()
-        grp['name'] = name
-        grp['children'] = PBXList()
-
-        if path:
-            grp['path'] = path
-            grp['sourceTree'] = tree
-        else:
-            grp['sourceTree'] = '<group>'
-
-        return grp
-
-
-class PBXNativeTarget(PBXType):
-    pass
-
-
-class PBXProject(PBXType):
-    pass
-
-
-class PBXContainerItemProxy(PBXType):
-    pass
-
-
-class PBXReferenceProxy(PBXType):
-    pass
-
-
-class PBXVariantGroup(PBXType):
-    pass
-
-
-class PBXTargetDependency(PBXType):
-    pass
-
-
-class PBXAggregateTarget(PBXType):
-    pass
-
-
-class PBXHeadersBuildPhase(PBXType):
-    pass
-
-class XCVersionGroup(PBXType):
-    pass
-
-class PBXBuildPhase(PBXType):
-    def add_build_file(self, bf):
-        if bf.get('isa') != 'PBXBuildFile':
-            return False
-
-        if 'files' not in self:
-            self['files'] = PBXList()
-
-        self['files'].add(bf.id)
-
-        return True
-
-    def remove_build_file(self, id):
-        if 'files' not in self:
-            self['files'] = PBXList()
-            return
-
-        self['files'].remove(id)
-
-    def has_build_file(self, id):
-        if 'files' not in self:
-            self['files'] = PBXList()
-            return False
-
-        if not PBXType.IsGuid(id):
-            id = id.id
-
-        return id in self['files']
-
-
-class PBXFrameworksBuildPhase(PBXBuildPhase):
-    pass
-
-
-class PBXResourcesBuildPhase(PBXBuildPhase):
-    pass
-
-
-class PBXShellScriptBuildPhase(PBXBuildPhase):
-    @classmethod
-    def Create(cls, script, shell="/bin/sh", files=[], input_paths=[], output_paths=[], show_in_log = '0'):
-        bf = cls()
-        bf.id = cls.GenerateId()
-        bf['files'] = files
-        bf['inputPaths'] = input_paths
-        bf['outputPaths'] = output_paths
-        bf['runOnlyForDeploymentPostprocessing'] = '0';
-        bf['shellPath'] = shell
-        bf['shellScript'] = script
-        bf['showEnvVarsInLog'] = show_in_log
-
-        return bf
-
-
-class PBXSourcesBuildPhase(PBXBuildPhase):
-    pass
-
-
-class PBXCopyFilesBuildPhase(PBXBuildPhase):
-    pass
-
-
-class XCBuildConfiguration(PBXType):
-    def add_search_paths(self, paths, base, key, recursive=True, escape=True):
-        modified = False
-
-        if not isinstance(paths, list):
-            paths = [paths]
-
-        if base not in self:
-            self[base] = PBXDict()
-
-        for path in paths:
-            if recursive and not path.endswith('/**'):
-                path = os.path.join(path, '**')
-
-            if key not in self[base]:
-                self[base][key] = PBXList()
-            elif isinstance(self[base][key], basestring):
-                self[base][key] = PBXList(self[base][key])
-
-            if path == '$(inherited)':
-                escape = False
-
-            if escape:
-                if self[base][key].add('"%s"' % path):  # '\\"%s\\"' % path
-                    modified = True
-            else:
-                if self[base][key].add(path):  # '\\"%s\\"' % path
-                    modified = True
-
-        return modified
-
-    def add_header_search_paths(self, paths, recursive=True):
-        return self.add_search_paths(paths, 'buildSettings', 'HEADER_SEARCH_PATHS', recursive=recursive)
-
-    def add_library_search_paths(self, paths, recursive=True):
-        return self.add_search_paths(paths, 'buildSettings', 'LIBRARY_SEARCH_PATHS', recursive=recursive)
-
-    def add_framework_search_paths(self, paths, recursive=True):
-        return self.add_search_paths(paths, 'buildSettings', 'FRAMEWORK_SEARCH_PATHS', recursive=recursive)
-
-    def add_other_cflags(self, flags):
-        return self.add_flag('OTHER_CFLAGS', flags)
-
-    def add_other_ldflags(self, flags):
-        return self.add_flag('OTHER_LDFLAGS', flags)
-
-    def add_flag(self, key, flags):
-        modified = False
-        base = 'buildSettings'
-
-        if isinstance(flags, basestring):
-            flags = PBXList(flags)
-
-        if base not in self:
-            self[base] = PBXDict()
-
-        for flag in flags:
-            if key not in self[base]:
-                self[base][key] = PBXList()
-            elif isinstance(self[base][key], basestring):
-                self[base][key] = PBXList(self[base][key])
-
-            if self[base][key].add(flag):
-                self[base][key] = [e for e in self[base][key] if e]
-                modified = True
-
-        return modified
-
-    def remove_flag(self, key, flags):
-        modified = False
-        base = 'buildSettings'
-
-        if isinstance(flags, basestring):
-            flags = PBXList(flags)
-
-        if base in self:  # there are flags, so we can "remove" something
-            for flag in flags:
-                if key not in self[base]:
-                    return False
-                elif isinstance(self[base][key], basestring):
-                    self[base][key] = PBXList(self[base][key])
-
-                if self[base][key].remove(flag):
-                    self[base][key] = [e for e in self[base][key] if e]
-                    modified = True
-
-                if len(self[base][key]) == 0:
-                    self[base].pop(key, None)
-
-        return modified
-
-    def remove_other_ldflags(self, flags):
-        return self.remove_flag('OTHER_LD_FLAGS', flags)
-
-class XCConfigurationList(PBXType):
-    pass
-
-
-class XcodeProject(PBXDict):
-    plutil_path = 'plutil'
-    special_folders = ['.bundle', '.framework', '.xcodeproj', '.xcassets', '.xcdatamodeld']
-
-    def __init__(self, d=None, path=None):
-        if not path:
-            path = os.path.join(os.getcwd(), 'project.pbxproj')
-
-        self.pbxproj_path = os.path.abspath(path)
-        self.source_root = os.path.abspath(os.path.join(os.path.split(path)[0], '..'))
-
-        IterableUserDict.__init__(self, d)
-
-        self.data = PBXDict(self.data)
-        self.objects = self.get('objects')
-        self.modified = False
-
-        root_id = self.get('rootObject')
-
-        if root_id:
-            self.root_object = self.objects[root_id]
-            root_group_id = self.root_object.get('mainGroup')
-            self.root_group = self.objects[root_group_id]
-        else:
-            print "error: project has no root object"
-            self.root_object = None
-            self.root_group = None
-
-        for k, v in self.objects.iteritems():
-            v.id = k
-
-    def add_other_cflags(self, flags):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.add_other_cflags(flags):
-                self.modified = True
-
-    def add_other_ldflags(self, flags):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.add_other_ldflags(flags):
-                self.modified = True
-
-    def remove_other_ldflags(self, flags):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.remove_other_ldflags(flags):
-                self.modified = True
-
-    def add_header_search_paths(self, paths, recursive=True):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.add_header_search_paths(paths, recursive):
-                self.modified = True
-
-    def add_framework_search_paths(self, paths, recursive=True):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.add_framework_search_paths(paths, recursive):
-                self.modified = True
-
-    def add_library_search_paths(self, paths, recursive=True):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        for b in build_configs:
-            if b.add_library_search_paths(paths, recursive):
-                self.modified = True
-
-    def add_flags(self, pairs, configuration='All'):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        # iterate over all the pairs of configurations
-        for b in build_configs:
-            if configuration != "All" and b.get('name') != configuration :
-                continue
-
-            for k in pairs:
-                if b.add_flag(k, pairs[k]):
-                    self.modified = True
-
-    def remove_flags(self, pairs, configuration='All'):
-        build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
-
-        # iterate over all the pairs of configurations
-        for b in build_configs:
-            if configuration != "All" and b.get('name') != configuration :
-                continue
-            for k in pairs:
-                if b.remove_flag(k, pairs[k]):
-                    self.modified = True
-
-    def get_obj(self, id):
-        return self.objects.get(id)
-
-    def get_ids(self):
-        return self.objects.keys()
-
-    def get_files_by_os_path(self, os_path, tree='SOURCE_ROOT'):
-        files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
-                                                     and f.get('path') == os_path
-                                                     and f.get('sourceTree') == tree]
-
-        return files
-
-    def get_files_by_name(self, name, parent=None):
-        if parent:
-            files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
-                                                         and f.get('name') == name
-                                                         and parent.has_child(f)]
-        else:
-            files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
-                                                         and f.get('name') == name]
-
-        return files
-
-    def get_build_files(self, id):
-        files = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile'
-                                                     and f.get('fileRef') == id]
-
-        return files
-
-    def get_groups_by_name(self, name, parent=None):
-        if parent:
-            groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
-                                                          and g.get_name() == name
-                                                          and parent.has_child(g)]
-        else:
-            groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
-                                                          and g.get_name() == name]
-
-        return groups
-
-    def get_or_create_group(self, name, path=None, parent=None):
-        if not name:
-            return None
-
-        if not parent:
-            parent = self.root_group
-        elif not isinstance(parent, PBXGroup):
-            # assume it's an id
-            parent = self.objects.get(parent, self.root_group)
-
-        groups = self.get_groups_by_name(name)
-
-        for grp in groups:
-            if parent.has_child(grp.id):
-                return grp
-
-        grp = PBXGroup.Create(name, path)
-        parent.add_child(grp)
-
-        self.objects[grp.id] = grp
-
-        self.modified = True
-
-        return grp
-
-    def get_groups_by_os_path(self, path):
-        path = os.path.abspath(path)
-
-        groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
-                                                      and os.path.abspath(g.get('path', '/dev/null')) == path]
-
-        return groups
-
-    def get_build_phases(self, phase_name):
-        phases = [p for p in self.objects.values() if p.get('isa') == phase_name]
-
-        return phases
-
-    def get_relative_path(self, os_path):
-        return os.path.relpath(os_path, self.source_root)
-
-    def verify_files(self, file_list, parent=None):
-        # returns list of files not in the current project.
-        if not file_list:
-            return []
-
-        if parent:
-            exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list and parent.has_child(f)]
-        else:
-            exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list]
-
-        return set(file_list).difference(exists_list)
-
-    def add_run_script(self, target, script=None, insert_before_compile=False):
-        result = []
-        targets = [t for t in self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget') if t.get('name') == target]
-        if len(targets) != 0 :
-            script_phase = PBXShellScriptBuildPhase.Create(script)
-            for t in targets:
-                skip = False
-                for buildPhase in t['buildPhases']:
-                    if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
-                        skip = True
-
-                if not skip:
-                    if insert_before_compile:
-                        t['buildPhases'].insert(0, script_phase.id)
-                    else:
-                        t['buildPhases'].add(script_phase.id)
-                    self.objects[script_phase.id] = script_phase
-                    result.append(script_phase)
-
-        return result
-
-    def add_run_script_all_targets(self, script=None):
-        result = []
-        targets = self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget')
-        if len(targets) != 0 :
-            script_phase = PBXShellScriptBuildPhase.Create(script)
-            for t in targets:
-                skip = False
-                for buildPhase in t['buildPhases']:
-                    if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
-                        skip = True
-
-                if not skip:
-                    t['buildPhases'].add(script_phase.id)
-                    self.objects[script_phase.id] = script_phase
-                    result.append(script_phase)
-
-        return result
-
-    def add_folder(self, os_path, parent=None, excludes=None, recursive=True, create_build_files=True):
-        if not os.path.isdir(os_path):
-            return []
-
-        if not excludes:
-            excludes = []
-
-        results = []
-
-        if not parent:
-            parent = self.root_group
-        elif not isinstance(parent, PBXGroup):
-            # assume it's an id
-            parent = self.objects.get(parent, self.root_group)
-
-        path_dict = {os.path.split(os_path)[0]: parent}
-        special_list = []
-
-        for (grp_path, subdirs, files) in os.walk(os_path):
-            parent_folder, folder_name = os.path.split(grp_path)
-            parent = path_dict.get(parent_folder, parent)
-
-            if [sp for sp in special_list if parent_folder.startswith(sp)]:
-                continue
-
-            if folder_name.startswith('.'):
-                special_list.append(grp_path)
-                continue
-
-            if os.path.splitext(grp_path)[1] in XcodeProject.special_folders:
-                # if this file has a special extension (bundle or framework mainly) treat it as a file
-                special_list.append(grp_path)
-                new_files = self.verify_files([folder_name], parent=parent)
-
-                # Ignore this file if it is in excludes
-                if new_files and not [m for m in excludes if re.match(m, grp_path)]:
-                    results.extend(self.add_file(grp_path, parent, create_build_files=create_build_files))
-
-                continue
-
-            # create group
-            grp = self.get_or_create_group(folder_name, path=self.get_relative_path(grp_path), parent=parent)
-            path_dict[grp_path] = grp
-
-            results.append(grp)
-
-            file_dict = {}
-
-            for f in files:
-                if f[0] == '.' or [m for m in excludes if re.match(m, f)]:
-                    continue
-
-                kwds = {
-                    'create_build_files': create_build_files,
-                    'parent': grp,
-                    'name': f
-                }
-
-                f_path = os.path.join(grp_path, f)
-                file_dict[f_path] = kwds
-
-            new_files = self.verify_files([n.get('name') for n in file_dict.values()], parent=grp)
-            add_files = [(k, v) for k, v in file_dict.items() if v.get('name') in new_files]
-
-            for path, kwds in add_files:
-                kwds.pop('name', None)
-                self.add_file(path, **kwds)
-
-            if not recursive:
-                break
-
-        for r in results:
-            self.objects[r.id] = r
-
-        return results
-
-    def path_leaf(self, path):
-        head, tail = ntpath.split(path)
-        return tail or ntpath.basename(head)
-
-    def add_file_if_doesnt_exist(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False):
-        for obj in self.objects.values():
-            if 'path' in obj:
-                if self.path_leaf(f_path) == self.path_leaf(obj.get('path')):
-                    return []
-
-        return self.add_file(f_path, parent, tree, create_build_files, weak, ignore_unknown_type=ignore_unknown_type)
-
-    def add_file(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False):
-        results = []
-        abs_path = ''
-
-        if os.path.isabs(f_path):
-            abs_path = f_path
-
-            if not os.path.exists(f_path):
-                return results
-            elif tree == 'SOURCE_ROOT':
-                f_path = os.path.relpath(f_path, self.source_root)
-            else:
-                tree = '<absolute>'
-
-        if not parent:
-            parent = self.root_group
-        elif not isinstance(parent, PBXGroup):
-            # assume it's an id
-            parent = self.objects.get(parent, self.root_group)
-
-        file_ref = PBXFileReference.Create(f_path, tree, ignore_unknown_type=ignore_unknown_type)
-        parent.add_child(file_ref)
-        results.append(file_ref)
-
-        # create a build file for the file ref
-        if file_ref.build_phase and create_build_files:
-            phases = self.get_build_phases(file_ref.build_phase)
-
-            for phase in phases:
-                build_file = PBXBuildFile.Create(file_ref, weak=weak)
-
-                phase.add_build_file(build_file)
-                results.append(build_file)
-
-            if abs_path and tree == 'SOURCE_ROOT' \
-                        and os.path.isfile(abs_path) \
-                        and file_ref.build_phase == 'PBXFrameworksBuildPhase':
-                library_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
-                self.add_library_search_paths([library_path], recursive=False)
-
-            if abs_path and tree == 'SOURCE_ROOT' \
-                        and not os.path.isfile(abs_path) \
-                        and file_ref.build_phase == 'PBXFrameworksBuildPhase':
-                framework_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
-                self.add_framework_search_paths([framework_path, '$(inherited)'], recursive=False)
-
-        for r in results:
-            self.objects[r.id] = r
-
-        if results:
-            self.modified = True
-
-        return results
-
-    def check_and_repair_framework(self, base):
-        name = os.path.basename(base)
-
-        if ".framework" in name:
-            basename = name[:-len(".framework")]
-
-            finalHeaders = os.path.join(base, "Headers")
-            finalCurrent = os.path.join(base, "Versions/Current")
-            finalLib = os.path.join(base, basename)
-            srcHeaders = "Versions/A/Headers"
-            srcCurrent = "A"
-            srcLib = "Versions/A/" + basename
-
-            if not os.path.exists(finalHeaders):
-                os.symlink(srcHeaders, finalHeaders)
-            if not os.path.exists(finalCurrent):
-                os.symlink(srcCurrent, finalCurrent)
-            if not os.path.exists(finalLib):
-                os.symlink(srcLib, finalLib)
-
-
-    def get_file_id_by_path(self, f_path):
-        for k, v in self.objects.iteritems():
-            if str(v.get('path')) == f_path:
-                return k
-        return 0
-
-
-    def remove_file_by_path(self, f_path, recursive=True):
-        id = self.get_file_id_by_path(f_path)
-        if id != 0:
-            self.remove_file(id, recursive=recursive)
-        return
-
-
-    def remove_file(self, id, recursive=True):
-        if not PBXType.IsGuid(id):
-            id = id.id
-
-        if id in self.objects:
-            self.objects.remove(id)
-            # Remove from PBXResourcesBuildPhase and PBXSourcesBuildPhase if necessary
-            buildFiles = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile']
-            for buildFile in buildFiles:
-                if id == buildFile.get('fileRef'):
-                    key = buildFile.id
-                    PBXRBP = [f for f in self.objects.values() if f.get('isa') == 'PBXResourcesBuildPhase']
-                    PBXSBP = [f for f in self.objects.values() if f.get('isa') == 'PBXSourcesBuildPhase']
-                    self.objects.remove(key)
-                    if len(PBXSBP) and PBXSBP[0].has_build_file(key):
-                        PBXSBP[0].remove_build_file(key)
-                    if len(PBXRBP) and PBXRBP[0].has_build_file(key):
-                        PBXRBP[0].remove_build_file(key)
-            if recursive:
-                groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup']
-
-                for group in groups:
-                    if id in group['children']:
-                        group.remove_child(id)
-
-            self.modified = True
-
-    def remove_group(self, id, recursive = True):
-        if not PBXType.IsGuid(id):
-            id = id.id
-        name = self.objects.get(id).get('path')
-        children = self.objects.get(id).get('children')
-        if name is None:
-            name = id
-        if id in self.objects:
-            if recursive:
-                for childKey in children:
-                    childValue = self.objects.get(childKey)
-                    if childValue.get('isa') == 'PBXGroup':
-                        self.remove_group(childKey, True)
-                    else:
-                        self.remove_file(childKey, False)
-
-        self.objects.remove(id);
-
-    def remove_group_by_name(self, name, recursive = True):
-        groups = self.get_groups_by_name(name)
-        if len(groups):
-            for group in groups:
-                self.remove_group(group.id, recursive)
-
-    def move_file(self, id, dest_grp=None):
-        pass
-
-    def apply_patch(self, patch_path, xcode_path):
-        if not os.path.isfile(patch_path) or not os.path.isdir(xcode_path):
-            print 'ERROR: couldn\'t apply "%s" to "%s"' % (patch_path, xcode_path)
-            return
-
-        print 'applying "%s" to "%s"' % (patch_path, xcode_path)
-
-        return subprocess.call(['patch', '-p1', '--forward', '--directory=%s' % xcode_path, '--input=%s' % patch_path])
-
-    def apply_mods(self, mod_dict, default_path=None):
-        if not default_path:
-            default_path = os.getcwd()
-
-        keys = mod_dict.keys()
-
-        for k in keys:
-            v = mod_dict.pop(k)
-            mod_dict[k.lower()] = v
-
-        parent = mod_dict.pop('group', None)
-
-        if parent:
-            parent = self.get_or_create_group(parent)
-
-        excludes = mod_dict.pop('excludes', [])
-
-        if excludes:
-            excludes = [re.compile(e) for e in excludes]
-
-        compiler_flags = mod_dict.pop('compiler_flags', {})
-
-        for k, v in mod_dict.items():
-            if k == 'patches':
-                for p in v:
-                    if not os.path.isabs(p):
-                        p = os.path.join(default_path, p)
-
-                    self.apply_patch(p, self.source_root)
-            elif k == 'folders':
-                # get and compile excludes list
-                # do each folder individually
-                for folder in v:
-                    kwds = {}
-
-                    # if path contains ':' remove it and set recursive to False
-                    if ':' in folder:
-                        args = folder.split(':')
-                        kwds['recursive'] = False
-                        folder = args.pop(0)
-
-                    if os.path.isabs(folder) and os.path.isdir(folder):
-                        pass
-                    else:
-                        folder = os.path.join(default_path, folder)
-                        if not os.path.isdir(folder):
-                            continue
-
-                    if parent:
-                        kwds['parent'] = parent
-
-                    if excludes:
-                        kwds['excludes'] = excludes
-
-                    self.add_folder(folder, **kwds)
-            elif k == 'headerpaths' or k == 'librarypaths':
-                paths = []
-
-                for p in v:
-                    if p.endswith('/**'):
-                        p = os.path.split(p)[0]
-
-                    if not os.path.isabs(p):
-                        p = os.path.join(default_path, p)
-
-                    if not os.path.exists(p):
-                        continue
-
-                    p = self.get_relative_path(p)
-                    paths.append(os.path.join('$(SRCROOT)', p, "**"))
-
-                if k == 'headerpaths':
-                    self.add_header_search_paths(paths)
-                else:
-                    self.add_library_search_paths(paths)
-            elif k == 'other_cflags':
-                self.add_other_cflags(v)
-            elif k == 'other_ldflags':
-                self.add_other_ldflags(v)
-            elif k == 'libs' or k == 'frameworks' or k == 'files':
-                paths = {}
-
-                for p in v:
-                    kwds = {}
-
-                    if ':' in p:
-                        args = p.split(':')
-                        p = args.pop(0)
-
-                        if 'weak' in args:
-                            kwds['weak'] = True
-
-                    file_path = os.path.join(default_path, p)
-                    search_path, file_name = os.path.split(file_path)
-
-                    if [m for m in excludes if re.match(m, file_name)]:
-                        continue
-
-                    try:
-                        expr = re.compile(file_name)
-                    except re.error:
-                        expr = None
-
-                    if expr and os.path.isdir(search_path):
-                        file_list = os.listdir(search_path)
-
-                        for f in file_list:
-                            if [m for m in excludes if re.match(m, f)]:
-                                continue
-
-                            if re.search(expr, f):
-                                kwds['name'] = f
-                                paths[os.path.join(search_path, f)] = kwds
-                                p = None
-
-                    if k == 'libs':
-                        kwds['parent'] = self.get_or_create_group('Libraries', parent=parent)
-                    elif k == 'frameworks':
-                        kwds['parent'] = self.get_or_create_group('Frameworks', parent=parent)
-
-                    if p:
-                        kwds['name'] = file_name
-
-                        if k == 'libs':
-                            p = os.path.join('usr', 'lib', p)
-                            kwds['tree'] = 'SDKROOT'
-                        elif k == 'frameworks':
-                            p = os.path.join('System', 'Library', 'Frameworks', p)
-                            kwds['tree'] = 'SDKROOT'
-                        elif k == 'files' and not os.path.exists(file_path):
-                            # don't add non-existent files to the project.
-                            continue
-
-                        paths[p] = kwds
-
-                new_files = self.verify_files([n.get('name') for n in paths.values()])
-                add_files = [(k, v) for k, v in paths.items() if v.get('name') in new_files]
-
-                for path, kwds in add_files:
-                    kwds.pop('name', None)
-
-                    if 'parent' not in kwds and parent:
-                        kwds['parent'] = parent
-
-                    self.add_file(path, **kwds)
-
-        if compiler_flags:
-            for k, v in compiler_flags.items():
-                filerefs = []
-
-                for f in v:
-                    filerefs.extend([fr.id for fr in self.objects.values() if fr.get('isa') == 'PBXFileReference'
-                                                                              and fr.get('name') == f])
-
-                buildfiles = [bf for bf in self.objects.values() if bf.get('isa') == 'PBXBuildFile'
-                                                                    and bf.get('fileRef') in filerefs]
-
-                for bf in buildfiles:
-                    if bf.add_compiler_flag(k):
-                        self.modified = True
-
-    def backup(self, file_name=None, backup_name=None):
-        if not file_name:
-            file_name = self.pbxproj_path
-
-        if not backup_name:
-            backup_name = "%s.%s.backup" % (file_name, datetime.datetime.now().strftime('%d%m%y-%H%M%S'))
-
-        shutil.copy2(file_name, backup_name)
-        return backup_name
-
-    def save(self, file_name=None, old_format=False, sort=False):
-        if old_format :
-            self.save_format_xml(file_name)
-        else:
-            self.save_new_format(file_name, sort)
-    
-    def save_format_xml(self, file_name=None):
-        """Saves in old (xml) format"""
-        if not file_name:
-            file_name = self.pbxproj_path
-
-        # This code is adapted from plistlib.writePlist
-        with open(file_name, "w") as f:
-            writer = PBXWriter(f)
-            writer.writeln("<plist version=\"1.0\">")
-            writer.writeValue(self.data)
-            writer.writeln("</plist>")
-
-    def save_new_format(self, file_name=None, sort=False):
-        """Save in Xcode 3.2 compatible (new) format"""
-        if not file_name:
-            file_name = self.pbxproj_path
-
-        # process to get the section's info and names
-        objs = self.data.get('objects')
-        sections = dict()
-        uuids = dict()
-
-        for key in objs:
-            l = list()
-
-            if objs.get(key).get('isa') in sections:
-                l = sections.get(objs.get(key).get('isa'))
-
-            l.append(tuple([key, objs.get(key)]))
-            sections[objs.get(key).get('isa')] = l
-
-            if 'name' in objs.get(key):
-                uuids[key] = objs.get(key).get('name')
-            elif 'path' in objs.get(key):
-                uuids[key] = objs.get(key).get('path')
-            else:
-                if objs.get(key).get('isa') == 'PBXProject':
-                    uuids[objs.get(key).get('buildConfigurationList')] = 'Build configuration list for PBXProject "Unity-iPhone"'
-                elif objs.get(key).get('isa')[0:3] == 'PBX':
-                    uuids[key] = objs.get(key).get('isa')[3:-10]
-                else:
-                    uuids[key] = 'Build configuration list for PBXNativeTarget "TARGET_NAME"'
-
-        ro = self.data.get('rootObject')
-        uuids[ro] = 'Project object'
-
-        for key in objs:
-            # transitive references (used in the BuildFile section)
-            if 'fileRef' in objs.get(key) and objs.get(key).get('fileRef') in uuids:
-                uuids[key] = uuids[objs.get(key).get('fileRef')]
-
-            # transitive reference to the target name (used in the Native target section)
-            if objs.get(key).get('isa') == 'PBXNativeTarget':
-                uuids[objs.get(key).get('buildConfigurationList')] = uuids[objs.get(key).get('buildConfigurationList')].replace('TARGET_NAME', uuids[key])
-
-        self.uuids = uuids
-        self.sections = sections
-
-        out = open(file_name, 'w')
-        out.write('// !$*UTF8*$!\n')
-        self._printNewXCodeFormat(out, self.data, '', enters=True, sort=sort)
-        out.close()
-
-    @classmethod
-    def addslashes(cls, s):
-        d = {'"': '\\"', "'": "\\'", "\0": "\\\0", "\\": "\\\\", "\n":"\\n"}
-        return ''.join(d.get(c, c) for c in s)
-
-    def _printNewXCodeFormat(self, out, root, deep, enters=True, sort=False):
-        if isinstance(root, IterableUserDict):
-            out.write('{')
-
-            if enters:
-                out.write('\n')
-
-            isa = root.pop('isa', '')
-
-            if isa != '':  # keep the isa in the first spot
-                if enters:
-                    out.write('\t' + deep)
-
-                out.write('isa = ')
-                self._printNewXCodeFormat(out, isa, '\t' + deep, enters=enters)
-                out.write(';')
-
-                if enters:
-                    out.write('\n')
-                else:
-                    out.write(' ')
-
-            for key in sorted(root.iterkeys()):  # keep the same order as Apple.
-                if enters:
-                    out.write('\t' + deep)
-
-                if re.match(regex, key).group(0) == key:
-                    out.write(key.encode("utf-8") + ' = ')
-                else:
-                    out.write('"' + key.encode("utf-8") + '" = ')
-
-                if key == 'objects':
-                    out.write('{')  # open the objects section
-
-                    if enters:
-                        out.write('\n')
-                        #root.remove('objects')  # remove it to avoid problems
-
-                    sections = [
-                        ('PBXBuildFile', False),
-                        ('PBXCopyFilesBuildPhase', True),
-                        ('PBXFileReference', False),
-                        ('PBXFrameworksBuildPhase', True),
-                        ('PBXGroup', True),
-                        ('PBXAggregateTarget', True),
-                        ('PBXNativeTarget', True),
-                        ('PBXProject', True),
-                        ('PBXResourcesBuildPhase', True),
-                        ('PBXShellScriptBuildPhase', True),
-                        ('PBXSourcesBuildPhase', True),
-                        ('XCBuildConfiguration', True),
-                        ('XCConfigurationList', True),
-                        ('PBXTargetDependency', True),
-                        ('PBXVariantGroup', True),
-                        ('PBXReferenceProxy', True),
-                        ('PBXContainerItemProxy', True),
-                        ('XCVersionGroup', True)]
-
-                    for section in sections:  # iterate over the sections
-                        if self.sections.get(section[0]) is None:
-                            continue
-
-                        out.write('\n/* Begin %s section */' % section[0].encode("utf-8"))
-                        self.sections.get(section[0]).sort(cmp=lambda x, y: cmp(x[0], y[0]))
-
-                        if sort and section[0] == 'PBXGroup':
-                            for entry in self.sections.get(section[0]):
-                                entry[1]['children'] = sorted(entry[1]['children'],
-                                                              key=lambda x: self.uuids[x].encode("utf-8"))
-
-                        for pair in self.sections.get(section[0]):
-                            key = pair[0]
-                            value = pair[1]
-                            out.write('\n')
-
-                            if enters:
-                                out.write('\t\t' + deep)
-
-                            out.write(key.encode("utf-8"))
-
-                            if key in self.uuids:
-                                out.write(" /* " + self.uuids[key].encode("utf-8") + " */")
-
-                            out.write(" = ")
-                            self._printNewXCodeFormat(out, value, '\t\t' + deep, enters=section[1])
-                            out.write(';')
-
-                        out.write('\n/* End %s section */\n' % section[0].encode("utf-8"))
-
-                    out.write(deep + '\t}')  # close of the objects section
-                else:
-                    self._printNewXCodeFormat(out, root[key], '\t' + deep, enters=enters)
-
-                out.write(';')
-
-                if enters:
-                    out.write('\n')
-                else:
-                    out.write(' ')
-
-            root['isa'] = isa  # restore the isa for further calls
-
-            if enters:
-                out.write(deep)
-
-            out.write('}')
-
-        elif isinstance(root, UserList):
-            out.write('(')
-
-            if enters:
-                out.write('\n')
-
-            for value in root:
-                if enters:
-                    out.write('\t' + deep)
-
-                self._printNewXCodeFormat(out, value, '\t' + deep, enters=enters)
-                out.write(',')
-
-                if enters:
-                    out.write('\n')
-
-            if enters:
-                out.write(deep)
-
-            out.write(')')
-
-        else:
-            if len(root) > 0 and re.match(regex, root).group(0) == root:
-                out.write(root.encode("utf-8"))
-            else:
-                out.write('"' + XcodeProject.addslashes(root.encode("utf-8")) + '"')
-
-            if root in self.uuids:
-                out.write(" /* " + self.uuids[root].encode("utf-8") + " */")
-
-    @classmethod
-    def Load(cls, path, pure_python=False):
-        if pure_python:
-            import openstep_parser as osp
-            tree = osp.OpenStepDecoder.ParseFromFile(open(path, 'r'))
-        else:
-            cls.plutil_path = os.path.join(os.path.split(__file__)[0], 'plutil')
-
-            if not os.path.isfile(XcodeProject.plutil_path):
-                cls.plutil_path = 'plutil'
-
-            # load project by converting to xml and then convert that using plistlib
-            p = subprocess.Popen([XcodeProject.plutil_path, '-convert', 'xml1', '-o', '-', path], stdout=subprocess.PIPE)
-            stdout, stderr = p.communicate()
-
-            # If the plist was malformed, return code will be non-zero
-            if p.returncode != 0:
-                print stdout
-                return None
-
-            tree = plistlib.readPlistFromString(stdout)
-        return XcodeProject(tree, path)
-
-    @classmethod
-    def LoadFromXML(cls, path):
-        tree = plistlib.readPlist(path)
-        return XcodeProject(tree, path)
-
-
-# The code below was adapted from plistlib.py.
-
-class PBXWriter(plistlib.PlistWriter):
-    def writeValue(self, value):
-        if isinstance(value, (PBXList, PBXDict)):
-            plistlib.PlistWriter.writeValue(self, value.data)
-        else:
-            plistlib.PlistWriter.writeValue(self, value)
-
-    def simpleElement(self, element, value=None):
-        """
-        We have to override this method to deal with Unicode text correctly.
-        Non-ascii characters have to get encoded as character references.
-        """
-        if value is not None:
-            value = _escapeAndEncode(value)
-            self.writeln("<%s>%s</%s>" % (element, value, element))
-        else:
-            self.writeln("<%s/>" % element)
-
-
-# Regex to find any control chars, except for \t \n and \r
-_controlCharPat = re.compile(
-    r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f"
-    r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]")
-
-
-def _escapeAndEncode(text):
-    m = _controlCharPat.search(text)
-    if m is not None:
-        raise ValueError("strings can't contains control characters; "
-                         "use plistlib.Data instead")
-    text = text.replace("\r\n", "\n")       # convert DOS line endings
-    text = text.replace("\r", "\n")         # convert Mac line endings
-    text = text.replace("&", "&amp;")       # escape '&'
-    text = text.replace("<", "&lt;")        # escape '<'
-    text = text.replace(">", "&gt;")        # escape '>'
-    return text.encode("ascii", "xmlcharrefreplace")  # encode as ascii with xml character references

+ 0 - 6
Assets/Editor/Vungle/mod_pbxproj.py.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: f81a59b31f40843e8bfded2d482bae92
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Editor/Vungle/mod_pbxproj.pyc


+ 0 - 6
Assets/Editor/Vungle/mod_pbxproj.pyc.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: eb6634a5db6574636941a321df1ea73b
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 36
Assets/Editor/VungleBuildHelper.cs

@@ -1,36 +0,0 @@
-using System;
-using UnityEditor;
-using UnityEngine;
-
-class VungleBuildHelper
-{
-#if UNITY_5
-    [UnityEditor.MenuItem("Tools/Vungle/Prepare Windows 10 Build")]
-    static void prepareWin10()
-    {
-        PluginImporter pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/VungleSDKProxy.winmd");
-        pi.SetPlatformData(BuildTarget.WSAPlayer, "PlaceholderPath", "Assets/Plugins/VungleSDKProxy.dll");
-        pi.SaveAndReimport();
-        pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/VungleSDK.winmd");
-        pi.SetPlatformData(BuildTarget.WSAPlayer, "SDK", "SDK81");
-        pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/UWP/VungleSDK.winmd");
-        pi.SetCompatibleWithPlatform(BuildTarget.WSAPlayer, true);
-        pi.SetPlatformData(BuildTarget.WSAPlayer, "SDK", "UWP");
-        pi.SaveAndReimport();
-    }
-
-    [UnityEditor.MenuItem("Tools/Vungle/Prepare Windows 8.1 Build")]
-    static void prepareWin81()
-    {
-        PluginImporter pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/VungleSDKProxy.winmd");
-        pi.SetPlatformData(BuildTarget.WSAPlayer, "PlaceholderPath", "Assets/Plugins/VungleSDKProxy.dll");
-        pi.SaveAndReimport();
-        pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/VungleSDK.winmd");
-        pi.SetPlatformData(BuildTarget.WSAPlayer, "SDK", "SDK81");
-        pi.SaveAndReimport();
-        pi = (PluginImporter)PluginImporter.GetAtPath("Assets/Plugins/Metro/UWP/VungleSDK.winmd");
-        pi.SetCompatibleWithPlatform(BuildTarget.WSAPlayer, false);
-        pi.SaveAndReimport();
-    }
-#endif
-}

+ 0 - 10
Assets/Editor/VungleBuildHelper.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 86a2377d37271477ab314c54669a142c
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 25
Assets/Plugins/Android/Vungle_lib.meta

@@ -1,25 +0,0 @@
-fileFormatVersion: 2
-guid: e7d71943040445e488eb7b08bd1c5080
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  isOverridable: 0
-  platformData:
-    Android:
-      enabled: 1
-      settings: {}
-    Any:
-      enabled: 0
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 34
Assets/Plugins/Android/Vungle_lib/AndroidManifest.xml

@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest
-	xmlns:android="http://schemas.android.com/apk/res/android"
-	android:versionCode="1"
-	android:versionName="1.0"
-	package="com.pushok.test">
-	
-  <application
-	  android:icon="@drawable/app_icon"
-	  android:label="@string/app_name"
-	  android:theme="@android:style/Theme.NoTitleBar">
-      <activity
-		  android:label="@string/app_name"
-		  android:screenOrientation="fullSensor"
-		  android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
-		  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-      		  android:name="com.vungle.publisher.VideoFullScreenAdActivity">
-      </activity>
-      <activity android:name="com.vungle.publisher.MraidFullScreenAdActivity"
-	    android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
-	    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
-       <activity android:name="com.vungle.publisher.FlexViewAdActivity"
-        android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
-        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
-  </application>
-  
-  <uses-permission android:name="android.permission.INTERNET"/>
-  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-  <uses-permission
-        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
-        android:maxSdkVersion="18"/>
-
-  
-</manifest>

+ 0 - 6
Assets/Plugins/Android/Vungle_lib/AndroidManifest.xml.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 8b4a880971e6e40efa865c20bb0a4f68
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/Android/Vungle_lib/libs.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: e763be11c3bba0e4b84ebd1d0105f81f
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/Android/Vungle_lib/libs/vunglePlugin.jar


+ 0 - 6
Assets/Plugins/Android/Vungle_lib/libs/vunglePlugin.jar.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 058af1a0e31f4474786c3451366d3375
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/Android/Vungle_lib/libs/vunglePub.jar


+ 0 - 6
Assets/Plugins/Android/Vungle_lib/libs/vunglePub.jar.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 0dcfb490e4ef94e92afe9144d777e375
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 15
Assets/Plugins/Android/Vungle_lib/project.properties

@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-9
-android.library=true

+ 0 - 6
Assets/Plugins/Android/Vungle_lib/project.properties.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: cc01cb9d575ea4913a0ad6af08bd357a
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/OneWaySDK.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 496f78a11665a47a09348f06ef296227
-folderAsset: yes
-timeCreated: 1492516440
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/OneWaySDK/Android.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: ab8ee478d895f4dcbacc89914abee9e4
-folderAsset: yes
-timeCreated: 1492593726
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/OneWaySDK/Android/OneWaySdkPlugin.jar


+ 0 - 33
Assets/Plugins/OneWaySDK/Android/OneWaySdkPlugin.jar.meta

@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 45f05adbd0aa445d08e089f711350955
-timeCreated: 1494817666
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 2
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  isOverridable: 0
-  platformData:
-    data:
-      first:
-        Android: Android
-      second:
-        enabled: 1
-        settings: {}
-    data:
-      first:
-        Any: 
-      second:
-        enabled: 0
-        settings: {}
-    data:
-      first:
-        Editor: Editor
-      second:
-        enabled: 0
-        settings:
-          DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/OneWaySDK/Android/onewaysdk130.jar


+ 0 - 33
Assets/Plugins/OneWaySDK/Android/onewaysdk130.jar.meta

@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 8b5073866c36248be9e8106cb728606e
-timeCreated: 1494844900
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 2
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  isOverridable: 0
-  platformData:
-    data:
-      first:
-        Android: Android
-      second:
-        enabled: 1
-        settings: {}
-    data:
-      first:
-        Any: 
-      second:
-        enabled: 0
-        settings: {}
-    data:
-      first:
-        Editor: Editor
-      second:
-        enabled: 0
-        settings:
-          DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 547
Assets/Plugins/OneWaySDK/MiniJSONV.cs

@@ -1,547 +0,0 @@
-/*
- * Copyright (c) 2013 Calvin Rien
- *
- * Based on the JSON parser by Patrick van Bergen
- * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
- *
- * Simplified it so that it doesn't throw exceptions
- * and can be used in Unity iPhone with maximum code stripping.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-
-namespace MiniJSONV {
-	// Example usage:
-	//
-	//  using UnityEngine;
-	//  using System.Collections;
-	//  using System.Collections.Generic;
-	//  using MiniJSON;
-	//
-	//  public class MiniJSONTest : MonoBehaviour {
-	//      void Start () {
-	//          var jsonString = "{ \"array\": [1.44,2,3], " +
-	//                          "\"object\": {\"key1\":\"value1\", \"key2\":256}, " +
-	//                          "\"string\": \"The quick brown fox \\\"jumps\\\" over the lazy dog \", " +
-	//                          "\"unicode\": \"\\u3041 Men\u00fa sesi\u00f3n\", " +
-	//                          "\"int\": 65536, " +
-	//                          "\"float\": 3.1415926, " +
-	//                          "\"bool\": true, " +
-	//                          "\"null\": null }";
-	//
-	//          var dict = Json.Deserialize(jsonString) as Dictionary<string,object>;
-	//
-	//          Debug.Log("deserialized: " + dict.GetType());
-	//          Debug.Log("dict['array'][0]: " + ((List<object>) dict["array"])[0]);
-	//          Debug.Log("dict['string']: " + (string) dict["string"]);
-	//          Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles
-	//          Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs
-	//          Debug.Log("dict['unicode']: " + (string) dict["unicode"]);
-	//
-	//          var str = Json.Serialize(dict);
-	//
-	//          Debug.Log("serialized: " + str);
-	//      }
-	//  }
-
-	/// <summary>
-	/// This class encodes and decodes JSON strings.
-	/// Spec. details, see http://www.json.org/
-	///
-	/// JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary.
-	/// All numbers are parsed to doubles.
-	/// </summary>
-	public static class Json {
-		/// <summary>
-		/// Parses the string json into a value
-		/// </summary>
-		/// <param name="json">A JSON string.</param>
-		/// <returns>An List&lt;object&gt;, a Dictionary&lt;string, object&gt;, a double, an integer,a string, null, true, or false</returns>
-		public static object Deserialize(string json) {
-			// save the string for debug information
-			if (json == null) {
-				return null;
-			}
-
-			return Parser.Parse(json);
-		}
-
-		sealed class Parser : IDisposable {
-			const string WORD_BREAK = "{}[],:\"";
-
-			public static bool IsWordBreak(char c) {
-				return Char.IsWhiteSpace(c) || WORD_BREAK.IndexOf(c) != -1;
-			}
-
-			enum TOKEN {
-				NONE,
-				CURLY_OPEN,
-				CURLY_CLOSE,
-				SQUARED_OPEN,
-				SQUARED_CLOSE,
-				COLON,
-				COMMA,
-				STRING,
-				NUMBER,
-				TRUE,
-				FALSE,
-				NULL
-			};
-
-			StringReader json;
-
-			Parser(string jsonString) {
-				json = new StringReader(jsonString);
-			}
-
-			public static object Parse(string jsonString) {
-				using (var instance = new Parser(jsonString)) {
-					return instance.ParseValue();
-				}
-			}
-
-			public void Dispose() {
-				json.Dispose();
-				json = null;
-			}
-
-			Dictionary<string, object> ParseObject() {
-				Dictionary<string, object> table = new Dictionary<string, object>();
-
-				// ditch opening brace
-				json.Read();
-
-				// {
-				while (true) {
-					switch (NextToken) {
-					case TOKEN.NONE:
-						return null;
-					case TOKEN.COMMA:
-						continue;
-					case TOKEN.CURLY_CLOSE:
-						return table;
-					default:
-						// name
-						string name = ParseString();
-						if (name == null) {
-							return null;
-						}
-
-						// :
-						if (NextToken != TOKEN.COLON) {
-							return null;
-						}
-						// ditch the colon
-						json.Read();
-
-						// value
-						table[name] = ParseValue();
-						break;
-					}
-				}
-			}
-
-			List<object> ParseArray() {
-				List<object> array = new List<object>();
-
-				// ditch opening bracket
-				json.Read();
-
-				// [
-				var parsing = true;
-				while (parsing) {
-					TOKEN nextToken = NextToken;
-
-					switch (nextToken) {
-					case TOKEN.NONE:
-						return null;
-					case TOKEN.COMMA:
-						continue;
-					case TOKEN.SQUARED_CLOSE:
-						parsing = false;
-						break;
-					default:
-						object value = ParseByToken(nextToken);
-
-						array.Add(value);
-						break;
-					}
-				}
-
-				return array;
-			}
-
-			object ParseValue() {
-				TOKEN nextToken = NextToken;
-				return ParseByToken(nextToken);
-			}
-
-			object ParseByToken(TOKEN token) {
-				switch (token) {
-				case TOKEN.STRING:
-					return ParseString();
-				case TOKEN.NUMBER:
-					return ParseNumber();
-				case TOKEN.CURLY_OPEN:
-					return ParseObject();
-				case TOKEN.SQUARED_OPEN:
-					return ParseArray();
-				case TOKEN.TRUE:
-					return true;
-				case TOKEN.FALSE:
-					return false;
-				case TOKEN.NULL:
-					return null;
-				default:
-					return null;
-				}
-			}
-
-			string ParseString() {
-				StringBuilder s = new StringBuilder();
-				char c;
-
-				// ditch opening quote
-				json.Read();
-
-				bool parsing = true;
-				while (parsing) {
-
-					if (json.Peek() == -1) {
-						parsing = false;
-						break;
-					}
-
-					c = NextChar;
-					switch (c) {
-					case '"':
-						parsing = false;
-						break;
-					case '\\':
-						if (json.Peek() == -1) {
-							parsing = false;
-							break;
-						}
-
-						c = NextChar;
-						switch (c) {
-						case '"':
-						case '\\':
-						case '/':
-							s.Append(c);
-							break;
-						case 'b':
-							s.Append('\b');
-							break;
-						case 'f':
-							s.Append('\f');
-							break;
-						case 'n':
-							s.Append('\n');
-							break;
-						case 'r':
-							s.Append('\r');
-							break;
-						case 't':
-							s.Append('\t');
-							break;
-						case 'u':
-							var hex = new char[4];
-
-							for (int i=0; i< 4; i++) {
-								hex[i] = NextChar;
-							}
-
-							s.Append((char) Convert.ToInt32(new string(hex), 16));
-							break;
-						}
-						break;
-					default:
-						s.Append(c);
-						break;
-					}
-				}
-
-				return s.ToString();
-			}
-
-			object ParseNumber() {
-				string number = NextWord;
-
-				if (number.IndexOf('.') == -1) {
-					long parsedInt;
-					Int64.TryParse(number, out parsedInt);
-					return parsedInt;
-				}
-
-				double parsedDouble;
-				Double.TryParse(number, out parsedDouble);
-				return parsedDouble;
-			}
-
-			void EatWhitespace() {
-				while (Char.IsWhiteSpace(PeekChar)) {
-					json.Read();
-
-					if (json.Peek() == -1) {
-						break;
-					}
-				}
-			}
-
-			char PeekChar {
-				get {
-					return Convert.ToChar(json.Peek());
-				}
-			}
-
-			char NextChar {
-				get {
-					return Convert.ToChar(json.Read());
-				}
-			}
-
-			string NextWord {
-				get {
-					StringBuilder word = new StringBuilder();
-
-					while (!IsWordBreak(PeekChar)) {
-						word.Append(NextChar);
-
-						if (json.Peek() == -1) {
-							break;
-						}
-					}
-
-					return word.ToString();
-				}
-			}
-
-			TOKEN NextToken {
-				get {
-					EatWhitespace();
-
-					if (json.Peek() == -1) {
-						return TOKEN.NONE;
-					}
-
-					switch (PeekChar) {
-					case '{':
-						return TOKEN.CURLY_OPEN;
-					case '}':
-						json.Read();
-						return TOKEN.CURLY_CLOSE;
-					case '[':
-						return TOKEN.SQUARED_OPEN;
-					case ']':
-						json.Read();
-						return TOKEN.SQUARED_CLOSE;
-					case ',':
-						json.Read();
-						return TOKEN.COMMA;
-					case '"':
-						return TOKEN.STRING;
-					case ':':
-						return TOKEN.COLON;
-					case '0':
-					case '1':
-					case '2':
-					case '3':
-					case '4':
-					case '5':
-					case '6':
-					case '7':
-					case '8':
-					case '9':
-					case '-':
-						return TOKEN.NUMBER;
-					}
-
-					switch (NextWord) {
-					case "false":
-						return TOKEN.FALSE;
-					case "true":
-						return TOKEN.TRUE;
-					case "null":
-						return TOKEN.NULL;
-					}
-
-					return TOKEN.NONE;
-				}
-			}
-		}
-
-		/// <summary>
-		/// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string
-		/// </summary>
-		/// <param name="json">A Dictionary&lt;string, object&gt; / List&lt;object&gt;</param>
-		/// <returns>A JSON encoded string, or null if object 'json' is not serializable</returns>
-		public static string Serialize(object obj) {
-			return Serializer.Serialize(obj);
-		}
-
-		sealed class Serializer {
-			StringBuilder builder;
-
-			Serializer() {
-				builder = new StringBuilder();
-			}
-
-			public static string Serialize(object obj) {
-				var instance = new Serializer();
-
-				instance.SerializeValue(obj);
-
-				return instance.builder.ToString();
-			}
-
-			void SerializeValue(object value) {
-				IList asList;
-				IDictionary asDict;
-				string asStr;
-
-				if (value == null) {
-					builder.Append("null");
-				} else if ((asStr = value as string) != null) {
-					SerializeString(asStr);
-				} else if (value is bool) {
-					builder.Append((bool) value ? "true" : "false");
-				} else if ((asList = value as IList) != null) {
-					SerializeArray(asList);
-				} else if ((asDict = value as IDictionary) != null) {
-					SerializeObject(asDict);
-				} else if (value is char) {
-					SerializeString(new string((char) value, 1));
-				} else {
-					SerializeOther(value);
-				}
-			}
-
-			void SerializeObject(IDictionary obj) {
-				bool first = true;
-
-				builder.Append('{');
-
-				foreach (object e in obj.Keys) {
-					if (!first) {
-						builder.Append(',');
-					}
-
-					SerializeString(e.ToString());
-					builder.Append(':');
-
-					SerializeValue(obj[e]);
-
-					first = false;
-				}
-
-				builder.Append('}');
-			}
-
-			void SerializeArray(IList anArray) {
-				builder.Append('[');
-
-				bool first = true;
-
-				foreach (object obj in anArray) {
-					if (!first) {
-						builder.Append(',');
-					}
-
-					SerializeValue(obj);
-
-					first = false;
-				}
-
-				builder.Append(']');
-			}
-
-			void SerializeString(string str) {
-				builder.Append('\"');
-
-				char[] charArray = str.ToCharArray();
-				foreach (var c in charArray) {
-					switch (c) {
-					case '"':
-						builder.Append("\\\"");
-						break;
-					case '\\':
-						builder.Append("\\\\");
-						break;
-					case '\b':
-						builder.Append("\\b");
-						break;
-					case '\f':
-						builder.Append("\\f");
-						break;
-					case '\n':
-						builder.Append("\\n");
-						break;
-					case '\r':
-						builder.Append("\\r");
-						break;
-					case '\t':
-						builder.Append("\\t");
-						break;
-					default:
-						int codepoint = Convert.ToInt32(c);
-						if ((codepoint >= 32) && (codepoint <= 126)) {
-							builder.Append(c);
-						} else {
-							builder.Append("\\u");
-							builder.Append(codepoint.ToString("x4"));
-						}
-						break;
-					}
-				}
-
-				builder.Append('\"');
-			}
-
-			void SerializeOther(object value) {
-				// NOTE: decimals lose precision during serialization.
-				// They always have, I'm just letting you know.
-				// Previously floats and doubles lost precision too.
-				if (value is float) {
-					builder.Append(((float) value).ToString("R"));
-				} else if (value is int
-				           || value is uint
-				           || value is long
-				           || value is sbyte
-				           || value is byte
-				           || value is short
-				           || value is ushort
-				           || value is ulong) {
-					builder.Append(value);
-				} else if (value is double
-				           || value is decimal) {
-					builder.Append(Convert.ToDouble(value).ToString("R"));
-				} else {
-					SerializeString(value.ToString());
-				}
-			}
-		}
-	}
-}

+ 0 - 12
Assets/Plugins/OneWaySDK/MiniJSONV.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: f72f3b85259044e6fa0a7eb3c670e206
-timeCreated: 1492576005
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 236
Assets/Plugins/OneWaySDK/OneWaySDK.cs

@@ -1,236 +0,0 @@
-using UnityEngine;
-using System.Collections;
-using System.Runtime.InteropServices;
-using System;
-using System.Collections.Generic;
-using System.Threading;
-
-
-public class OneWaySDK : MonoBehaviour
-{
-	public static AndroidJavaObject _plugin;
-
-	// Use this for initialization
-	void Start () {
-	
-	}
-	
-	// Update is called once per frame
-	void Update () {
-	}
-
-	public enum OneWaySDKPlacementState
-	{
-
-     //A state that indicates that the placement is ready to show an ad. The `show:` selector can be called.
-	kOneWaySDKPlacementStateReady = 0,
-	
-     // A state that indicates that no state is information is available.
-     // @warning This state can that OneWaySDK is not initialized or that the placement is not correctly configured in the oneway ads admin tool.
-	kOneWaySDKPlacementStateNotAvailable,
-	
-	//  A state that indicates that the placement is currently disabled. The placement can be enabled in the oneway ads admin tools.
-	kOneWaySDKPlacementStateDisabled,
-	
-	//  A state that indicates that the placement is not currently ready, but will be in the future.
-	//  @note This state most likely indicates that the ad content is currently caching.
-	kOneWaySDKPlacementStateWaiting,
-	
-	// A state that indicates that the placement is properly configured, but there are currently no ads available for the placement.
-	kOneWaySDKPlacementStateNoFill
-	};
-
-	public enum OneWaySDKFinishState
-	{
-		kOneWaySDKFinishStateError = 0,
-
-		kOneWaySDKFinishStateSkipped ,
-	
-		kOneWaySDKFinishStateCompleted
-	};
-
-	public enum OneWaySDKError
-	{
-	
-     // An error that indicates failure due to `OneWaySDK` currently being uninitialized.
-	kOneWaySDKErrorNotInitialized = 0,
-	
-     // An error that indicates failure due to a failure in the initialization process.
-	kOneWaySDKErrorInitializedFailed,
-	
-     // An error that indicates failure due to attempting to initialize `OneWaySDK` with invalid parameters.
-	kOneWaySDKErrorInvalidArgument,
-	
-     // An error that indicates failure of the video player.
-	kOneWaySDKErrorVideoPlayerError,
-	
-     // An error that indicates failure due to having attempted to initialize the `OneWaySDK` class in an invalid environment.
-	kOneWaySDKErrorInitSanityCheckFail,
-	
-     // An error that indicates failure due to the presence of an ad blocker.
-	kOneWaySDKErrorAdBlockerDetected,
-	
-     // An error that indicates failure due to inability to read or write a file.
-	kOneWaySDKErrorFileIoError,
-	
-     // An error that indicates failure due to a bad device identifier.
-	kOneWaySDKErrorDeviceIdError,
-
-	// An error that indicates a failure when attempting to show an ad.
-	kOneWaySDKErrorShowError,
-	
-	// An error that indicates an internal failure in `OneWaySDK`.
-	kOneWaySDKErrorInternalError,
-	
-	// A state that indicates that the SDK is properly configured, but there are currently no ads available.
-	kOneWaySDKCampaignNoFill
-	}
-
-	#region Constructor and Lifecycle
-
-	static OneWaySDK()
-	{
-//		 try/catch this so that we can warn users if they try to stick this script on a GO manually
-
-		try
-		{
-			// create a new GO for our manager
-			var go = new GameObject( "OneWaySDK" );
-			go.AddComponent<OneWaySDK>();
-			DontDestroyOnLoad( go );
-		}
-		catch( UnityException ) {
-			Debug.LogWarning ("It looks like you have the OneWaySDK on a GameObject in your scene. Please remove the script from your scene.");
-		}
-
-		#if UNITY_ANDROID
-
-		using( var pluginClass = new AndroidJavaClass( "mobi.oneway.OneWaySdkPlugin" ) )
-		_plugin = pluginClass.CallStatic<AndroidJavaObject>( "instance" );
-
-		#endif
-
-
-	}
-
-
-	// used to ensure the VungleManager will always be in the scene to avoid SendMessage logs if the user isn't using any events
-
-	public static void noop(){}
-
-	#endregion
-
-
-
-	#region Events
-
-	// Fired when a Vungle ad starts
-	public static event Action <string> onOneWaySDKReadyEvent;
-
-	public static event Action <string> onOneWaySDKDidStartEvent;
-
-	public static event Action <string,string> onOneWaySDKDidFinishEvent;
-
-	public static event Action <string,string> onOneWaySDKDidErrorEvent;
-
-	#endregion
-
-	void onOneWaySDKReady (string placementID) {
-		try{
-			onOneWaySDKReadyEvent (placementID);
-		}catch(Exception e){
-			print("-------------- OneWaySDK Warning : Method 'onOneWaySDKReadyEvent ' not implemented --------------"+e.Message);
-		}
-	}
-
-	void onOneWaySDKDidStart (string placementID) {
-		try{
-			onOneWaySDKDidStartEvent (placementID);
-		}catch(Exception e){
-			Debug.LogWarning ("-------------- OneWaySDK Warning : Method 'onOneWaySDKDidStartEvent ' not implemented --------------"+e.Message);
-		}
-		 
-	
-	}
-
-	void onOneWaySDKDidFinish (string msg) {
-
-		Dictionary<string,object> attrs = (Dictionary<string,object>) MiniJSONV.Json.Deserialize( msg );
-
-		try{
-			onOneWaySDKDidFinishEvent (attrs["placementId"].ToString(),attrs["state"].ToString());
-		}catch(Exception e){
-			Debug.LogWarning ("-------------- OneWaySDK Warning : Method 'onOneWaySDKDidFinishEvent ' not implemented --------------"+e.Message);
-		}
-
-
-	}
-
-	void onOneWaySDKDidError (string msg) {
-
-		Dictionary<string,object> attrs = (Dictionary<string,object>) MiniJSONV.Json.Deserialize( msg );
-
-
-		try{
-			onOneWaySDKDidErrorEvent (attrs["error"].ToString(),attrs["message"].ToString());
-		}catch(Exception e){
-			Debug.LogWarning ("-------------- OneWaySDK Warning : Method 'onOneWaySDKDidErrorEvent ' not implemented --------------"+e.Message);
-		}
-	}
-
-
-	//  init
-	[DllImport ("__Internal")]
-	private static extern void _OneWaySDKInit(string PId,bool debugMode);
-	public static void init(string iOSPId , string androidPId, bool debugMode)
-	{
-		#if UNITY_IPHONE
-		_OneWaySDKInit( iOSPId, debugMode);
-		#elif UNITY_ANDROID
-		_plugin.Call("init",androidPId,debugMode);
-		#endif
-	}
-
-
-	// show
-	[DllImport ("__Internal")]
-	private static extern void _OneWaySDKShow();
-	public static void show()
-	{
-		#if UNITY_IPHONE
-		_OneWaySDKShow();
-		#elif UNITY_ANDROID
-		_plugin.Call("showOneWayAd");
-		#endif
-
-	}
-
-
-	//ShowPlacementID
-	[DllImport ("__Internal")]
-	private static extern void _OneWaySDKShowPlacementID(string placementID);
-	public static void showPlacementID(string placementID)
-	{
-		#if UNITY_IPHONE
-		_OneWaySDKShowPlacementID(placementID);
-		#elif UNITY_ANDROID
-		_plugin.Call("showPlacementID",placementID);
-		#endif
-
-
-	}
-
-	//isReady
-	[DllImport ("__Internal")]
-	private static extern bool _OneWaySDKIsReady();
-	public static bool IsReady()
-	{
-#if UNITY_IPHONE
-		return _OneWaySDKIsReady();
-#elif UNITY_ANDROID
-		return _plugin.Call<bool>("isVideoAvailable");
-#else
-	    return false;
-#endif
-	}
-}

+ 0 - 12
Assets/Plugins/OneWaySDK/OneWaySDK.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 8798c98fe58dc4353a3e948510dd81c7
-timeCreated: 1492506338
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/OneWaySDK/iOS.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: f9e961f4546e64b5eb546261666041d9
-folderAsset: yes
-timeCreated: 1492593690
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/OneWaySDK/iOS/OWUserMetaData.h

@@ -1,9 +0,0 @@
-
-
-
-@interface OWUserMetaData : NSObject
-
-- (void)set:(NSString *)key value:(id)value;
-- (void)commit;
-
-@end

+ 0 - 20
Assets/Plugins/OneWaySDK/iOS/OWUserMetaData.h.meta

@@ -1,20 +0,0 @@
-fileFormatVersion: 2
-guid: 92c709f1c58684dcf95d7f3135153c57
-timeCreated: 1492507244
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  platformData:
-    Any:
-      enabled: 1
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 260
Assets/Plugins/OneWaySDK/iOS/OneWaySDK.h

@@ -1,260 +0,0 @@
-#import <UIKit/UIKit.h>
-
-#import "OWUserMetaData.h"
-
-/**
- *  An enumerate that describes the state of `OneWaySDK` placements. 
- *  @note All placement states, other than `kOneWaySDKPlacementStateReady`, indicate that the placement is not currently ready to show ads.
- */
-typedef NS_ENUM(NSInteger, OneWaySDKPlacementState) {
-    /**
-     *  A state that indicates that the placement is ready to show an ad. The `show:` selector can be called.
-     */
-    kOneWaySDKPlacementStateReady,
-    /**
-     *  A state that indicates that no state is information is available.
-     *  @warning This state can that OneWaySDK is not initialized or that the placement is not correctly configured in the oneway ads admin tool.
-     */
-    kOneWaySDKPlacementStateNotAvailable,
-    /**
-     *  A state that indicates that the placement is currently disabled. The placement can be enabled in the oneway ads admin tools.
-     */
-    kOneWaySDKPlacementStateDisabled,
-    /**
-     *  A state that indicates that the placement is not currently ready, but will be in the future.
-     *  @note This state most likely indicates that the ad content is currently caching.
-     */
-    kOneWaySDKPlacementStateWaiting,
-    /**
-     *  A state that indicates that the placement is properly configured, but there are currently no ads available for the placement.
-     */
-    kOneWaySDKPlacementStateNoFill
-};
-
-
-/**
- *  An enumeration for the completion state of an ad.
- */
-typedef NS_ENUM(NSInteger, OneWaySDKFinishState) {
-    /**
-     *  A state that indicates that the ad did not successfully display.
-     */
-    kOneWaySDKFinishStateError,
-    /**
-     *  A state that indicates that the user skipped the ad.
-     */
-    kOneWaySDKFinishStateSkipped,
-    /**
-     *  A state that indicates that the ad was played entirely.
-     */
-    kOneWaySDKFinishStateCompleted
-};
-
-/**
- *  An enumeration for the various errors that can be emitted through the `OneWaySDKDelegate` `OneWaySDKDidError:withMessage:` method.
- */
-typedef NS_ENUM(NSInteger, OneWaySDKError) {
-    /**
-     *  An error that indicates failure due to `OneWaySDK` currently being uninitialized.
-     */
-    kOneWaySDKErrorNotInitialized = 0,
-    /**
-     *  An error that indicates failure due to a failure in the initialization process.
-     */
-    kOneWaySDKErrorInitializedFailed,
-    /**
-     *  An error that indicates failure due to attempting to initialize `OneWaySDK` with invalid parameters.
-     */
-    kOneWaySDKErrorInvalidArgument,
-    /**
-     *  An error that indicates failure of the video player.
-     */
-    kOneWaySDKErrorVideoPlayerError,
-    /**
-     *  An error that indicates failure due to having attempted to initialize the `OneWaySDK` class in an invalid environment.
-     */
-    kOneWaySDKErrorInitSanityCheckFail,
-    /**
-     *  An error that indicates failure due to the presence of an ad blocker.
-     */
-    kOneWaySDKErrorAdBlockerDetected,
-    /**
-     *  An error that indicates failure due to inability to read or write a file.
-     */
-    kOneWaySDKErrorFileIoError,
-    /**
-     *  An error that indicates failure due to a bad device identifier.
-     */
-    kOneWaySDKErrorDeviceIdError,
-    /**
-     *  An error that indicates a failure when attempting to show an ad.
-     */
-    kOneWaySDKErrorShowError,
-    /**
-     *  An error that indicates an internal failure in `OneWaySDK`.
-     */
-    kOneWaySDKErrorInternalError,
-    /**
-     *  A state that indicates that the SDK is properly configured, but there are currently no ads available.
-     */
-    kOneWaySDKCampaignNoFill,
-
-};
-
-/**
- *  The `OneWaySDKDelegate` protocol defines the required methods for receiving messages from OneWaySDK.
- *  Must be implemented by the hosting app.
- *  The OneWaySDKReady: method is called when it's possible to show an ad.
- *  All other methods are used to provide notifications of events of the ad lifecycle.
- *  @note On initialization, there are ready (or error) callbacks for each placement attached to the publish identifier.
- */
-NS_ASSUME_NONNULL_BEGIN
-@protocol OneWaySDKDelegate <NSObject>
-/**
- *  Called when `OneWaySDK` is ready to show an ad. After this callback you can call the `OneWaySDK` `show:` method for this placement.
- *  Note that sometimes placement might no longer be ready due to exceptional reasons. These situations will give no new callbacks.
- *
- *  @warning To avoid error situations, it is always best to check `isReady` method status before calling show.
- *  @param placementId The ID of the placement that is ready to show, as defined in oneway ads admin tools.
- */
-- (void)oneWaySDKReady:(NSString *)placementId;
-/**
- *  Called when `OneWaySDK` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios.
- *
- *  @param error   A `OneWaySDKError` error enum value indicating the type of error encountered.
- *  @param message A human readable string indicating the type of error encountered.
- */
-- (void)oneWaySDKDidError:(OneWaySDKError)error withMessage:(NSString *)message;
-/**
- *  Called on a successful start of advertisement after calling the `OneWaySDK` `show:` method.
- *  
- * @warning If there are errors in starting the advertisement, this method may never be called. oneway ads will directly call `oneWaySDKDidFinish:withFinishState:` with error status.
- *
- *  @param placementId The ID of the placement that has started, as defined in oneway ads admin tools.
- */
-- (void)oneWaySDKDidStart:(NSString *)placementId;
-/**
- *  Called after the ad has closed.
- *
- *  @param placementId The ID of the placement that has finished, as defined in oneway ads admin tools.
- *  @param state       An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`, and `Error`.
- */
-- (void)oneWaySDKDidFinish:(NSString *)placementId
-          withFinishState:(OneWaySDKFinishState)state;
-@end
-
-/**
- * `oneWaySDK` is a static class with methods for preparing and showing ads.
- *
- * @warning In order to ensure expected behaviour, the delegate must always be set.
- */
-
-@interface OneWaySDK : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)initialize NS_UNAVAILABLE;
-
-/**
- *  Initializes oneWaySDK. oneWaySDK should be initialized when app starts.
- *
- *  @param publishId   Unique identifier for a game, given by oneway ads admin tools or OneWay editor.
- *  @param delegate delegate for OneWaySDKDelegate callbacks
- */
-+ (void)initialize:(NSString *)publishId
-          delegate:(nullable id<OneWaySDKDelegate>)delegate;
-/**
- *  Initializes oneWaySDK. oneWaySDK should be initialized when app starts.
- *
- *  @param publishId   Unique identifier for a game, given by oneway ads admin tools or OneWay editor.
- *  @param delegate delegate for OneWaySDKDelegate callbacks
- *  @param testMode Set this flag to `YES` to indicate test mode and show only test ads.
- */
-+ (void)initialize:(NSString *)publishId
-          delegate:(nullable id<OneWaySDKDelegate>)delegate
-          testMode:(BOOL)testMode;
-/**
- *  Show an ad using the defaul placement.
- *
- *  @param viewController The `UIViewController` that is to present the ad view controller.
- */
-+ (void)show:(UIViewController *)viewController;
-/**
- *  Show an ad using the provided placement ID.
- *
- *  @param viewController The `UIViewController` that is to present the ad view controller.
- *  @param placementId    The placement ID, as defined in oneway ads admin tools.
- */
-+ (void)show:(UIViewController *)viewController placementId:(NSString *)placementId;
-/**
- *  Provides the currently assigned `OneWaySDKDelegate`.
- *
- *  @return The current `OneWaySDKDelegate`.
- */
-+ (id<OneWaySDKDelegate>)getDelegate;
-/**
- *  Allows the delegate to be reassigned after oneWaySDK has already been initialized.
- *
- *  @param delegate The new `OneWaySDKDelegate' for OneWaySDK to send callbacks to.
- */
-+ (void)setDelegate:(id<OneWaySDKDelegate>)delegate;
-/**
- *  Get the current debug status of `oneWaySDK`.
- *
- *  @return If `YES`, `oneWaySDK` will provide verbose logs.
- */
-+ (BOOL)getDebugMode;
-/**
- *  Set the logging verbosity of `oneWaySDK`. Debug mode indicates verbose logging.
- *  @warning Does not relate to test mode for ad content.
- *  @param enableDebugMode `YES` for verbose logging.
- */
-+ (void)setDebugMode:(BOOL)enableDebugMode;
-/**
- *  Check to see if the current device supports using oneway ads.
- *
- *  @return If `NO`, the current device cannot initialize `oneWaySDK` or show ads.
- */
-+ (BOOL)isSupported;
-/**
- *  Check if the default placement is ready to show an ad.
- *
- *  @return If `YES`, the default placement is ready to show an ad.
- */
-+ (BOOL)isReady;
-/**
- *  Check if a particular placement is ready to show an ad.
- *
- *  @param placementId The placement ID being checked.
- *
- *  @return If `YES`, the placement is ready to show an ad.
- */
-+ (BOOL)isReady:(NSString *)placementId;
-/**
- *  Check the current state of the default placement.
- *
- *  @return If this is `kOneWaySDKPlacementStateReady`, the placement is ready to show ads. Other states represent errors.
- */
-+ (OneWaySDKPlacementState)getPlacementState;
-/**
- *  Check the current state of a placement.
- *
- *  @param placementId The placement ID, as defined in oneway ads admin tools.
- *
- *  @return If this is `kOneWaySDKPlacementStateReady`, the placement is ready to show ads. Other states represent errors.
- */
-+ (OneWaySDKPlacementState)getPlacementState:(NSString *)placementId;
-/**
- *  Check the version of this `oneWaySDK` SDK
- *
- *  @return String representing the current version name.
- */
-+ (NSString *)getVersion;
-/**
- *  Check that `oneWaySDK` has been initialized. This might be useful for debugging initialization problems.
- *
- *  @return If `YES`, oneway ads has been successfully initialized.
- */
-+ (BOOL)isInitialized;
-
-@end
-NS_ASSUME_NONNULL_END

+ 0 - 20
Assets/Plugins/OneWaySDK/iOS/OneWaySDK.h.meta

@@ -1,20 +0,0 @@
-fileFormatVersion: 2
-guid: 979f998485c2c4574a871b8e9c4a3e50
-timeCreated: 1492507244
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  platformData:
-    Any:
-      enabled: 1
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.h

@@ -1,9 +0,0 @@
-
-#import "OneWaySDK.h"
-
-#import <UIKit/UIKit.h>
-#import "UnityInterface.h"
-
-@interface OneWaySDKBridge : NSObject <OneWaySDKDelegate>
-
-@end

+ 0 - 20
Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.h.meta

@@ -1,20 +0,0 @@
-fileFormatVersion: 2
-guid: d71df1d077aa54901ad95a36d62d0b60
-timeCreated: 1492570411
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  platformData:
-    Any:
-      enabled: 1
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 70
Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.m

@@ -1,70 +0,0 @@
-#import "OneWaySDKBridge.h"
-
-static OneWaySDKBridge *_OneWaySDKBridgeSingleton;
-
-void _OneWaySDKInit(char *pID,bool debugMode)
-{
-    if (_OneWaySDKBridgeSingleton == nil) {
-        _OneWaySDKBridgeSingleton = [[OneWaySDKBridge alloc] init];
-    }
-    NSString *pIDString = [NSString stringWithUTF8String:pID];
-    
-    [OneWaySDK initialize:pIDString delegate:_OneWaySDKBridgeSingleton testMode:debugMode];
-}
-
-void _OneWaySDKShowPlacementID(char *PlacementId)
-{
-    NSString *Placement = [NSString stringWithUTF8String:PlacementId];
-    
-    if ([OneWaySDK isReady:Placement]) {
-        [OneWaySDK show:UnityGetMainWindow().rootViewController placementId:Placement];
-    }
-}
-
-
-void _OneWaySDKShow(void)
-{
-    [OneWaySDK show:UnityGetMainWindow().rootViewController];
-}
-
-BOOL _OneWaySDKIsReady(void)
-{
-    return [OneWaySDK isReady];
-}
-
-
-
-
-@implementation OneWaySDKBridge :NSObject
-
-- (void)oneWaySDKReady:(NSString *)placementId{
-    UnitySendMessage([@"OneWaySDK" UTF8String], [@"onOneWaySDKReady" UTF8String],[placementId UTF8String]);
-}
-
-- (void)oneWaySDKDidStart:(NSString *)placementId{
-    UnitySendMessage([@"OneWaySDK" UTF8String], [@"onOneWaySDKDidStart" UTF8String],[placementId UTF8String]);
-}
-
-- (void)oneWaySDKDidFinish:(NSString *)placementId withFinishState:(OneWaySDKFinishState)state{
-    
-    NSDictionary *dict = @{@"placementId":placementId,@"state":[NSString stringWithFormat:@"%ld",(long)state]};
-    
-    NSError *error;
-    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&error];
-    NSString *jsonStr =[[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    
-    UnitySendMessage([@"OneWaySDK" UTF8String], [@"onOneWaySDKDidFinish" UTF8String],[jsonStr UTF8String]);
-}
-
-- (void)oneWaySDKDidError:(OneWaySDKError)error withMessage:(NSString *)message{
-    
-    NSDictionary *dict = @{@"error":[NSString stringWithFormat:@"%ld",(long)error],@"message":message};
-    
-    NSError *err;
-    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&err];
-    NSString *jsonStr =[[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    UnitySendMessage([@"OneWaySDK" UTF8String], [@"onOneWaySDKDidError" UTF8String],[jsonStr UTF8String]);
-}
-
-
-@end

+ 0 - 26
Assets/Plugins/OneWaySDK/iOS/OneWaySDKBridge.m.meta

@@ -1,26 +0,0 @@
-fileFormatVersion: 2
-guid: 2110a1ee3aa36478f88e195ee0562f42
-timeCreated: 1492572430
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  platformData:
-    Any:
-      enabled: 0
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-    iOS:
-      enabled: 1
-      settings: {}
-    tvOS:
-      enabled: 1
-      settings: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/OneWaySDK/iOS/OnewaySDK.a


+ 0 - 20
Assets/Plugins/OneWaySDK/iOS/OnewaySDK.a.meta

@@ -1,20 +0,0 @@
-fileFormatVersion: 2
-guid: a7048b0109e7a4a7ca330dfc662eea9c
-timeCreated: 1492507244
-licenseType: Pro
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  platformData:
-    Any:
-      enabled: 1
-      settings: {}
-    Editor:
-      enabled: 0
-      settings:
-        DefaultValueInitialized: true
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/Vungle.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 6925de1cc7587474198f2ed26aa7d9ef
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 12
Assets/Plugins/Vungle/AdFinishedEventArgs.cs

@@ -1,12 +0,0 @@
-using System;
-
-public class AdFinishedEventArgs : EventArgs
-{
-	public bool WasCallToActionClicked{ get; set;}
-
-	public bool IsCompletedView{ get; set;}
-
-	public double TimeWatched{ get; set;}
-}
-
-

+ 0 - 10
Assets/Plugins/Vungle/AdFinishedEventArgs.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: a3bbdd0cb6dfd408f9926bd11511ce7c
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/Vungle/Android.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: bd356649e50058446923f94065bb9e4a
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 113
Assets/Plugins/Vungle/Android/VungleAndroid.cs

@@ -1,113 +0,0 @@
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-
-#if UNITY_ANDROID
-public enum VungleGender
-{
-	None = -1,
-	Male = 0,
-	Female
-}
-
-
-public enum VungleAdOrientation
-{
-	AutoRotate,
-    MatchVideo
-}
-
-public class VungleAndroid
-{
-	private static AndroidJavaObject _plugin;
-
-	static VungleAndroid() {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		VungleManager.noop();
-
-		using(var pluginClass = new AndroidJavaClass("com.vungle.VunglePlugin"))
-			_plugin = pluginClass.CallStatic<AndroidJavaObject>("instance");
-	}
-
-	// Starts up the SDK with the given appId
-	public static void init(string appId, string[] placements, string pluginVersion) {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		_plugin.Call("init", appId, placements, pluginVersion);
-	}
-
-	// Call this when your application is sent to the background
-	public static void onPause() {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		_plugin.Call( "onPause" );
-	}
-
-	// Call this when your application resumes
-	public static void onResume() {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		_plugin.Call( "onResume" );
-	}
-
-	// Checks to see if a video is available
-	public static bool isVideoAvailable(string placementID) {
-		if (Application.platform != RuntimePlatform.Android)
-			return false;
-
-		return _plugin.Call<bool>("isVideoAvailable", placementID);
-	}
-
-	// Sets if sound should be enabled or not
-	public static void setSoundEnabled(bool isEnabled) {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		_plugin.Call( "setSoundEnabled", isEnabled );
-	}
-
-	// Sets the allowed orientations of any ads that are displayed
-	public static void setAdOrientation(VungleAdOrientation orientation) {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-
-		_plugin.Call("setAdOrientation", (int)orientation);
-	}
-
-	// Checks to see if sound is enabled
-	public static bool isSoundEnabled()	{
-		if (Application.platform != RuntimePlatform.Android)
-			return true;
-
-		return _plugin.Call<bool>("isSoundEnabled");
-	}
-
-	// Loads an ad
-	public static void loadAd(string placementID) {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-		
-		_plugin.Call("loadAd", placementID);
-	}
-	
-	public static void playAd(string placementID)
-	{
-		Dictionary<string,object> options = new Dictionary<string,object> ();
-		playAd(options, placementID);
-	}
-	
-	// Plays an ad with the given options.
-	public static void playAd(Dictionary<string,object> options, string placementID) {
-		if (Application.platform != RuntimePlatform.Android)
-			return;
-		
-		_plugin.Call("playAd", MiniJSONV.Json.Serialize(options), placementID);
-	}
-}
-#endif
-

+ 0 - 10
Assets/Plugins/Vungle/Android/VungleAndroid.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 0feb2b4de47084429b4be7fd6ebdf23d
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 337
Assets/Plugins/Vungle/Vungle.cs

@@ -1,337 +0,0 @@
-using UnityEngine;
-using System;
-using System.Collections;
-using System.Text;
-using System.Collections.Generic;
-using System.Threading;
-
-#pragma warning disable 618
-#pragma warning disable 162
-#pragma warning disable 67
-
-public class Vungle
-{
-	//Change this constant fields when a new version of the plugin or sdk was released
-	private const string PLUGIN_VERSION = "4.1.3";
-	private const string IOS_SDK_VERSION = "5.1.0";
-	private const string WIN_SDK_VERSION = "2.0.8";
-	private const string ANDROID_SDK_VERSION = "5.1.0";
-
-	#region Events
-
-	// Fired when a Vungle ad starts
-	public static event Action<string> onAdStartedEvent;
-	
-	//Fired when a Vungle ad finished and provides the entire information about this event.
-	public static event Action<string, AdFinishedEventArgs> onAdFinishedEvent; 
-
-	// Fired when a Vungle ad is ready to be displayed
-	public static event Action<string, bool> adPlayableEvent;
-	
-	// Fired when a Vungle SDK initialized
-	public static event Action onInitializeEvent;
-	
-	// Fired log event from sdk.
-	public static event Action<string> onLogEvent;
-
-
-#if (!VUNGLE_AD_OFF)
-	static void adStarted(string placementID)
-	{
-		if( onAdStartedEvent != null )
-			#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			VungleSceneLoom.Loom.QueueOnMainThread(() =>
-				{
-					onAdStartedEvent(placementID);
-				});
-			#else
-			onAdStartedEvent(placementID);
-			#endif
-	}
-
-	static void adPlayable(string placementID, bool playable)
-	{
-		if( adPlayableEvent != null )
-			#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			VungleSceneLoom.Loom.QueueOnMainThread(() =>
-				{
-					adPlayableEvent(placementID, playable);
-				});
-			#else
-			adPlayableEvent(placementID, playable);
-			#endif
-	}
-	
-	static void onLog(string log)
-	{
-		if( onLogEvent != null )
-			#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			VungleSceneLoom.Loom.QueueOnMainThread(() =>
-				{
-					onLogEvent(log);
-				});
-			#else
-			onLogEvent(log);
-			#endif
-	}
-
-	static void adFinished(string placementID, AdFinishedEventArgs args)
-	{
-		if (onAdFinishedEvent != null)
-			#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			VungleSceneLoom.Loom.QueueOnMainThread(() =>
-				{
-					onAdFinishedEvent(placementID, args);
-				});
-			#else
-			onAdFinishedEvent(placementID, args);
-			#endif
-	}
-
-	static void onInitialize()
-	{
-		if (onInitializeEvent != null)
-			#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			VungleSceneLoom.Loom.QueueOnMainThread(() =>
-				{
-					onInitializeEvent();
-				});
-			#else
-			onInitializeEvent();
-			#endif
-	}
-#endif
-
-	#endregion
-
-	public static string VersionInfo
-	{
-		get
-		{
-#if (!VUNGLE_AD_OFF)
-			StringBuilder stringBuilder = new StringBuilder("unity-");
-			#if UNITY_IPHONE
-			return stringBuilder.Append(PLUGIN_VERSION).Append("/iOS-").Append(IOS_SDK_VERSION).ToString();
-			#elif UNITY_ANDROID
-			return stringBuilder.Append(PLUGIN_VERSION).Append("/android-").Append(ANDROID_SDK_VERSION).ToString();
-			#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-			return stringBuilder.Append(PLUGIN_VERSION).Append("/windows-").Append(WIN_SDK_VERSION).ToString();
-			#else
-			return stringBuilder.Append(PLUGIN_VERSION).ToString();
-			#endif
-#else
-			return "OFF";
-#endif
-		}
-	}
-
-	static Vungle()
-	{
-#if (!VUNGLE_AD_OFF)
-		VungleManager.OnAdStartEvent += adStarted;
-		VungleManager.OnAdFinishedEvent += adFinished;
-		VungleManager.OnAdPlayableEvent += adPlayable;
-		VungleManager.OnSDKLogEvent += onLog;
-		VungleManager.OnSDKInitializeEvent += onInitialize;
-#endif
-	}
-
-	// Initializes the Vungle SDK. Pass in your Android and iOS app ID's from the Vungle web portal.
-	public static void init(string appId, string[] placements)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-        return;
-#endif
-#if UNITY_IPHONE
-		VungleBinding.startWithAppId(appId, placements, PLUGIN_VERSION);
-#elif UNITY_ANDROID
-		VungleAndroid.init(appId, placements, PLUGIN_VERSION);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-        VungleWin.init(appId, PLUGIN_VERSION, placements);
-		VungleSceneLoom.Initialize();
-#endif
-#endif
-    }
-
-
-    // Sets if sound should be enabled or not
-    public static void setSoundEnabled(bool isEnabled)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-		return;
-#endif
-#if UNITY_IPHONE
-		VungleBinding.setSoundEnabled(isEnabled);
-#elif UNITY_ANDROID
-		VungleAndroid.setSoundEnabled(isEnabled);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-        VungleWin.setSoundEnabled(isEnabled);
-#endif
-#endif
-	}
-
-
-	// Checks to see if a video is available
-	public static bool isAdvertAvailable(string placementID)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-		return false;
-#endif
-#if UNITY_IPHONE
-		return VungleBinding.isAdAvailable(placementID);
-#elif UNITY_ANDROID
-		return VungleAndroid.isVideoAvailable(placementID);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-        return VungleWin.isVideoAvailable(placementID);
-#else
-		return false;
-#endif
-#else
-		return false;
-#endif
-	}
-
-	// Displays an ad with the no options. The user option is only supported for incentivized ads.
-	public static void loadAd(string placementID)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-		return;
-#endif
-#if UNITY_IPHONE
-		VungleBinding.loadAd(placementID);
-#elif UNITY_ANDROID
-		VungleAndroid.loadAd(placementID);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-		VungleWin.loadAd( placementID );
-#endif
-#endif
-	}
-
-	// Displays an ad with the no options. The user option is only supported for incentivized ads.
-	public static void playAd(string placementID)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-		return;
-#endif
-#if UNITY_IPHONE
-		VungleBinding.playAd(placementID);
-#elif UNITY_ANDROID
-		VungleAndroid.playAd(placementID);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-		VungleWin.playAd(placementID );
-#endif
-#endif
-	}
-	
-	// Displays an ad with the given options. The user option is only supported for incentivized ads.
-	public static void playAd(Dictionary<string,object> options, string placementID)
-	{
-#if (!VUNGLE_AD_OFF)
-#if UNITY_EDITOR
-		return;
-#endif
-		if(options == null) {
-			options = new Dictionary<string, object>();
-		}
-#if UNITY_IPHONE
-		VungleBinding.playAd(options, placementID);
-#elif UNITY_ANDROID
-		VungleAndroid.playAd(options, placementID);
-#elif UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-        VungleWin.playAd( options, placementID );
-#endif
-#endif
-	}
-	
-	// Clear sleep
-	public static void clearSleep()
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return;
-		#endif
-		#if UNITY_IPHONE
-		VungleBinding.clearSleep();
-		#elif UNITY_ANDROID
-		#else
-		#endif
-#endif
-	}
-	
-	public static void setEndPoint(string endPoint)
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return;
-		#endif
-		#if UNITY_IPHONE
-		VungleBinding.setEndPoint(endPoint);
-		#elif UNITY_ANDROID
-		#else
-		return;
-		#endif
-#endif
-	}
-
-	public static void setLogEnable(bool enable)
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return;
-		#endif
-		#if UNITY_IPHONE
-		VungleBinding.enableLogging(enable);
-		#elif UNITY_ANDROID
-		#else
-		return;
-		#endif
-#endif
-	}
-	
-	public static string getEndPoint()
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return "";
-		#endif
-		#if UNITY_IPHONE
-		return VungleBinding.getEndPoint();
-		#elif UNITY_ANDROID
-		return "";
-		#else
-		return "";
-		#endif
-#else
-		return "";
-#endif
-	}
-	
-	public static void onResume()
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return;
-		#endif
-		#if UNITY_ANDROID
-		VungleAndroid.onResume();
-		#endif
-#endif
-	}
-
-	public static void onPause()
-	{
-#if (!VUNGLE_AD_OFF)
-		#if UNITY_EDITOR
-		return;
-		#endif
-		#if UNITY_ANDROID
-		VungleAndroid.onPause();
-		#endif
-#endif
-	}
-}

+ 0 - 10
Assets/Plugins/Vungle/Vungle.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 38dbbde506bb64eb1ad55b25bee94f8c
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 146
Assets/Plugins/Vungle/VungleManager.cs

@@ -1,146 +0,0 @@
-using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-#pragma warning disable 618
-
-public class VungleManager : MonoBehaviour
-{
-	private static AdFinishedEventArgs adWinFinishedEventArgs = null;
-
-	#region Constructor and Lifecycle
-
-	static VungleManager()
-	{
-		// try/catch this so that we can warn users if they try to stick this script on a GO manually
-		try
-		{
-			// create a new GO for our manager
-			var go = new GameObject( "VungleManager" );
-			go.AddComponent<VungleManager>();
-			DontDestroyOnLoad( go );
-		}
-		catch( UnityException )
-		{
-			Debug.LogWarning( "It looks like you have the VungleManager on a GameObject in your scene. Please remove the script from your scene." );
-		}
-	}
-
-
-	// used to ensure the VungleManager will always be in the scene to avoid SendMessage logs if the user isn't using any events
-	public static void noop(){}
-
-	#endregion
-	
-	// Fired when the video is shown
-	public static event Action<string> OnAdStartEvent;
-
-	// Fired when a Vungle ad is ready to be displayed
-	public static event Action<string, bool> OnAdPlayableEvent;
-
-	// Fired when a Vungle write log (implemented only for iOS)
-	public static event Action<string> OnSDKLogEvent;
-
-	//Fired when a Vungle ad finished and provides the entire information about this event.
-	public static event Action<string, AdFinishedEventArgs> OnAdFinishedEvent;
-
-	// Fired when a Vungle SDK initialized
-	public static event Action OnSDKInitializeEvent;
-
-	public static void onEvent(string e, string arg) {
-		if (e == "OnAdStart") {
-			OnAdStartEvent(arg);
-		}
-		if (e == "OnAdEnd") {
-			adWinFinishedEventArgs = new AdFinishedEventArgs();
-			
-			var args = arg.Split(new char[] { ':' });
-			adWinFinishedEventArgs.WasCallToActionClicked = "1".Equals (args[0]);
-			adWinFinishedEventArgs.IsCompletedView = bool.Parse(args[2]);
-			adWinFinishedEventArgs.TimeWatched = double.Parse(args[3]) / 1000;
-
-			OnAdFinishedEvent(args[1], adWinFinishedEventArgs);
-		}
-		if (e == "OnAdPlayableChanged") {
-			var args = arg.Split(new char[] { ':' });
-			OnAdPlayableEvent(args[1], "1".Equals (args[0]));
-		}
-		if (e == "Diagnostic") {
-			OnSDKLogEvent(arg);
-		}
-        if(e == "OnInitCompleted")
-        {
-            if("1".Equals(arg))
-                OnSDKInitializeEvent();
-        }
-	}
-
-	#region Native code will call these methods
-
-	//methods for ios and andriod platforms
-	void OnAdStart(string placementID) {
-		OnAdStartEvent(placementID);
-	}
-
-	void OnAdPlayable(string param)
-	{
-		Dictionary<string,object> attrs = (Dictionary<string,object>) MiniJSONV.Json.Deserialize(param);
-		bool isAdAvailable = extractBoolValue(attrs,"isAdAvailable");
-		string placementID = attrs["placementID"].ToString();
-		OnAdPlayableEvent(placementID, isAdAvailable);
-	}
-
-	void OnVideoView(string param) {
-		#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-		
-		#endif
-	}
-
-	void OnSDKLog(string log)
-	{
-		OnSDKLogEvent(log);
-	}
-
-	void OnInitialize(string empty)
-	{
-		OnSDKInitializeEvent();
-	}
-	
-	//methods only for android
-	void OnAdEnd(string param)
-	{
-		AdFinishedEventArgs args = new AdFinishedEventArgs();
-		Dictionary<string,object> attrs = (Dictionary<string,object>) MiniJSONV.Json.Deserialize(param);
-#if UNITY_ANDROID
-		args.WasCallToActionClicked = extractBoolValue(attrs,"wasCallToActionClicked");
-		args.IsCompletedView = extractBoolValue(attrs,"wasSuccessFulView");
-		args.TimeWatched = 0.0;
-#elif UNITY_IPHONE
-		//param is the json string
-		args.WasCallToActionClicked = extractBoolValue(attrs,"didDownload");
-		args.IsCompletedView = extractBoolValue(attrs,"completedView");
-		args.TimeWatched = double.Parse(attrs["playTime"].ToString());
-#endif
-		OnAdFinishedEvent(attrs["placementID"].ToString(), args);
-	}
-	
-	#endregion
-
-	#region util methods
-
-	private bool extractBoolValue(string json, string key)
-	{
-		Dictionary<string,object> attrs = (Dictionary<string,object>)MiniJSONV.Json.Deserialize( json );
-		return extractBoolValue (attrs, key);
-	}
-
-	private bool extractBoolValue(Dictionary<string,object> attrs, string key)
-	{
-		return bool.Parse( attrs[key].ToString() );
-	}
-
-	#endregion
-}
-
-

+ 0 - 10
Assets/Plugins/Vungle/VungleManager.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 366811c1922ea41eda1197afed551f06
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 82
Assets/Plugins/Vungle/VungleSceneLoom.cs

@@ -1,82 +0,0 @@
-using UnityEngine;
-using System.Collections.Generic;
-using Action=System.Action;
-
-public class VungleSceneLoom : MonoBehaviour
-{
-	public interface ILoom {
-		void QueueOnMainThread(Action action);
-	}
-
-	private static NullLoom _nullLoom = new NullLoom();
-	private static LoomDispatcher _loom;
-	private static VungleSceneLoom _instance;
-	static bool _initialized = false;
-
-	public static ILoom Loom {
-		get {
-			if (_loom != null) {
-				return _loom as ILoom;
-			}
-			return _nullLoom as ILoom;
-		}
-	}
-
-	void Awake() {
-		if (_instance != null && _instance != this)
-		{
-			Destroy(gameObject); 
-			return; 
-		}
-		_instance  = this;
-		DontDestroyOnLoad(gameObject);
-		_loom = new LoomDispatcher();
-	}
-
-	public static void Initialize() {
-		if (!_initialized)
-		{
-			var g = new GameObject("VungleSceneLoom");
-			_instance = g.AddComponent<VungleSceneLoom>();
-			_initialized = true;
-		}
-	}
-
-	void OnDestroy() {
-		_loom = null;
-	}
-
-	void Update() {
-		if (Application.isPlaying) {
-			_loom.Update();
-		}
-	}
-
-	private class NullLoom : ILoom {
-		public void QueueOnMainThread(Action action) {}
-	}
-
-	private class LoomDispatcher : ILoom {
-		private readonly List<Action> actions = new List<Action>();
-
-		public void QueueOnMainThread(Action action) {
-			lock (actions) {
-				actions.Add(action);
-			}
-		}
-
-		public void Update() {
-			// Pop the actions from the synchronized list
-			Action[] actionsToRun = null;
-			lock (actions) {
-				actionsToRun = actions.ToArray();
-				actions.Clear();
-			}
-
-			// Run each action
-			foreach (Action action in actionsToRun) {
-				action();
-			}
-		}
-	}
-}

+ 0 - 10
Assets/Plugins/Vungle/VungleSceneLoom.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 69535f1c2b59249c5a3e9faff2ec06df
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/Vungle/iOS.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: af2a4dd35f39cd14db20fa2c7ce5e556
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 124
Assets/Plugins/Vungle/iOS/VungleBinding.cs

@@ -1,124 +0,0 @@
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using System;
-
-
-#if UNITY_IPHONE
-public enum VungleAdOrientation
-{
-	Portrait = 1,
-    LandscapeLeft = 2,
-    LandscapeRight = 3,
-    PortraitUpsideDown = 4,
-    Landscape = 5,
-    All = 6,
-    AllButUpsideDown = 7
-}
-
-public class VungleBinding
-{
-	static VungleBinding()
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			VungleManager.noop();
-	}
-
-
-	[DllImport("__Internal")]
-	private static extern void _vungleStartWithAppId(string appId, string[] placements, int placementsCount, string pluginVersion);
-	// Starts up the SDK with the given appId
-	public static void startWithAppId(string appId, string[] placements, string pluginVersion)
-	{
-		if (Application.platform == RuntimePlatform.IPhonePlayer)
-			_vungleStartWithAppId(appId, placements, placements.Length, pluginVersion);
-	}
-
-
-	[DllImport("__Internal")]
-	private static extern void _vungleSetSoundEnabled( bool enabled );
-
-	// Enables/disables sound
-	public static void setSoundEnabled( bool enabled )
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vungleSetSoundEnabled( enabled );
-	}
-
-
-	[DllImport("__Internal")]
-	private static extern void _vungleEnableLogging( bool shouldEnable );
-
-	// Enables/disables verbose logging
-	public static void enableLogging( bool shouldEnable )
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vungleEnableLogging( shouldEnable );
-	}
-
-	[DllImport("__Internal")]
-	private static extern bool _vungleIsAdAvailable(string placementID);
-
-	// Checks to see if a video ad is available
-	public static bool isAdAvailable(string placementID)
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			return _vungleIsAdAvailable(placementID);
-		return false;
-	}
-	
-	[DllImport("__Internal")]
-	private static extern void _vungleLoadAd(string placementID);
-	
-	// Loads an ad
-	public static void loadAd(string placementID) {
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vungleLoadAd(placementID);
-	}
-	
-	[DllImport("__Internal")]
-	private static extern void _vunglePlayAd(string options, string placementID);
-	
-	// Plays an ad with the given options. The user option is only supported for incentivized ads.
-	public static void playAd(string placementID) {
-		Dictionary<string,object> options = new Dictionary<string,object> ();
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vunglePlayAd(MiniJSONV.Json.Serialize(options), placementID);
-	}
-
-	// Plays an ad with the given options. The user option is only supported for incentivized ads.
-	public static void playAd(Dictionary<string,object> options, string placementID) {
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vunglePlayAd(MiniJSONV.Json.Serialize(options), placementID);
-	}
-	
-	[DllImport("__Internal")]
-	private static extern void _vungleClearSleep();
-	
-	public static void clearSleep()
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vungleClearSleep();
-	}
-	
-	[DllImport("__Internal")]
-	private static extern void _vungleSetEndPoint(string endPoint);
-	
-	public static void setEndPoint(string endPoint)
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			_vungleSetEndPoint(endPoint);
-	}
-
-	[DllImport("__Internal")]
-	private static extern string _vungleGetEndPoint();
-	
-	public static string getEndPoint()
-	{
-		if( Application.platform == RuntimePlatform.IPhonePlayer )
-			return _vungleGetEndPoint();
-		return "";
-	}
-}
-#endif

+ 0 - 10
Assets/Plugins/Vungle/iOS/VungleBinding.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: bf3d79369b53148aeb780067a257eee9
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 9
Assets/Plugins/Vungle/win.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 1979ff6593a13954db88fb6e8d76dc43
-folderAsset: yes
-timeCreated: 1501174341
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 125
Assets/Plugins/Vungle/win/VungleWin.cs

@@ -1,125 +0,0 @@
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-using System;
-
-#if UNITY_WSA_10_0 || UNITY_WINRT_8_1 || UNITY_METRO
-using VungleSDKProxy;
-
-public enum VungleAdOrientation
-{
-	AutoRotate,
-	MatchVideo
-}
-
-public class VungleWin
-{
-	private static VungleAd sdk;
-	private static AdConfig cfg;
-	private static bool _isSoundEnabled = true;
-	private static VungleAdOrientation _orientation = VungleAdOrientation.AutoRotate;
-	
-	static VungleWin()
-	{
-	}
-
-	// Starts up the SDK with the given appId
-	public static void init( string appId, string version, params string[] placements )
-	{
-        VungleSDKConfig config = new VungleSDKConfig ();
-        config.SetPluginName ("unity");
-        config.SetPluginVersion (version);
-        config.SetApiEndpoint(new Uri("http://ads.api.vungle.com"));
-        sdk = AdFactory.GetInstance(appId, config, placements);
-        sdk.addOnEvent(VungleManager.onEvent);
-	}
-
-	// Call this when your application is sent to the background
-	public static void onPause()
-	{
-	}
-
-	// Call this when your application resumes
-	public static void onResume()
-	{
-	}
-
-	// Checks to see if a video is available
-	public static bool isVideoAvailable(string placement)
-	{
-        if (sdk != null)
-            return sdk.IsAdPlayable(placement);
-		return false;
-	}
-	
-	
-	// Sets if sound should be enabled or not
-	public static void setSoundEnabled( bool isEnabled )
-	{
-		_isSoundEnabled = isEnabled;
-	}
-	
-	
-	// Sets the allowed orientations of any ads that are displayed
-	public static void setAdOrientation( VungleAdOrientation orientation )
-	{
-		_orientation = orientation;
-	}
-	
-	
-	// Checks to see if sound is enabled
-	public static bool isSoundEnabled()
-	{
-		return _isSoundEnabled;
-	}
-
-    public static void loadAd(string placement)
-    {
-        if (sdk != null)
-            sdk.LoadAd(placement);
-    }
-	
-	// Plays an ad with the given options. The user option is only supported for incentivized ads.
-	public static void playAd(string placement)
-	{
-		if (sdk != null && sdk.IsAdPlayable(placement)) {
-			cfg = new AdConfig ();
-			cfg.SetUserId ("");
-			cfg.SetSoundEnabled (_isSoundEnabled);
-			cfg.SetOrientation((_orientation == VungleAdOrientation.AutoRotate)?VungleSDKProxy.DisplayOrientations.AutoRotate:VungleSDKProxy.DisplayOrientations.Landscape);
-			sdk.PlayAd(cfg, placement);
-		}
-	}
-	
-	public static void playAd( Dictionary<string,object> options, string placement)
-	{
-		if (sdk != null && sdk.IsAdPlayable(placement)) {
-			cfg = new AdConfig ();
-			if (options.ContainsKey("userTag") && options["userTag"] is string)
-				cfg.SetUserId ((string) options["userTag"]);
-			cfg.SetSoundEnabled (_isSoundEnabled);
-			if (options.ContainsKey("orientation")) {
-				if (options ["orientation"] is bool) {
-					cfg.SetOrientation (((bool)options ["orientation"]) ? VungleSDKProxy.DisplayOrientations.Landscape : VungleSDKProxy.DisplayOrientations.AutoRotate);
-				}
-				if (options ["orientation"] is VungleAdOrientation) {
-					cfg.SetOrientation(((VungleAdOrientation)options ["orientation"] == VungleAdOrientation.AutoRotate) ? VungleSDKProxy.DisplayOrientations.AutoRotate : VungleSDKProxy.DisplayOrientations.Landscape);
-				}
-			} else
-				cfg.SetOrientation((_orientation == VungleAdOrientation.AutoRotate) ? VungleSDKProxy.DisplayOrientations.AutoRotate : VungleSDKProxy.DisplayOrientations.Landscape);
-			if (options.ContainsKey("alertText") && options["alertText"] is string)
-				cfg.SetIncentivizedDialogBody ((string) options["alertText"]);
-			if (options.ContainsKey("alertTitle") && options["alertTitle"] is string)
-				cfg.SetIncentivizedDialogTitle ((string) options["alertTitle"]);
-			if (options.ContainsKey("closeText") && options["closeText"] is string)
-				cfg.SetIncentivizedDialogCloseButton ((string) options["closeText"]);
-			if (options.ContainsKey("continueText") && options["continueText"] is string)
-				cfg.SetIncentivizedDialogContinueButton ((string) options["continueText"]);
-			if (options.ContainsKey("backImmediately") && options["backImmediately"] is string)
-				cfg.SetBackButtonImmediatelyEnabled ((bool) options["backImmediately"]);
-			sdk.PlayAd(cfg, placement);
-		}
-	}
-}
-#endif
-

+ 0 - 10
Assets/Plugins/Vungle/win/VungleWin.cs.meta

@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 8dd632b10f9cd46529c9e836e0cce57d
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/VungleSDKProxy.dll


+ 0 - 15
Assets/Plugins/VungleSDKProxy.dll.meta

@@ -1,15 +0,0 @@
-fileFormatVersion: 2
-guid: 104935648e8dd4aaa9d94a67ffabde6a
-PluginImporter:
-  serializedVersion: 1
-  iconMap: {}
-  executionOrder: {}
-  isPreloaded: 0
-  isOverridable: 0
-  platformData:
-    Any:
-      enabled: 1
-      settings: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/metro/UWP/VungleSDK.winmd


+ 0 - 6
Assets/Plugins/metro/UWP/VungleSDK.winmd.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 7eb6d654a7fb54b1b9e7c0587b776855
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/metro/VungleSDK.winmd


+ 0 - 6
Assets/Plugins/metro/VungleSDK.winmd.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 1ba2eecf3cf39426d887f8765422a946
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/metro/VungleSDKProxy.winmd


+ 0 - 6
Assets/Plugins/metro/VungleSDKProxy.winmd.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 57a042fd7ac2148099b04ad1cbe59c63
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Plugins/metro/WindowsPhone81/VungleSDK.winmd


+ 0 - 6
Assets/Plugins/metro/WindowsPhone81/VungleSDK.winmd.meta

@@ -1,6 +0,0 @@
-fileFormatVersion: 2
-guid: 6f0831595f51c47799f97f589c3318b7
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 23 - 23
Assets/Resource/Prefab/Object/Garden.prefab

@@ -60,7 +60,7 @@ GameObject:
   m_IsActive: 1
 --- !u!1 &1037154030683062
 GameObject:
-  m_ObjectHideFlags: 0
+  m_ObjectHideFlags: 1
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   serializedVersion: 5
@@ -248,7 +248,7 @@ GameObject:
   m_IsActive: 1
 --- !u!1 &1438454079457150
 GameObject:
-  m_ObjectHideFlags: 0
+  m_ObjectHideFlags: 1
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   serializedVersion: 5
@@ -387,7 +387,7 @@ GameObject:
   m_IsActive: 1
 --- !u!1 &1665676138942020
 GameObject:
-  m_ObjectHideFlags: 0
+  m_ObjectHideFlags: 1
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   serializedVersion: 5
@@ -639,7 +639,7 @@ Transform:
   - {fileID: 4511888384554322}
   - {fileID: 4562429071468692}
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 7
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4068698844593858
 Transform:
@@ -731,9 +731,12 @@ Transform:
   m_Children:
   - {fileID: 4894846390083986}
   - {fileID: 4805232444639958}
+  - {fileID: 4660768198459142}
+  - {fileID: 4595340951015810}
+  - {fileID: 4929027059194764}
   - {fileID: 4750662320858086}
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 4
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4254189633300472
 Transform:
@@ -758,9 +761,6 @@ Transform:
   m_LocalPosition: {x: 0, y: -1.8, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
-  - {fileID: 4660768198459142}
-  - {fileID: 4595340951015810}
-  - {fileID: 4929027059194764}
   - {fileID: 4321082446622300}
   - {fileID: 4243570825903678}
   - {fileID: 4477205389848202}
@@ -795,7 +795,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 3
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4321706706442504
 Transform:
@@ -847,7 +847,7 @@ Transform:
   m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
   m_Children: []
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 9
+  m_RootOrder: 6
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4418291439038982
 Transform:
@@ -876,7 +876,7 @@ Transform:
   - {fileID: 4550895456556154}
   - {fileID: 4418291439038982}
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 5
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4479516433550238
 Transform:
@@ -945,7 +945,7 @@ Transform:
   - {fileID: 4479516433550238}
   - {fileID: 4594713365202588}
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 6
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4587352699038540
 Transform:
@@ -980,11 +980,11 @@ Transform:
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1665676138942020}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 21, y: 6.04, z: 3.5}
+  m_LocalPosition: {x: 17.85, y: 0.7399998, z: 0.5}
   m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
   m_Children: []
-  m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 1
+  m_Father: {fileID: 4243570825903678}
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4660768198459142
 Transform:
@@ -993,11 +993,11 @@ Transform:
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1438454079457150}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 17, y: 6, z: 1.5}
+  m_LocalPosition: {x: 13.85, y: 0.6999998, z: -1.5}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 0
+  m_Father: {fileID: 4243570825903678}
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4686788189379672
 Transform:
@@ -1037,7 +1037,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4243570825903678}
-  m_RootOrder: 2
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4771305799930198
 Transform:
@@ -1050,7 +1050,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 8
+  m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!4 &4798948200544626
 Transform:
@@ -1154,11 +1154,11 @@ Transform:
   m_PrefabInternal: {fileID: 100100000}
   m_GameObject: {fileID: 1037154030683062}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 23, y: 5.49, z: 2.5}
+  m_LocalPosition: {x: 19.85, y: 0.18999958, z: -0.5}
   m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
   m_Children: []
-  m_Father: {fileID: 4257060777002720}
-  m_RootOrder: 2
+  m_Father: {fileID: 4243570825903678}
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!61 &61724106738148120
 BoxCollider2D:

+ 1 - 1
Assets/Resource/XML/lan/ChineseSimplified.xml

@@ -94,7 +94,7 @@
     <P_WingLab desc=""><![CDATA[翅膀]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[购买]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[已购<(已购)>]]></P_BtnLab2>
-    <P_Return desc=""><![CDATA[离开试衣间?]]></P_Return>
+    <P_Return desc=""><![CDATA[你的当前形象还有没购买的装扮,确定要退出吗?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[购买装扮]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[购买]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[去试衣间看看吧!]]></N_Lab>

+ 1 - 1
Assets/Resource/XML/lan/ChineseTraditional.xml

@@ -94,7 +94,7 @@
     <P_WingLab desc=""><![CDATA[翅膀]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[購買]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[已購<(已购)>]]></P_BtnLab2>
-    <P_Return desc=""><![CDATA[離開試衣間?]]></P_Return>
+    <P_Return desc=""><![CDATA[妳的當前形象還有沒購買的裝扮,確定要退出嗎?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[購買裝扮]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[購買]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[去試衣間看看吧!]]></N_Lab>

+ 1 - 1
Assets/Resource/XML/lan/English.xml

@@ -94,7 +94,7 @@
     <P_WingLab desc=""><![CDATA[Wing]]></P_WingLab>
     <P_BtnLab1 desc=""><![CDATA[Buy]]></P_BtnLab1>
     <P_BtnLab2 desc=""><![CDATA[Bought<(已购)>]]></P_BtnLab2>
-    <P_Return desc=""><![CDATA[Leave dress room?]]></P_Return>
+    <P_Return desc=""><![CDATA[You currently have some close not yet purchased,are you sure you want to leave?]]></P_Return>
     <Pa_Tit desc=""><![CDATA[Buy clothing]]></Pa_Tit>
     <Pa_BtnLab desc=""><![CDATA[Buy]]></Pa_BtnLab>
     <N_Lab desc=""><![CDATA[Go to your dress room!]]></N_Lab>

BIN
Assets/Resource/Xlsx/language_config.xlsx


+ 0 - 1
Assets/Script/Manage/ManaGarden.cs

@@ -336,7 +336,6 @@ public class ManaGarden : Regist
         
         Garden.PagePos.Add(pos);
 
-
         for (int i = 0; i < 9; i++)
         {
             Slot slot = tra.GetChild(i).GetComponent<Slot>();

+ 1 - 33
Assets/Script/Manage/ManaIAP.cs

@@ -78,25 +78,6 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         {
             Advertisement.Initialize("1408493", false);
         }
-
-        if (!Application.isEditor)
-        {
-            //初始化vungle
-            VungleAdsManager.Instance.Init(() =>
-            {
-                AdAction.Invoke();
-
-                ManaCenter.AdAmt++;
-            });
-
-            //初始化OneWay
-            OneWayAdsManager.Instance.Init(() =>
-            {
-                AdAction.Invoke();
-
-                ManaCenter.AdAmt++;
-            });
-        }
     }
 
     public static void InitializeIAP()
@@ -171,20 +152,7 @@ public class ManaIAP : MonoBehaviour, IStoreListener
         }
         else
         {
-            // Bubble.Show(null, Language.GetStr("IAP", "LoadAd"));
-            //Unity广告加载失败,自动加载vungle广告,并且再次初始化unity广告
-            if (VungleAdsManager.Instance.CheckAd())
-            {
-                VungleAdsManager.Instance.PlayAd();
-
-                StaticsManager.GetInstance().AdChannel(1);
-            }
-            else
-            {
-                OneWayAdsManager.Instance.PlayAd();
-
-                StaticsManager.GetInstance().AdChannel(2);
-            }
+            Bubble.Show(null, Language.GetStr("IAP", "LoadAd"));
 
             if (!Advertisement.isInitialized)
             {

+ 4 - 12
Assets/Script/Manage/ManaUI.cs

@@ -2330,18 +2330,10 @@ public class ManaUI : Regist
         #region P_Return
 
         ManaReso.SetButtonEvent
-            (
-                "P_Return",
-                () => Bubble.Show
-                    (
-                        null, Language.GetStr("UI", "P_Return"),
-                        null,
-                        () =>
-                        {
-                            ManaReso.Get("K_Bubble").GetTweenGra().AddEventOnetime(EventType.BackwardFinish, () => ManaPlayer.Player.Save());
-                        }
-                    )
-            );
+        (
+            "P_Return",
+            ManaPlayer.Player.Return
+        );
         
         #endregion
 

+ 18 - 3
Assets/Script/Manage/ManaVisit.cs

@@ -46,7 +46,6 @@ public class ManaVisit
 
     public static int Slot;
     public static int Level;
-    public static int PageAmt;
     public static XmlNode Node;
     public static XmlDocument Document;
 
@@ -183,8 +182,16 @@ public class ManaVisit
 
 
         Garden.ResetPage();
+        Garden.PagePos = new List<Vector3>();
 
-        for (int i = 0; i < ManaGarden.Slot / 7 + 2; i++)
+        int pageAmt = 2;
+
+        if (ManaGarden.Slot >= 7)
+        {
+            pageAmt = (ManaGarden.Slot - 7)/9 + 3;
+        }
+
+        for (int i = 0; i < pageAmt; i++)
         {
             ManaGarden.CreatePage();
         }
@@ -524,8 +531,16 @@ public class ManaVisit
 
 
         Garden.ResetPage();
+        Garden.PagePos = new List<Vector3>();
+
+        int pageAmt = 2;
+
+        if (Slot >= 7)
+        {
+            pageAmt = (Slot - 7) / 9 + 3;
+        }
 
-        for (int i = 0; i < Slot/7 + 2; i++)
+        for (int i = 0; i < pageAmt; i++)
         {
             ManaGarden.CreatePage();
         }

+ 4 - 4
Assets/Script/Object/Garden.cs

@@ -74,7 +74,7 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
 
         Transform tra = ManaReso.Get("Cloud1");
 
-        TweenRoot tween = tra.CreateTweenVec2D(new Vector3(-12, tra.position.y, tra.position.z), 85f, false, false, true, Curve.Linear);
+        TweenRoot tween = tra.CreateTweenVec2D(new Vector3(-14, tra.localPosition.y, tra.localPosition.z), 85f, true, false, true, Curve.Linear);
 
         tween.Repeat = true;
 
@@ -86,7 +86,7 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
 
         tra = ManaReso.Get("Cloud2");
 
-        tween = tra.CreateTweenVec2D(new Vector3(-12, tra.position.y, tra.position.z), 127.5f, false, false, true, Curve.Linear);
+        tween = tra.CreateTweenVec2D(new Vector3(-14, tra.localPosition.y, tra.localPosition.z), 127.5f, true, false, true, Curve.Linear);
 
         tween.Repeat = true;
 
@@ -98,7 +98,7 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
 
         tra = ManaReso.Get("Cloud3");
 
-        tween = tra.CreateTweenVec2D(new Vector3(-12, tra.position.y, tra.position.z), 170, false, false, true, Curve.Linear);
+        tween = tra.CreateTweenVec2D(new Vector3(-14, tra.localPosition.y, tra.localPosition.z), 170f, true, false, true, Curve.Linear);
 
         tween.Repeat = true;
 
@@ -398,7 +398,7 @@ public class Garden : Regist, IDragHandler, IPointerClickHandler, IEndDragHandle
     public static void NextPage()
     {
         CurPage++;
-        
+
         Flag1 = false;
 
         float ratio = CurPage / (Page - 1f);

+ 47 - 2
Assets/Script/Object/Player.cs

@@ -532,8 +532,6 @@ public class Player : Regist , IPointerClickHandler
         ManaPlayer.DressData[3] = HeadWear;
         ManaPlayer.DressData[4] = Top;
         ManaPlayer.DressData[7] = Wing;
-        
-        ExitDressRoom();
     }
 
     public void Reset()
@@ -547,6 +545,53 @@ public class Player : Regist , IPointerClickHandler
         ManaPlayer.BuildPlayer(dressData);
     }
 
+    public void Return()
+    {
+        bool allSave = true;
+        bool allBought = true;
+
+        List<string> currentDerssData = new List<string>() {Head, Dress, Shoe, HeadWear, Top, Eye, Mouse, Wing};
+
+        for (int i = 0; i < currentDerssData.Count; i++)
+        {
+            if (!ManaPlayer.CloseIDDic.ContainsKey(currentDerssData[i]))
+            {
+                continue;
+            }
+
+            int id = ManaPlayer.CloseIDDic[currentDerssData[i]];
+
+            allBought = allBought && ManaPlayer.CloseUnitDic[id].Bought;
+
+            allSave = allSave && currentDerssData[i] == ManaPlayer.DressData[i];
+        }
+
+        if (allBought)
+        {
+            if (allSave)
+            {
+                ExitDressRoom();
+            }
+            else
+            {
+                Reset();
+                ExitDressRoom();
+            }
+        }
+        else
+        {
+            Bubble.Show
+            (
+                null, Language.GetStr("UI", "P_Return"), null,
+                () =>
+                {
+                    Reset();
+                    ManaReso.Get("K_Bubble").GetTweenGra().AddEventOnetime(EventType.BackwardFinish, () => { ExitDressRoom(); });
+                }
+            );
+        }
+    }
+
     public void BuyNavigate(List<CloseUnit> closeUnitList)
     {
         for (int i = 0; i < closeUnitList.Count; i++)

+ 0 - 9
Assets/Script/ThirdParty/OneWayAds.meta

@@ -1,9 +0,0 @@
-fileFormatVersion: 2
-guid: 9c598444bc01ef94788d24c0ccfa547a
-folderAsset: yes
-timeCreated: 1501180966
-licenseType: Pro
-DefaultImporter:
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 40
Assets/Script/ThirdParty/OneWayAds/OneWayAdsManager.cs

@@ -1,40 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class OneWayAdsManager : UnitySingleton<OneWayAdsManager> {
-
-	public void Init(System.Action finishCallback)
-	{
-		OneWaySDK.init ("jczhy6gxwak795kp", "90lvj6k3ev5zhdrg", true);
-		Debug.Log("OneWay Inited");
-
-		InitializeEventHandlers();
-	}
-
-	public void PlayAd(){
-		Debug.Log("OneWay play ad");
-		OneWaySDK.show();
-	}
-
-	private void InitializeEventHandlers() {
-
-        OneWaySDK.onOneWaySDKReadyEvent += ( placement ) =>{
-			Debug.Log ("OneWaySDK is Ready for placement: " + placement);
-		};
-
-
-		OneWaySDK.onOneWaySDKDidStartEvent += ( placement ) =>{
-			Debug.Log ("OneWaySDK start to show placement: " + placement);
-		};
-
-		OneWaySDK.onOneWaySDKDidFinishEvent += ( placement ,state) =>{
-			Debug.Log ("OneWaySDK Finished placement " + placement +"finish state is :" + state);
-		};
-
-		OneWaySDK.onOneWaySDKDidErrorEvent += ( err, msg) =>{
-			Debug.Log ("OneWaySDK is err: " + err + ",message:" + msg);
-		};
-    }
-
-}

Some files were not shown because too many files changed in this diff