Unity Tapjoy Integration with Multiple Scenes
Hi, my question is about Tapjoy for Unity. Everthing work great about Tapyoj in my project but I stucked at one point.
You can see there, we need a Tapjoy GameObject in our scene for connect to server. And official document says; "Insert the TapjoyUnity object only to the scene that appears first in your app." So, I insert the object my first scene and my app connected to server, ads work great but when I go to another scene, my app can't login to server. When I insert Tapjoy GameObject to everyscene, nothing change. Where is my fault, please help.
Sorry for my bad English.
Answer by BarbarosOruc · Jan 16, 2016 at 03:56 PM
I fixed the problem. Here is the answer;
public void HandleConnectSuccess() { TestObj.SetActive(true); if (p == null) { p = TJPlacement.CreatePlacement("offerwall_unit"); } } I'm defining the p variable on Success. When I open the app first time, P variable was defined and ads work without problem but when i load another scene, p variable is reseted and so the ads not work.
public static TJPlacement p;
I use static for p variable for no resetting. This fixed my problem.
Your answer
Follow this Question
Related Questions
Question Concerning Chartboost SDK 0 Answers
Destroying object multiple times. 0 Answers
http://answers.unity3d.com/questions/8472/help-with-error-expression-denotes-a-type-where-a.html 1 Answer
Why instantiated gameobject returns back to its initial position after I move it? 0 Answers
LevelGenerator after Checkpoint Respawn Not Aligning Tiles Properly 1 Answer