Easy Grid Builder Pro 2 Documentation
Easy Grid Builder Pro 2 Documentation
  • Getting Started
    • Introduction
    • Quick Start Guide
    • API Documentation
      • API - All Accessible Events
      • API - Grid Manager Classes
      • API - Easy Grid Builder Pro Class
      • API - Grid Buildable Classes
    • Render Pipeline Compatibility
    • Third Party Assets Compatibility
    • Patch Notes
  • Walk Through Tutorial
    • Make a 2D City Builder
      • Setting Up The Scene
      • Setting Up the Grid Values
      • Setting Up Visual - Object Grid
      • Creating Buildable Objects
      • Creating Buildable Object SO Assets
      • Adding Grid Area Disablers And Enablers
    • Make a 3D City Builder
      • Setting Up The Scene
      • Exploring Grid Properties
      • Adding Grid Visuals - Object Grid
      • Creating Buildable Objects
      • Creating Buildable Object SO Assets
      • Explore UI and Quick Play Testing
      • Exploring Grid Managers
      • Exploring Grid Modules
      • Polishing Buildable Objects with Effects
      • Adding Grid Visuals - Procedural Grid
      • Setting Up Custom Surface Projection
      • Adding Terrain
    • Make a 3D Modular House Builder
    • Review Demo Scenes
  • Explore Major Features
    • Setting Up Buildable Objects
    • Setting Up Buildable Objects SO Assets
    • Grid UI Features
    • Grid Visual - Object Grid Features
    • Grid Visual - Procedural Grid Features
    • Explore Build Conditions
    • Explore Grid Heat Map Features
  • Scriptable Objects
    • Buildable Grid Object SO
      • Buildable Grid Object Category SO
    • Buildable Edge Object SO
      • Buildable Edge Object Category SO
    • Buildable Corner Object SO
      • Buildable Corner Object Category SO
    • Buildable Free Object SO
      • Buildable Free Object Category SO
    • Buildable Object UI Category SO
    • Grid Modifier SO
  • Primary Components
    • Easy Grid Builder Pro XZ / XY
      • Easy Grid Builder Pro
      • Editor Grid Visual Handler XZ / XY
      • Grid Data Handler
    • Buildable Object Configurator
    • Buildable Grid Object
    • Buildable Edge Object
    • Buildable Corner Object
    • Buildable Free Object
    • Grid Manager
      • Grid Built Objects Manager
      • Grid Input Manager
      • Grid Save And Load Manager
      • Grid Heat Map Manager
      • Grid Area Modifier Manager
      • Grid Area Disabler Manager
      • Grid Area Enabler Manager
      • Grid UI Manager
    • Buildable Grid Object Ghost
    • Buildable Edge Object Ghost
    • Buildable Corner Object Ghost
    • Buildable Free Object Ghost
    • Buildable Object Destroyer
    • Buildable Object Selector
    • Buildable Object Mover
  • Secondary Components
    • Grid Heat Map
    • Grid Area
    • Grid Area Disabler
      • Basic Grid Area Disabler
    • Grid Area Enabler
      • Basic Grid Area Enabler
    • Grid Area Modifier
    • Buildable Free Object Snapper
    • Grid Area Visual Generator
    • Grid Cell Indicator Visual Generator
    • Buildable Object Effects
    • Grid Custom Surface Projector
    • UI Third Person Cursor Handler
  • Utility Components
    • Terrain Data Manager
    • Global Time Tick Manager
    • WASD Camera Controller
    • Scaling Effect
    • Easy Screen Shot Maker
Powered by GitBook
On this page
  • Example Use case
  • API
  1. Secondary Components

UI Third Person Cursor Handler

PreviousGrid Custom Surface ProjectorNextTerrain Data Manager

Last updated 5 months ago

The UI Third Person Cursor Handler component is located in: SoulGames > Easy Grid Builder Pro 2 > Scripts > Grid UI Scripts uses Easy Grid Builder Pro 2 to manage cursor behavior in third-person games. It integrates seamlessly with Unity's Input System and provides functionality for locking, unlocking, and visually updating the cursor based on user interactions.

This component is designed to work with the EGB Pro 2 UI Third Person Cursor prefab, located in: SoulGames > Easy Grid Builder Pro 2 > Prefabs > Built In UI.

Property
Function
Required

Cursor Pointer Panel

A UI element representing the third-person cursor pointer. This panel's visibility is updated dynamically.

Yes

Keep Cursor Locked at Start

Determines whether the cursor is locked when the game starts

No

Cursor Lock and Unlock Toggle Action

An action from the Input System used to toggle the cursor lock state

No

Hide Cursor Pointer When Cursor Is Unlocked

Controls whether the Cursor Pointer UI Panel is hidden when the cursor is unlocked

No


Example Use case

It is used to toggle cursor visibility in third-person or first-person games. For instance, in a third-person game, you can set the Cursor Lock and Unlock Toggle Action input to your inventory or menu toggle key. When this key is pressed, the game will automatically toggle the cursor’s visibility, enabling or disabling the third-person pointer. Once the menu is closed, the game will return to the third-person pointer cursor.


API

namespace SoulGames.EasyGridBuilderPro
private void OnCursorLockAndUnlockTogglePerformed(InputAction.CallbackContext context)
// Toggles the cursor's lock state between CursorLockMode.Locked and CursorLockMode.None
// Updates the visibility of the Cursor Pointer Panel based on the new lock state