This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using UnityEngine.Advertisements; | |
public class LoadExample : MonoBehaviour, IUnityAdsListener | |
{ | |
public bool testMode; | |
public string appleAppStoreGameId = "INPUT YOUR GAME ID"; | |
public string googlePlayStoreGameId = "INPUT YOUR GAME ID"; | |
public string placementId = "rewardedVideo"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class DisableAnalytics : MonoBehaviour | |
{ | |
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | |
public static void OnRuntimeMethodLoad() | |
{ | |
UnityEngine.Analytics.Analytics.enabled = false; | |
UnityEngine.Analytics.Analytics.deviceStatsEnabled = false; | |
UnityEngine.Analytics.Analytics.limitUserTracking = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using UnityEngine.Monetization; | |
public class VideoAdsExampleScript : MonoBehaviour | |
{ | |
[SerializeField, Header("テストモード")] private bool _testMode; | |
private const string IosGameId = "2942932"; | |
private const string AndroidGameId = "2942930"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using UnityEngine.Monetization; | |
public class AdsController : MonoBehaviour | |
{ | |
public bool TestMode; | |
public string IosGameId = "2907766"; | |
public string AndroidGameId = "2907765"; | |
// public string VideoPlacementId = "video"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class PlayerMove : MonoBehaviour | |
{ | |
public float PlayerSpeed = 20f; | |
private Transform _parentTransform; | |
private void Start() | |
{ | |
_parentTransform = transform.parent.transform; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class CameraMove : MonoBehaviour | |
{ | |
public bool IsMove = true; | |
public Vector3 CameraMoveDirection = new Vector3(-1f,0); | |
public float Speed = 3f; | |
private void Update () | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Advertisements; | |
public class AdsManager : MonoBehaviour | |
{ | |
#if UNITY_IOS | |
// ここにiOSのAdsのGame ID | |
private readonly string _gameId = "1769120"; | |
#elif UNITY_ANDROID | |
// ここにAndroidのAdsのGame ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Purchasing; | |
[RequireComponent(typeof(AdsManager))] | |
public class UnityIAP : MonoBehaviour, IStoreListener | |
{ | |
private IStoreController _controller; | |
private AdsManager _ads; | |
private const string ProductCoins = "100.gold.coins"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EditorStopTest : MonoBehaviour | |
{ | |
public void Quit() | |
{ | |
#if UNITY_EDITOR | |
UnityEditor.EditorApplication.isPlaying = false; | |
#else | |
Application.Quit(); | |
#endif | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Advertisements; | |
public class ShowUnityAdsWithAssetstorePackage : MonoBehaviour | |
{ | |
public string GameId_iOS = "INPUT YOUR GAMEID FOR IOS"; | |
public string GameId_Android = "INPUT YOUR GAMEID FOR ANDROID"; | |
public bool TestMode = false; | |
private string _gameId; |