Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: escpodgames on September 07, 2014, 11:42:11 PM
-
[Edit] for Unity 5.2 support, please go to the dedicated thread (http://j.mp/1QLqs9N)
Basic actions for UnityAds on 5.1 and previous
Any questions or requests for more features, just ask.
-
I haven't messed around with this yet but hot diggidy dog! Do these ads work with admob or is this Unity's own ad service?
-
It's just unity ad service, they only advertise games.
-
Any questions or requests for more features, just ask.
These would be awesome when you have the time:
np, I'll be adding allowPrecache, isInitialized, isShowing and isSupported actions as well as a separate isReady/show ad action when I get time.
Thanks again for these! :D
Edit: Also, being able to choose placement IDs for unskippable, incentivised advertisements would be excellent, then testing if these ads have been completed or skipped.
-
Can you please include the completed video rewards??
-
Will work on this later in the week :)
-
Thanks a lot for the action for unity ads, and here the modified version a bit, for initialize, I've added an option for test mode, and for the showAd, I've added an option to use ad placement id, and another option to pause engine while ad is running...hope it is useful...
-
Awesome! I'll likely give these a whirl on the weekend.
Thank you :)
-
Done some testing with them. The pause engine while running option sometimes stalled my game when I showed an advertisement after application load. Seemed to work fine aside from that. I've just disabled the option for now, everything is working swimmingly. :)
Thanks again!
-
My game is using pause while running too, and it is working nicely, so I've no idea what causing that, maybe conflicting with another script?
-
Maybe im blind but I can't find any info on placementID other than "pictureZone" and "The default placements that are created for your game are:
default placement: Video ads, skipping enabled after 5 seconds
Rewarded placement: Only videos, no-skipping allowed
Picture only placement: For places where full video ad-experience would not fit."
Any idea on what the ID's are?!
EDIT -
defaultVideoAndPictureZone
incentivisedVideoZone
pictureZone
-
Also "The pause issue is fixed on iOS, but appears to still be an issue on Android with ~15% rate of occurrence"
-
Can you please include the completed video rewards??
yes i'm also in need of the actions for this, if anyone can help?
-
Hi PaulH, please check the script attached below, haven't got the time tested it, but I think it should work, let me know the result...
note: just rename the file back to UnityAds_ShowAd.cs (without version number).
-
Hi PaulH, please check the script attached below, haven't got the time tested it, but I think it should work, let me know the result...
note: just rename the file back to UnityAds_ShowAd.cs (without version number).
Hi
yes it worked perfectly, so thank you so much, i truly appreciate your help.
Thanks again
Paul
-
Hi Paul, glad to hear it works...can you share the screenshot how you used the action? (just the state with the action highlighted would be enough)
Thanks :)
-
As requested via PM, a package with the latest actions -
-
You are just GREAT @LampRabbit
-
Wow Thanks LampRabbit and Cloud03 for creating these great playmaker scripts
-
hi @LampRabbit
I'm not sure, but the actions is not work yet for me.... i send image to see what can wrong there (?)
Can help me? once again...thanks in advace!
-
Hi,
Looking you're doing everything ok, I've only ever use test mode and with placement ID's so there could be an issue. Do the ads work in test mode?
-
hi @LampRabbit
I'm not sure, but the actions is not work yet for me.... i send image to see what can wrong there (?)
Can help me? once again...thanks in advace!
I have same problem before .Maybe the "AD init "not enough time to run , not ready to "show AD".I put "AD init "action in my first scene, or add "wait"action.
It s work for me ,hope can help you.
-
nop...not working :(
@laik2002 when start my game...i start the "AD init"
@LampRabbit i mark the check box "test mode" and the other option, now i use placement ID's as well
-
Also "The pause issue is fixed on iOS, but appears to still be an issue on Android with ~15% rate of occurrence"
This still a issue on Android?
-
can you make chart boost for playmaker as well
-
@rik
check this
http://hutonggames.com/playmakerforum/index.php?topic=7790.msg37502#msg37502
-
Ok...i solve the problem...
for some reason, unchecking the "Pause engine while ad" and put the init action and show action in two FSM (not a global event) is work :o
Thanks for the support..!!!
BTW: i using Android Device.
-
Just what I needed and worked perfectly the first time I implemented. Thanks so much guys!
-
I seem to be having a problem with these actions. I've got a setup that is very similar to xhidnoda's, shown in the screenshots above, but it doesn't seem to be working for me.
I often find that when problems like this arise it is because I've stupidly missed something obvious somewhere. So I wanted to ask you folks if you might have done anything differently to me.
Anyway, this is what I have done to test it in my project:
- Installed Unity Ads from the Asset Store
- Installed the LampRabbit's PM Actions package
- Setup a two state FSM on an empty game object that starts with Unity Ads_Initialize (in test mode) on the first state, and Unity Ads_Show Ad in the next state (with pictureZone Placement ID).
And nothing seems to happen. The FSM just flows between the two states as if they were empty.
Any help or suggestions would of course be muchly appreciated.
-
If you have a the actions test in Android...uncheck the "pause engine while AD". Ant use a wait actions (2 or 3 seconds) and then...show_ads
-
If you have a the actions test in Android...uncheck the "pause engine while AD". Ant use a wait actions (2 or 3 seconds) and then...show_ads
Unfortunately that doesn't seem to work either. I even tried a few really long wait times (10+ seconds) just to make sure.
Also I went through all of my project folders to ensure none of my assets are conflicting or interfering with Unity Ads. I then tried opening a fresh project and installed only Playmaker, Unity Ads and LampRabbit's actions. And since I am still having the same problem, I think it's safe to say that problem is not unique to my project (though I still have no idea what is causing it).
-
I still the same problem...but when i build my game in my android device is works... but when re-build another version of my game...is not working anymore...i don't not why.
-
I have only tested on Android and it seems to work perfectly with the test ads so far.
Quite often the ad is unavailable, so I must press the button to show it multiple times.
To solve this an action that can check if ad has already been "dowloaded" or precache is over would be nice.
This way we could only activate the "play ad" button when actually there is something to play right away.
This would be handy also when the player has viewed all the ads, so the play button does not appear anymore, only when there are ads to show again.
br,
szomaza
-
I Agree
-
Here ya go! Thx to szomaza for testing the action
Use this action to check if the ad becomes ready and then continue with the FSM.
-
Thanks LampRabbit it seems to work perfectly.
Can use this action to wait until the ad becomes available and then continue with the FSM, like so:
-
Great..!! @LampRabbit
@szomaza
-
thanks for sharing, worked on first try.
-
Hi any one make a unity package so that it will be easy to use i see many people contributed and updates can any one make package much appreciated
-
Thank you! This is a massive time saver as I was about to make my own.
-
Hi,
Yeah, I need to move this into a rep and also make it available on the ecosystem.
Please bump regularly :)
Bye,
Jean
-
:) Thanks!
-
great please add it to the eco system
-
Hi,
Yes, it's planned :)
Bye,
Jean
-
Hi,
I am updating stuff (reinstalling the newest of Unity and every plugin I use) and got these 5 WARNINGS when adding the 3 playmaker actions for UnityAds:
Assets/PlayMaker Custom Actions/UnityAds/UnityAds_AdReady.cs(27,58): warning CS0618: `UnityEngine.Advertisements.Advertisement.isReady(string)' is obsolete: `Use Advertisement.IsReady method instead'
Assets/PlayMaker Custom Actions/UnityAds/UnityAds_Initialize.cs(27,47): warning CS0618: `UnityEngine.Advertisements.Advertisement.allowPrecache' is obsolete: `Advertisement.allowPrecache is no longer supported and does nothing'
Assets/PlayMaker Custom Actions/UnityAds/UnityAds_ShowAd.cs(46,58): warning CS0618: `UnityEngine.Advertisements.Advertisement.isReady(string)' is obsolete: `Use Advertisement.IsReady method instead'
Assets/PlayMaker Custom Actions/UnityAds/UnityAds_ShowAd.cs(53,106): warning CS0618: `UnityEngine.Advertisements.ShowOptions.pause' is obsolete: `ShowOptions.pause is no longer supported and does nothing, video ads will always pause the game'
Assets/PlayMaker Custom Actions/UnityAds/UnityAds_ShowAd.cs(55,91): warning CS0618: `UnityEngine.Advertisements.ShowOptions.pause' is obsolete: `ShowOptions.pause is no longer supported and does nothing, video ads will always pause the game'
Haven't tested, yet so not sure if any of them cause any problems or not.
Unity 5.1.1f1
Unity Ads 1.2.1
and the 3 actions from this thread: UnityAds_AdReady, UnityAds_Initialize, UnityAds_ShowAd
Br,
szomaza
-
Hi,
yep, it looks like they will need a revamp for Unity 5.
locally for you, I would simply implement their suggestions as they explain what should be used instead.
I want to add them to the ecosystem, so if you have some time, I think next week can be a reasonable target for me to put them on the Ecosystem, compliant with Unity 5.
Bye,
Jean
-
Hi,
It would be great to have them in the Ecosystem, in a patched up state!
But unfortunately I am pretty sure "simply implementing their suggestions" is still out of my ballpark. :-)
br,
szomaza
-
Hi,
Has anybody been able to get UnityAds working in Unity 5?
I'm submitting a game next week and want to look at my video ad options :)
All the best,
Steven
-
Please, make it available on the ecosystem working for unity 5...
I'm feeling that playmaker support is little slow right now. Everything I ask for ... not working, no answers....
I'm not happy here.
Felling that have to learn how to code or I'll just have half of the options to work with unity.
-
I don't know if it make it easier but here is the code official from unity:
using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;
public class AdManager : MonoBehaviour
{
[SerializeField] string gameID = "33675";
void Awake()
{
Advertisement.Initialize (gameID, true);
}
public void ShowAd(string zone = "")
{
#if UNITY_EDITOR
StartCoroutine(WaitForAd ());
#endif
if (string.Equals (zone, ""))
zone = null;
ShowOptions options = new ShowOptions ();
options.resultCallback = AdCallbackhandler;
if (Advertisement.isReady (zone))
Advertisement.Show (zone, options);
}
void AdCallbackhandler (ShowResult result)
{
switch(result)
{
case ShowResult.Finished:
Debug.Log ("Ad Finished. Rewarding player...");
break;
case ShowResult.Skipped:
Debug.Log ("Ad skipped. Son, I am dissapointed in you");
break;
case ShowResult.Failed:
Debug.Log("I swear this has never happened to me before");
break;
}
}
IEnumerator WaitForAd()
{
float currentTimeScale = Time.timeScale;
Time.timeScale = 0f;
yield return null;
while (Advertisement.isShowing)
yield return null;
Time.timeScale = currentTimeScale;
}
}
-
Hi,
UnityAds (https://unity3d.com/services/ads) for Unity 5 is now fully covered (https://twitter.com/JeanAtPlayMaker/status/644856162857426944) with actions you can get on the Ecosystem (http://j.mp/1Esn1mF)
(https://pbs.twimg.com/media/CPL9QxzWIAAYiJr.png)
you'll mainly need "UnityAdsShowAd", as it account for both regular and reward based advertising, and will wait for ads to be ready is not already, so the action in itself covers everything you need, the other actions are for full coverage to give you access to everything if you want granular control.
Bye,
Jean
-
@jeanfabre like always you make a great job!
I will test this in my game in a few weeks.
-
Hi Jean, thanks a lot!
I'm testing in my game, but it gets stuck on the show Ads event and does not go anywhere. I tried building it also and it doesn't show.
It starts but does not go anywhere, I tried with and without "Is not ready event"and ge the same result, It keeps on this node.
Maybe I'm doing something wrong, but it was working fine with the previous version from LampRabbit.
Thanks again.
-
Hi,
that's odd, I did test it on device and it's working.
have you tried without gamersid?
what does it do inside the editor?
Bye,
Jean
-
Hi Jean, I've been testing since saturday to make sure its nothing stupid i'm doing..(probably is)
I created a new project, imported the assets and I'm getting the same behaviour...
Using unity 5.2.0f3 Personal
Here is a screen record of it... (if you download the movie it's full quality)
https://www.dropbox.com/s/b52apecu6s0shws/unity_ads_playmaker.mov?dl=0
Maybe it help us to understand.
Thanks again.
Doug.
-
Someone else tested it?
Is it working ok?
Thanks.
Doug.
-
Now it's giving me this error:
Assets/PlayMaker Custom Actions/UnityAds/UnityAdsShowAd.cs(108,55): error CS0433: The imported type `UnityEngine.Advertisements.ShowResult' is defined multiple times
-
Hi,
it looks like you are conflicting several version of Unity advertisement now,
And it seems that you haven't setup at all the ad service within Unity. Did you go through the steps necessary to allow Unity ads?
1: click on the cloud icon
2: login
3: set up unity ads
(http://forum.unity3d.com/attachments/screen-shot-2015-09-10-at-3-34-55-pm-png.154040/)
Then it should work. From your previous posts, it seems you don't mentino these steps.
so start on a fresh project, setup ads first, then run the sample provided.
http://forum.unity3d.com/threads/issues-in-migrating-to-5-2.353849/
Let me know how it goes.
Bye,
Jean
-
this unfortunately doesn't work for me either.
- i have installed new actions from the ecosystem
- i have set up unity ads in services
no errors to tell me why. ad just remains unready.
-
edit - ok got it to work now.
have unity bypassed the ad-type now?
that what has stopped it from working
before i used pass it either -
defaultVideoAndPictureZone
pictureZone
rewardedVideoZone
now when i add a value, ads dont work
-
Hi,
I think because it has to be setup properly on the unity side for your project. I Would contact Unity ads team to get a proper explaination of zone and gamers id to know what they and how to work with them.
Bye,
Jean
-
Jean, your new actions work with the sdk as well or just with the new dashboard for unity ads?
I can see many users having problems with the new sdk internal: http://forum.unity3d.com/threads/unity-ads-crashing-ios-in-5-2.354405/
http://forum.unity3d.com/threads/issues-in-migrating-to-5-2.353849/
http://forum.unity3d.com/forums/unity-ads.67/
Should I try importing the sdk or your solution just works for the services tab?
Thanks,
Doug.
-
Hi,
This solution works with the service based Advertisment system, not the sdk you have to manually install. For this you can use the old set of actions I presume.
Bye,
Jean
-
Hi,
This solution works with the service based Advertisment system, not the sdk you have to manually install. For this you can use the old set of actions I presume.
Bye,
Jean
confirming what Jean said & recommended, i have reverted to the older actions & asset store SDK till 5.2.1 is bit more stable.
-
Hi,
I'll make a note on this, what a mess...
Bye,
Jean
-
Hi All,
I am having quite a trouble setting up Unity Ads again in Unity 5.2.1f1.
Previously I managed to get it to work in Unity 4.6 with the Unity Ads SKD from Asset Store and the original Playmaker actions.
Now with the Unity Services way of doing things and the new actions from Ecosystem I am not sure where the Game ID or Placement ID goes and how to set this up?
Do we not need to initialize and precache the ads anymore?
Where do I find some documentation for the new actions?
Thanks in advance,
szomaza
-
Hi szomaza,
Same as you, I lost a lot of time trying to make things work again...
Now its kind of working... I can see the ads working, what i had to do is to delete and make a new ad game in unity dashboard online, then copy the number of the game inside the unity services tab.
With Jean new actions it works, the play and reward work, but the skip and the others doesn't show anything for me...
(anyway you will see them just when you run on iOS after xcode).
1. the game id goes inside the services tab on unity
2. you don't need to pre cache, unity does that for you
Yes some more documentation on the new playmaker actions would be awesome too!!
basically, once you manage to put your game on the unity network, using services tab and the unity dashboard for ads, the actions start to work.
Besides when there is a problem, this i could not manage to see working on my device or in unity. I can not see my message of no ads, when the ads doesn't show or encounter any problem.
If someone have more info, please share.
Thanks,
Doug.
-
Hi,
Indeed this situation with Unity ads is messy. Unfortunatly, Unity has changed many times the setup system and now the web is polluted with obsolete information.
Please follow the procedure from the new "Services" inspector ( accessible from the cloud button or the window menu)
you will find this link
http://unityads.unity3d.com/help/Documentation%20for%20Publishers/GettingStarted
which stipulate 5.2 changed things around, so the old way is for 5.1, and this package I just did is for 5.2
Bye,
Jean