Documentation & Tutorials
  • Pivec Labs Documentation & Tutorials
  • Assets for Game Creator 1
    • Action Pack 1
      • Action List
        • Misc Actions
        • Object Actions
        • TMP Actions
      • Examples
        • Example 1 TMP
        • Example 2 Objects
        • Example 3 Actions
    • Action Pack 2
      • Action List
        • Camera Actions
        • Graphics Actions
        • Audio Actions
        • Video Actions
      • Triggers
      • Components
      • Examples
        • Example 1 - Camera
        • Example 2 - Camera FPS
        • Example 3 - Graphics
        • Example 4 - Sounds
        • Example 5 - Audio Player
        • Example 6 - Video Player
    • Action Pack 3
      • Action List
        • Day/Night Cycle
        • Light Control
      • Components
      • Examples
        • Example 1 - Day Night Cycle
        • Example 2 - Light Control
    • Accessibility Module
      • Components
      • Setup
      • Auditory Aids
        • Closed Captions for Sounds
        • Volume Control with Tags
        • Multiple Volume Controls
      • Motoric Aids
        • Configurable Tank Camera
        • On-Screen Multi-Function Joystick
        • Dynamic Touchstick
        • Multi-Function Touchstick
      • Cognitive Aids
        • Parental Controls with Password
        • Dyslexia Font Options
        • Motion Sickness Prevention
        • Gameplay Speed and Sensitivity
      • Visual Aids
        • Colour Picker
        • Variable Text Size
        • Object Outlining
        • Colour Switching
        • Colour Correction
    • Mobile Components
      • Actions
        • Haptics
        • Camera
        • TouchSticks
        • Gyroscope
        • Utilities
      • Triggers
        • Touch Gestures
      • Conditions
      • Components
      • Prefabs
      • Examples
        • Example 1 Haptics
        • Example 2 Cameras
        • Example 3 Gestures
        • Example 4 Controls
        • Example 5 Steering Wheel/Pedals
        • Example 6 Gyroscope Controls
        • Example 7 Gyroscope Camera
        • Example 8 Utilities
        • Example 9 AutoRun
      • Extras
    • UI Components
      • Canvas Components
        • Canvas Animations
        • 3D Models on a Canvas
        • Video on a Canvas
      • Animating UI Elements
        • Cross Fade Elements
        • Slide Elements
        • Shake UI Element
        • Tooltips
      • Text Mesh Pro & uGUI Text
      • Colour Picker Component
      • Mini Map Component
        • MiniMap QuickStart
        • Fullscreen Map
        • Adding Markers
        • Adding Labels
      • System Info Panel
        • SysInfo Quickstart
        • Using SysInfo Toggle
      • Main Menu Templates
        • Customising the Prefabs
        • Load/Save System
        • Comic Strip Example
    • Developer Tools
      • Time Manager
        • Actions & Conditions
      • Waypoint System
      • Click to Spawn Objects
      • In-Game Console
      • In-Game Screen Capture
    • Turn Based Module
    • VR Module GC1
  • Assets for Unity
    • Developer Tools for Unity
      • Click to Spawn
      • In-Game Screen Capture
      • In-Game Console
    • Mini Map System
      • MiniMap Quickstart
      • Map Parameters
      • Adding Makers
  • Tutorials
    • Tutorials for Game Creator 1
      • Installing and Updating Modules
      • Adding Actions to the Button Bar
      • Changing the Graphics for TouchStick
      • Adding Passwords to Player Actions
      • Using the Colour Picker with Variables
      • Creating a 3D Inspection Panel for Game Objects
      • Customising the UI MiniMap
      • Creating a toggle for the SysInfo Panel
      • Simple Player Run on Left Shift Down
      • Pan Follow Camera with Keyboard
    • Tutorials for Unity
  • ANNEX
    • Roadmap
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Assets for Game Creator 1
  2. Mobile Components
  3. Actions

Utilities

PreviousGyroscopeNextTriggers

Last updated 4 years ago

Was this helpful?

The following utility Actions have been included in the Asset.

Action Name

Description

Features Supported

Checks for Accelerometer, Audio, Gyroscope, Vibrations, and Location.

Get Opsys

Writes the Operating System to a String Variable

Get Network Connection

Checks the Network Connection and writes to a String Variable

Is Mobile

Checks if the current runtime platform is a Mobile Device

Get Battery Level

Gets the Battery Level and writes to a Number Variable

Fill Battery Image

Fills and Image from a Number Variable

Number Variable to Text

Writes to a Text string from a Number Variable

  1. The Features Supported Action is similar to the Conditions included in this Module. However, where a Condition will do an instant check and execute an Action depending on true or false return, This Action will write the result to a Bool Variable. This can then be used to display features, error messages, or other things depending on requirements. The features checked and selected from the dropdown are:

  • Accelerometer

  • Audio Services

  • Gyroscope

  • Vibrations

  • Location Services

2. The Get Opsys Action will write the current operating system platform to a string variable. This is not limited to Mobile devices and can also be used on a desktop. The format returned would be:

  • iPhone OS 8.4 - on a iOS 8.4 system

  • Android OS API-22 - on an Android 5.1 system

See the Unity Manual under SysInfo for further information on this data.

3. The Get Network Connection Action will write the current Network Status to a string variable. This is not limited to Mobile devices and can also be used on a desktop. The Strings returned are:

  • Internet not Available.

  • Internet via carrier data network.

  • Internet via Local Area Network.

This Action also repeats and can be used to show if the Internet becomes unavailable.

4. The Is Mobile Action will write true or false to a Bool variable. This is not limited to Mobile devices and can also be used on a desktop but will obviously return false. This action can be used to execute some functions when running on a mobile device and other functions when on a Desktop.

5. The Get Battery Level Action will write the current Battery charge to a Number Variable. This Action also repeats and when used in conjunction with the Fill and Image and Number Var to text, it can be used to show the current battery level on a UI Canvas.

To use the Example 8, you must first create the required Variables for each Action used.

For more information on Utility Actions, see.

Example 8 - Utilities