Got rid of Fake Cursor

This commit is contained in:
2026-01-23 13:08:49 +00:00
parent 3c08b15c9e
commit c99dfd898c
3 changed files with 5 additions and 133 deletions

View File

@@ -1,27 +0,0 @@
using UnityEngine;
public class FakeCursor : MonoBehaviour
{
public RectTransform RectBounds;
public Camera AttachedCamera;
private void Start()
{
//Cursor.visible = false;
}
private void Update()
{
Vector2 size = new(Screen.width, Screen.height);
Vector2 hSize = new Vector2(AttachedCamera.pixelRect.width, AttachedCamera.pixelRect.height) / 2f;
Debug.Log(hSize);
Vector2 positionRelativeToMiddle = (size - hSize) + (Vector2)Input.mousePosition;
transform.position = AttachedCamera.ScreenToWorldPoint(new Vector3(positionRelativeToMiddle.x, positionRelativeToMiddle.y, 5f));
}
private void OnDestroy()
{
Cursor.visible = true;
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 353f192b40556e34dada2d432a9ffa85
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: