Permalink
Browse files

Integrated Unity Ads

  • Loading branch information...
1 parent feedd8a commit e66fbe4c618a08ddd50fb56e65700bae1a5127fd @kenmiller521 committed Jan 13, 2018
@@ -20689,6 +20689,46 @@ CanvasRenderer:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1561087828}
+--- !u!1 &1571397121
+GameObject:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 0}
+ serializedVersion: 5
+ m_Component:
+ - component: {fileID: 1571397123}
+ - component: {fileID: 1571397122}
+ m_Layer: 0
+ m_Name: UnityAdvertisementsController
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &1571397122
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 0}
+ m_GameObject: {fileID: 1571397121}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 47f11d0364dc3e24397ca07d87f16d40, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+--- !u!4 &1571397123
+Transform:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 0}
+ m_GameObject: {fileID: 1571397121}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -12.672971, y: -3.4646013, z: 1.9529471}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 17
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1598715993
GameObject:
m_ObjectHideFlags: 0
@@ -21372,7 +21412,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 1794669400}
+ - m_Target: {fileID: 1794669402}
m_MethodName: MainMenuButton
m_Mode: 1
m_Arguments:
@@ -22686,6 +22726,7 @@ MonoBehaviour:
- {fileID: 8300000, guid: 85122a9e3e01fec45bfd51c26972cb69, type: 3}
- {fileID: 8300000, guid: b6ad2f1b4da86904f871359a6aa33c05, type: 3}
- {fileID: 8300000, guid: 3108c308509deed4692cc3ddb18d004f, type: 3}
+ adsController: {fileID: 1571397122}
--- !u!114 &1794669403
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -24235,7 +24276,7 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- - m_Target: {fileID: 1794669400}
+ - m_Target: {fileID: 1794669402}
m_MethodName: RetryButton
m_Mode: 1
m_Arguments:
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.IO;
using UnityEngine;
+using UnityEngine.SceneManagement;
using UnityEngine.UI;
//Individual High Score markers, have a caveman sprite that will be switched
@@ -32,6 +33,7 @@ public class LeaderBoardController : MonoBehaviour {
public GameObject[] cavemenBystanders;
public AudioSource screamsAudioSource;
public AudioClip[] newHighScoreScreams;
+ public UnityAdvertisementsController adsController;
private string enteredName;
private float points;
//private string[] highscoreEntries;
@@ -176,6 +178,9 @@ public void Activate()
NameEntry.text = "Try Again";
NameEntryButton.gameObject.SetActive(false);
}
+
+ Debug.Log("Showing Advertisement");
+ adsController.ShowAdvertisement();
}
public void EntryName()
{
@@ -231,6 +236,15 @@ private void SaveLeaderBoard()
Debug.Log(PlayerPrefs.GetString("Rank" + j + "Name")+"/"+PlayerPrefs.GetInt("Rank"+j+"Points"));
}
}
+
+ public void RetryButton()
+ {
+ SceneManager.LoadScene("MVPScene");
+ }
+ public void MainMenuButton()
+ {
+ SceneManager.LoadScene("MainMenu");
+ }
/*IEnumerator CavemanGruntsRanOver()
{
while (_rb2d.velocity.x == 0)
@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Advertisements;
+
+public class UnityAdvertisementsController : MonoBehaviour {
+
+ // Use this for initialization
+ void Start () {
+ Advertisement.Initialize("1668153");
+
+ }
+
+ public void ShowAdvertisement()
+ {
+ Advertisement.Show();
+ }
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -17,3 +17,4 @@ PhysicsManager:
m_EnablePCM: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
+ m_AutoSyncTransforms: 1
@@ -24,6 +24,7 @@ Physics2DSettings:
m_QueriesStartInColliders: 1
m_ChangeStopsCallbacks: 0
m_CallbacksOnDisable: 1
+ m_AutoSyncTransforms: 1
m_AlwaysShowColliders: 0
m_ShowColliderSleep: 1
m_ShowColliderContacts: 0
@@ -12,7 +12,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: Monument Games
- productName: Reinvent The Wheel
+ productName: Reinvent the Wheel
defaultCursor: {fileID: 2800000, guid: b9e19872190acb04689e0811364cfbe9, type: 3}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
@@ -154,8 +154,8 @@ PlayerSettings:
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
- Android: com.MonumentGames.ReinventTheWheel
- Standalone: com.MonumentGames.ReinventTheWheel
+ Android: com.MonumentGames.ReinventtheWheel
+ Standalone: com.MonumentGames.ReinventtheWheel
buildNumber: {}
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 16
@@ -625,8 +625,8 @@ PlayerSettings:
facebookSdkVersion: 7.9.4
apiCompatibilityLevel: 2
cloudProjectId: 379f57b8-74ea-4b2b-9e27-993838a336b8
- projectName: ReinventTheWheel
- organizationId: ken_miller
+ projectName: ReinventtheWheel
+ organizationId: monument-games
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 0
disableOldInputManagerSupport: 0
@@ -10,6 +10,7 @@ UnityConnectSettings:
m_TestInitMode: 0
CrashReportingSettings:
m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
+ m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate
m_Enabled: 0
m_CaptureEditorExceptions: 1
UnityPurchasingSettings:
@@ -22,13 +23,14 @@ UnityConnectSettings:
m_TestEventUrl:
m_TestConfigUrl:
UnityAdsSettings:
- m_Enabled: 0
+ m_Enabled: 1
m_InitializeOnStartup: 1
m_TestMode: 0
- m_EnabledPlatforms: 4294967295
m_IosGameId:
m_AndroidGameId:
- m_GameIds: {}
- m_GameId:
+ m_GameIds:
+ AndroidPlayer: 1668153
+ iPhonePlayer: 1668154
+ m_GameId: 1668153
PerformanceReportingSettings:
m_Enabled: 0

0 comments on commit e66fbe4

Please sign in to comment.