Files
Magical-Jumping-Bean/Library/metadata/e4/e4e290d31ab7fb54880746bb8f818e0d
T

105 lines
8.3 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í!X2019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ¦€²Ð¦¦¦€#¦€+H€3ÿÿÿÿ1€1€ÿÿÿÿ@Þ Q€j
H€<ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jÕ€Iÿÿÿÿ1€1€ÿÿÿÿÀÞH€j€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€j€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ¦€²
E Þ€#.€,5a Þ€#.€,€r Þ€# .€,
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jñ€JÿÿÿÿÀ1€1€ÿÿÿÿÞ€j€ÿÿÿÿ\€ÿÿÿÿH€rÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€wÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ€#!.€,"€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ%.€j&Õ€“ÿÿÿÿ'1€1€ÿÿÿÿ(ÀÞ)€j€ÿÿÿÿ*H€›€ÿÿÿÿ+1€1€ÿÿÿÿ,@Þ-Q€j.y
 /Þ€#0.€,1 €§2@¾€¶ 3@Þ€#4.€,5H€»ÿÿÿÿ61€1€ÿÿÿÿ7@Þ8Q€j9H€Æÿÿÿÿ:1€1€ÿÿÿÿ;@Þ<Q€j=H€Øÿÿÿÿ>1€1€ÿÿÿÿ?@Þ@Q€jAMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×ÜZ56 :!@iÁJ*€7€ÿÿÿÿ¦€²E Þ.(a Þ.€r Þ .
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jH€ê€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jñ€=ÿÿÿÿ1€1€ÿÿÿÿÞ€j€ÿÿÿÿH€›€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ.y€Q Þ. Þ€X!H€iÿÿÿÿ"1€1€ÿÿÿÿ#@Þ$Q€j%H€uÿÿÿÿ&1€1€ÿÿÿÿ'@Þ(Q€j)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacepp\ày¯Ðx
N. =¡{¿Eˆpd»øèÐEPackages/com.unity.ugui/Tests/Runtime/EventSystem/InputModuleTests.csày¯InputModuleTests
using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.TestTools;
using UnityEngine.UI;
public class InputModuleTests
{
Camera m_Camera;
EventSystem m_EventSystem;
FakeBaseInput m_FakeBaseInput;
StandaloneInputModule m_StandaloneInputModule;
Canvas m_Canvas;
Image m_Image;
[SetUp]
public void TestSetup()
{
// Camera | Canvas (Image) | Event System
m_Camera = new GameObject("Camera").AddComponent<Camera>();
m_Camera.transform.LookAt(Vector3.forward);
m_Canvas = new GameObject("Canvas").AddComponent<Canvas>();
m_Canvas.renderMode = RenderMode.ScreenSpaceCamera;
m_Canvas.worldCamera = m_Camera;
m_Canvas.gameObject.AddComponent<GraphicRaycaster>();
m_Image = new GameObject("Image").AddComponent<Image>();
m_Image.gameObject.transform.SetParent(m_Canvas.transform);
RectTransform imageRectTransform = m_Image.GetComponent<RectTransform>();
imageRectTransform.localScale = new Vector3(500f, 500f, 500f);
imageRectTransform.localPosition = Vector3.zero;
GameObject go = new GameObject("Event System");
m_StandaloneInputModule = go.AddComponent<StandaloneInputModule>();
m_FakeBaseInput = go.AddComponent<FakeBaseInput>();
// Override input with FakeBaseInput so we can send fake mouse/keyboards button presses and touches
m_StandaloneInputModule.inputOverride = m_FakeBaseInput;
m_EventSystem = go.AddComponent<EventSystem>();
m_EventSystem.pixelDragThreshold = 1;
Cursor.lockState = CursorLockMode.None;
}
[UnityTest]
public IEnumerator DragCallbacksDoGetCalled()
{
// While left mouse button is pressed and the mouse is moving, OnBeginDrag and OnDrag callbacks should be called
// Then when the left mouse button is released, OnEndDrag callback should be called
// Add script to EventSystem to update the mouse position
m_EventSystem.gameObject.AddComponent<MouseUpdate>();
// Add script to Image which implements OnBeginDrag, OnDrag & OnEndDrag callbacks
m_Image.gameObject.AddComponent<DragCallbackCheck>();
// Setting required input.mousePresent to fake mouse presence
m_FakeBaseInput.MousePresent = true;
yield return null;
// Left mouse button down simulation
m_FakeBaseInput.MouseButtonDown[0] = true;
yield return null;
// Left mouse button down flag needs to reset in the next frame
m_FakeBaseInput.MouseButtonDown[0] = false;
yield return null;
// Left mouse button up simulation
m_FakeBaseInput.MouseButtonUp[0] = true;
yield return null;
// Left mouse button up flag needs to reset in the next frame
m_FakeBaseInput.MouseButtonUp[0] = false;
yield return null;
LogAssert.Expect(LogType.Log, "OnBeginDrag");
LogAssert.Expect(LogType.Log, "OnDrag");
LogAssert.Expect(LogType.Log, "OnEndDrag");
}
[TearDown]
public void TearDown()
{