Restore the stable legacy Unity project

This commit is contained in:
Meta Vens 2026-08-10 14:57:50 +01:00
commit 7006a6b0dd
2070 changed files with 180490 additions and 169303 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System;
using System.Collections;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
@ -20,20 +21,17 @@ public class ClickRaycaster : MonoBehaviour
_clickCatcher = GetComponent<ClickCatcher>();
_clickCatcher.OnDown.Subscribe(pointer =>
{
RaycastHit hit;
var ray = RayCamera.ScreenPointToRay(pointer.position);
var clickables = new List<ClickableCollider>();
foreach (var clickable in ClickableCollider.Active)
Physics.Raycast(ray, out hit, 1000, Layers.value);
if (hit.collider != null)
{
if (clickable == null || ((1 << clickable.gameObject.layer) & Layers.value) == 0)
continue;
clickables.Add(clickable);
//Debug.Log($"Clicked on gameobject {hit.collider.gameObject}");
var clickable = hit.collider.GetComponent<ClickableCollider>();
if (clickable != null)
clickable.Click(pointer, ray, hit);
}
if (AetheriaYmirPhysicsBridge.Instance.TryCastClickables(clickables, ray, 1000, out var hit))
hit.Clickable.Click(pointer, ray, hit);
else
OnClickMiss?.Invoke(pointer);
else OnClickMiss?.Invoke(pointer);
});
}
}