IndieGame/client/Packages/com.unity.ugui@1.0.0/Tests/Runtime/EventSystem/InputModuleTests/MouseUpdate.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

21 lines
452 B
C#

using UnityEngine;
public class MouseUpdate : MonoBehaviour
{
FakeBaseInput m_FakeBaseInput;
void Awake()
{
m_FakeBaseInput = GetComponent<FakeBaseInput>();
}
void Update()
{
Debug.Assert(m_FakeBaseInput, "FakeBaseInput component has not been added to the EventSystem");
// Update mouse position
m_FakeBaseInput.MousePosition.x += 10f;
m_FakeBaseInput.MousePosition.y += 10f;
}
}