Raycast
The Raycast function can be used for efficiently finding an Object within a scene in Unity.
Raycast in Unity programming is a kind of laser beam, which will shoot from a location in a scene and shoot until it hits a Collider. When it collides a Collider, the information(RaycastHit) of the collided Object and position within the scene will be returned.
For more details on Unity Raycast, please review the Unity guide.
📘 Unity Raycast https://docs.unity3d.com/Manual/CameraRays.html
The Unity Raycast can be used in ZEPETO.Script by completing the following steps:
First, import the Raycast related class.
The following is an example code for the Raycast function:
📘 Please refer to the following guide for explanations of the $ref and $unref used in the script. [$ref & $unref]
Through the test code, you can check that the information of the object is output by clicking the Cube with the mouse pointer in the Scene.

Find more information for the Raycast API used in the ZEPETO.Script by going to the link below.
