switch from Unity version control to git

This commit is contained in:
Leo Qu
2026-01-07 23:54:53 -05:00
commit a098ec74d9
10166 changed files with 1614580 additions and 0 deletions

25
Assets/ObjectSelector.cs Normal file
View File

@@ -0,0 +1,25 @@
using UnityEngine;
public class ObjectSelector : MonoBehaviour
{
public static GameObject selectedObject;
void Update()
{
Debug.Log("Selector is running");
if (Input.GetMouseButtonDown(0))
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray, out RaycastHit hit))
{
Debug.Log("Hit: " + hit.collider.gameObject.name);
if (hit.collider.CompareTag("Selectable"))
{
ObjectSelector.selectedObject = hit.collider.transform.root.gameObject;
Debug.Log("Selected Root Object: " + ObjectSelector.selectedObject.name);
}
}
}
}
}