Add the hook feature to any C18.1 or C20 game

Purpose

This post explains how to update an existing game to add it the Hook shot feature. The instructions assume you are using the C18.1 or C20 code. The tutorial use a C20 game.

Get Your Project Folder

All existing projects have a project folder. You can either download the offline project folder or sync the github branch on your own local repository. Please note C18.1 and C20 games should be opened with Unity 5.6.2p1.

Import package

First thing to do is import this package. You can find it on your Dropbox company account on 0-Assets > GUI > Blockyverse Packages. This package includes all the sounds, images and scripts that you will use for the hook.

Create prefabs and elements

There are a few prefabs that you need to edit and create from scratch:

  • The first thing you need to edit is located on UI > gameplay > gameplay_buttons. You need to create a new object at the same level than jump_button (you can just duplicate that object and then edit it). The new object should be named hook_button. Please edit EVERYTHING with the same values that this image:

    (This is the image with the details on the right:)

    Please note that you should create a new Tag for this object. You can do that by clicking on Tag (below the object name) and then Add Tag…:

    Then you will see this tab:


    Finally you will be able to chose the correct tag for your new object:

    Absolutely EVERYTHING should be as the images show.

  • Inside hook_button object should be the hook_icon object and it should has the same values as this image:

    Note here that you will need to chose the new wing_0 Source image. This image was already imported in the package from the beginning.
  • Please check again that all the values remain the same as the images above. If everything is ok, you will see something like this on your UI > gameplay screen:


    Finally Apply the changes to the UI prefab.
  • Open Level 1. Go to your project tab and search the Whit Smoke prefab. Drag and place it inside the FPS Camera object. Make sure that all the values are the same to these images and the object should be disabled:


    Finally Apply the changes to the Player prefab.
  • Inside the same FPS Camera object open the Main Camera object and create inside the Hand showed in the image. As usual, check that all the values are exactly the same.

    Finally Apply the changes to the Player prefab.
  • Go to the FPS Player object and click on Add Component. Then write “hook” and select the Hook script.


    Then do the same but select instead a Line Renderer.

    Finally check that everything in your FPS Player prefab looks like this image. Drag and drop everything as the image shows and search for the remaining elements.

    Save all the changes and apply them to the FPS Player prefab. Make sure everything is set correctly in all the levels (you just need to drag and drop the hook_button on every level, all the other changes should be applied already to all the levels).

Last step

You are almost done! You just need to turn on the Grappling Hook. In order to do this go to Tools > Grappling Hook > Enable > On. Right here you can decide if turn this feature on or off, so you can see the hook or not in the game.

The last step is build an APK and try the hook feature in your device. If everything is ok, you have finished!

Set Up Admob Ads Under Heyzap Mediation

Purpose

  • explains how to set up Admob ads for a game where the advertising is controlled by Heyzap mediation
  • part in a series of articles

Applicability

This applies to you if you’ve been tasked with updating an existing project to use the Heyzap mediation features.

Written Instructions

Note: As Admob is associated with Google, you should use VM to access Admob. You can contact the Production manager if you don’t have access for VM.

When you link Admob ids first time with Heyzap, you should also log in Heyzap the same Virtual Machine where you logged in for Admob.

Log in to Heyzap with correct company (A, B, C & E) and find your game.

Go to the app-specific mediation settings and expand the ‘Admob’ area.

Log in to Admob and in this page, you will be getting Publisher ID. You can also get publisher id from Ad Networks Master file.

This is very important step.  Make sure you have logged in with Ad mob and Heyzap in the same browser on VMS to do the following step. If you don’t do this, publisher id cannot be applied and admob ads will not work properly.

After you placed the publisher id, you should click on “Grant Access” Button on Heyzap.

Choose Blockyverse account from the pop up window.

Click Allow.

Once you done this step, you should see “Access Granted” button on Heyzap.

Now find your game from Apps on Admob.

Click on Ad units.

Note:

Make sure you have the ad units for the (Non-rewarded) Interstitial, and for the Rewarded.

Interstitial Ad Unit

Click on Interstitial Ad unit and you will see ad unit id listed there. This ad unit ID will go under “Video Ad Unit ID” on Heyzap.

Rewarded Ad Unit

Click on Rewarded Ad unit and you will see ad unit id listed there. This ad unit ID will go under “Incentivized Video Ad Unit ID” on Heyzap.

 

Final Steps

Save the settings.  Don’t turn on or off any ad networks. Just keep it the way what is was earlier. Turned on ad networks will stay on. Turned off ad networks will stay off. Only apply the new ids and don’t make any changes on ad network set up even if you set up Admob as new thing.

Next

Set up App Lovin to work under Heyzap mediation

Updating a C18, C18.1 or C20 game to Blockyverse company

Purpose

This post explains how to update existing games using the new Blockyverse packages. The instructions assume you are using the C18 or C18.1 code (there is a different package for each one of this versions). For C20 games the only change is that you don’t need to import any package, because it’s already imported in the main branch.

Get Your Project Folder

All existing projects have a project folder. You’ll be sent instructions on where to download it from. Please note that C18 games open with Unity 5.3.7p1; C18.1 and C20 games with Unity 5.6.2p1.

If the game you’re updating has already created a branch in Github, please use it. If not, please create a new branch and name it like this “Code-Game-Name” (ex. for a C18.1 game: C18.1-Most-Wanted-Jail-Break).

Create Rollback APK

It is a good practice to create a Rollback APK before you do anything else. In order to do this you need to login in Unity with the corresponding account of your game (company A, B, C or E). Ask for this access to any Project Manager.
You can find the correct company for the game you’re updating in the List of Apps, Current information tab, column C.

You just have to create an APK when you finished opening the branch in the correct Unity version.
When creating Rollback APK’s please be sure to add +2 to the current Bundle Version Control (BVC). You can edit this in Edit -> Project Settings -> Player and then into the “Other Settings” tab you’ll find an “Identification” section. If the current BVC is 15, your Rollback APK will have BVC 17.

Login into Blockyverse account

You should ask for this access to any person from Production or Management, so you can login into the correct account.

Import Blockyverse package

You can skip this step if your game is a C20
Login into your corporate Dropbox account and download the corresponding package for your game from this folder:
Blockyverse Packages

Import the package to your game inside Unity by double clicking on it and then click on the Import button.

Apply changes

In order to do this, you need to go to Tools -> Change Company Name:

After doing this, you’ll receive this notification:

Please contact Production or FPS Team if you don’t receive this message.

Fix possible issues

Please fix the possible issues that you may encounter after you apply the new package or during the update.

  • If you see this alert (sometimes you will see this with C18.1 games), click on “Remind Me Later”
  • Open your Menu Scene. You may see this UI there:
    If this is your case, then open the UI Prefab on your Hierarchy tab and deselect the “gameplay” object and select “menu”:

    Finally Apply the changes on the Prefab.
  • May be when you finish importing the new package, the title image on your Menu Scene may change to the default image:
    Then, you should go to your UI Prefab on your Hierarchy and open UI -> menu -> title_image and under the “Image (Script)” section choose the correct image:
    Finally Apply the changes on the Prefab.
  • Make sure that you have the same rewarded weapons in everywhere. You should look into 5 places:
    1. Inside UI -> select_difficulty

    2. Inside UI -> pause

    3. Inside UI -> select_difficulty -> level_select_info_panel -> level_reward_image

    4. On PlayerWeaponSettings element (you can find it in the Project tab)

    5. On LevelSelectCanvas -> LSMissionInfoPanel inside LevelSelect scene

    You’re free to use any rewarded weapons you want, just make sure that the weapons match the actual game. Also notice that not all the weapons have icons created and that the “inactive” icons should be in their correct places. Don’t forget to hit the Apply button every time you modify a prefab.

Verify changes

Verify that all the changes were made successfully.

  • New company Logo for Battle Blockyverse Studio (Logo Screen)
  • Check the correct Company Name under Player Settings
  • Play the game inside Unity editor and check the new Privacy Policy

  • Stay in the Unity player and Rate the game with 1 Star. You should see this text after rating:
    After this your favorite email application will open with one predetermined text like this one:

    Tell us what you think about our game, send suggestions and ideas!, and feel free to report bugs!
    BundleID com.crystalbuffalo.copsrobbersprisonescape C18, BVC 15

    Please make sure that the BVC is the correct for your game, as well as the Bundle ID. Also notice that the email should be directed to contact@blockyverse.com

  • In your Hierarchy tab locate the UI Prefab and go to its “pause” object. You should have these 10 games with their correct Game Name, Link and Image:

Configure your game

Finally you need to configure all your game settings and new adnetworks id’s.

Change Studio

Go to Tools -> Edit Game Studio and choose “A_Blockyverse”:

Heyzap settings

Go to Ad Networks -> Heyzap -> Edit Settings and choose the older company in which this game was linked (you can find the older company in the List of Apps). Also don’t forget to check the Override Company Studio button. Make sure to select only A, B, C & E from this menu. We didn’t have separate ad network logins for remaining companies as usual.

Unity Ads & Unity Analytics

In order to configure your game in Unity Ads, please make sure to complete this process:
Setup UnityAds

When you finish, please follow this steps to configure your game into Unity Analytics:
Setup Unity Analytics

If you see any error on the Console please contact to Production or FPS Teams.

Update Heyzap mediation

You can follow this process to update AppLovin into Heyzap mediation:
Set Up AppLovin Ads Under Heyzap Mediation

You can follow this process to update UnityAds into Heyzap mediation:
Set Up Unity Ads Under Heyzap Mediation

You can follow this process to update Admob into Heyzap mediation:
Set Up Admob Ads Under Heyzap Mediation

Change new AdMob id’s

You should find the Admob id’s for your game inside Blockyverse tab on Ad Networks Master File. Then go to Ad Networks -> AdMob -> Enable (if it wasn’t). Next on Edit Settings apply the new id’s:

Change AppLovin Settings

You should find the AppLovin SDK key for your game inside Blockyverse tab on Ad Networks Master File. Then go to Ad Networks -> AppLovin -> Edit Settings and apply the new SDK:

Then update the same AppLovin SDK on the following files:

  • Plugins/Android/AndroidManifest.xml
  • _Scripts/AmazonSwitch/Manifest/AndroidManifestAmazon.xml

Also check that the Bundle ID is the correct one on both xml files

Verify the rest of the Ad Networks

The rest of the Ad Networks stay the same, so you need to double check them on the Ad Networks Master File on the oldest Company tab and copy those ids into the new Blockyverse tab in the corresponding row.

Last steps

Finally you can test the game inside Unity editor and see if there is any error in the Console.

If everything looks fine, you can go to Player Settings and update the Version and BVC. For the Version just add “b” at the end (ex: C18.1b, C18b).

Build your new APK and that’s it! Congrats!