Physical Clickable

< 1 min read

Updated on November 20, 2025

Introduction

A simple component with a single UnityEvent for adding a function to perform when the the gameobject this component on is Clicked.

In the demo scene, there is box with this component in the scene, that once clicked, will bring up the Inventory. All of that is set up in the inspector.

Setting up

Setting up just requires adding this component to a gameobject with a collider.

Event

On Click Event
Triggers when clicked on in the world

Scripting

/// <summary>
/// Manually trigger the OnClick event here - InputManager triggers this event when clicked on in the world
/// </summary>
public void OnClick()