The iOS/Mobile-only nodes

Unreal Engine is a cross-platform engine, which means that you write one block of code and then deploy it to several platforms, but not all nodes are made as general nodes to be used with all platforms. But there are a few nodes that are platform-specific, or in other words are nodes that can be run and executed successfully only on specific platforms:

  • Input Touch: This is one of the functions/events that get executed automatically. Whenever the player touches his screen, this function will return the finger index and the touch coordinates. With this returned information, you can do all of the input magic that can be done for a touch screen device.

    You have two choices when the player touches: either execute the rest of the code when the touch starts, or when it is released.

    The iOS/Mobile-only nodes
  • Event Begin Input Touch: This is an event by actor, which means it gets executed when the actor holding the node in its graph gets touched while click events are enabled.
    The iOS/Mobile-only nodes
  • Event End Input Touch: This is an event by actor, which means it gets executed when the actor holding it in its graph gets touch ended while click events are enabled.
    The iOS/Mobile-only nodes
  • Event Touch Enter: This is an event by actor, which means it gets executed when the actor holding it in its graph gets a touch moved over it while click events are enabled.
    The iOS/Mobile-only nodes
  • Event Touch Leave: This is an event by actor, which means it gets executed when the actor holding it in its graph gets a touch moved over it and left while click events are enabled.
    The iOS/Mobile-only nodes
  • Write Leaderboard Integer: This allows you to write a leaderboard integer value for a state name and submit it. It requires a player controller (which is the current class used by the player to control and navigate), a state name (which is a representation of the leaderboard value on the game center), and the value of this state. This returns just one value: either true or false indicating the successful or otherwise completion of the process.
    The iOS/Mobile-only nodes
  • Read Leaderboard Integer: This queries for the value of an integer (Stat Name). This function requires two inputs: the stat name and the player controller. It can succeed and return the integer value to you as a Leaderboard Value, or it can fail for some reason, such as no connection to the Internet.
    The iOS/Mobile-only nodes
  • Flush Leaderboards: As its name implies, this flushes the leaderboard values into the database. This requires the player controller as the input, as all other online services do, and the session name which is the same as State Name too.
    The iOS/Mobile-only nodes
  • Show Platform Specific Leaderboard Screen: This gets executed when the player wants to check the leaderboard screen. It opens either the Google Play services leaderboard or the Game Center leaderboard depending on the running platform. It takes only a string value, which is the category name, as an input, and is the same as State Name from the read and write leaderboard functions.
    The iOS/Mobile-only nodes
  • Cache Achievements: Executing this starts caching and fetching the player saved achievement's progress from the online service (Google Play or Game Center), and it can succeed or fail depending on the connection, as shown in the following screenshot:
    The iOS/Mobile-only nodes
  • Cache Achievements Description: This works in a similar manner as Cache Achievements, except that it fetches the achievement's description itself. So it fetches the ID info to the device (such as the achievement name or proper text based on the achievement state), depending on whether he has unlocked this Achievement ID or it is still locked. Also, sometimes you have to change the description, let's say, to fix a typo, then it needs to be updated on the player's device.
    The iOS/Mobile-only nodes
  • Get Cached Achievements Progress: With the achievement ID, you can start using the data you've already fetched via Cache Achievements, perhaps by sending it to the UI to show it on the screen. The node can return two values; the first one is a Boolean of either True or False with regard to the existence of the ID. The other returned value is the result itself as a float value named Progress.
    The iOS/Mobile-only nodes
  • Get Cached Achievements Description: With the achievement ID, you can start using the data you've already fetched via Cache Achievement Description, perhaps by sending it to the UI to show it on the screen. The node can return several values, the first is a Boolean of either True or False with regard to the existence of the ID. Get Cached Achievement Description returns the achievement name/title, so you can use it as a title for the achievement in your UI or in your notification screen. It also returns the proper text to be used. In case the achievement is Locked or Unlocked, then you can display the correct ones based on the player's current state.
    The iOS/Mobile-only nodes
  • Write Achievement Progress: Whenever the player unlocks an achievement locally, you will need to save it to the online system you are using. This node allows you to do this by adding a name/ID to the achievement to be used to fetch it in later sessions. You also need to input a value for it. The same inputs are returned after finishing to ensure that it was sent to its correct place with its correct value.
    The iOS/Mobile-only nodes
  • Show Platform Specific Achievements Screen: If you want to have an Achievements button in your game that aims to open the Game Center achievements screen or Google Play achievement screen, using this node will allow you to pop up this screen directly.
    The iOS/Mobile-only nodes
  • EXPERIMENTAL Show Ad Banner: If you are going to use ads in your game to earn money, then you will never find anything easier than Unreal Engine to handle it. By executing this node, you force the game to show ads, and as you can see, it has only one parameter as an input. By marking Show on Bottom Of Screen, the ad banner will be shown at the bottom, but if you set the check box to false, the banner will appear on the top of the screen. Keep in mind that it is named EXPERIMENTAL as it is not finalized yet. While you are reading this book, you might find the name is different; which may mean that it is officially released.
    The iOS/Mobile-only nodes
  • EXPERIMENTAL Hide Ad Banner: This is also an experimental function aimed at hiding the banner, but still being able to show it again as it is still running, behind the player view. Note that it has no inputs or outputs, you just execute it.
    The iOS/Mobile-only nodes
  • EXPERIMENTAL Close Ad Banner: This is another experimental node for ads. Using this node you can terminate/close the current banner, and then you can initialize a new banner using Show Ad Banner. This node has no inputs or outputs.
    The iOS/Mobile-only nodes
  • Get Input Motion State: Using this function will return a set of useful coordinates to be used for device tilting, acceleration, and rotation-based games. It is normally known as an accelerometer or gyroscope in mobile devices.

    Note

    One important thing to note about this node is that it can only be found in a blueprint of the PlayerController class type. Also, it returns 4 different vector values: Tilt, Rotation Rate, Gravity, and Acceleration.

    The iOS/Mobile-only nodes
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.55.193