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

@@ -749,7 +749,6 @@ Transform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1003288350} - {fileID: 1003288350}
- {fileID: 1557857216}
- {fileID: 479830775} - {fileID: 479830775}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -989,100 +988,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1001 &1557857215
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 782229191}
m_Modifications:
- target: {fileID: 3265567963809100238, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: AttachedCamera
value:
objectReference: {fileID: 782229189}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.z
value: 8
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7297418410848169550, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7297418410848169550, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.9
objectReference: {fileID: 0}
- target: {fileID: 7297418410848169550, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.45
objectReference: {fileID: 0}
- target: {fileID: 7563216493506774349, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
propertyPath: m_Name
value: Cursor
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 15c9da29f34c88d4c82acf24cc874e3b, type: 3}
--- !u!4 &1557857216 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6997620146033860791, guid: 15c9da29f34c88d4c82acf24cc874e3b,
type: 3}
m_PrefabInstance: {fileID: 1557857215}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1758685209 --- !u!1001 &1758685209
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1151,6 +1056,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4509675489510948023, guid: e29ce1fe47a855c4e907d4312c9e9d6e,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4797822364417701868, guid: e29ce1fe47a855c4e907d4312c9e9d6e, - target: {fileID: 4797822364417701868, guid: e29ce1fe47a855c4e907d4312c9e9d6e,
type: 3} type: 3}
propertyPath: m_OnDidEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target propertyPath: m_OnDidEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target

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: