Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

GameObject.Destroy(gameObject) does not destroy capsules

$
0
0
In this script when player and capsule or cubes touches they gotta be destroyed. code destroys cubes but it doesn't work for capsules, any idea? public void HandleAdResult(ShowResult result) { switch (result) { case ShowResult.Finished: Time.timeScale = 1f; GameObject.Destroy(gameObject); break; I have this method for advertisement public void Watchit() { UnityEngine.Advertisements.Advertisement.Show("rewardedVideo", new ShowOptions() { resultCallback = HandleAdResult }); } and i call it from another script attached to a button like this (Carpisma is the script for codes above) public GameObject ui; public void watchit() { Carpisma usit = FindObjectOfType(); usit.Watchit(); ui.SetActive(!ui.activeSelf); }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>