mirror of https://github.com/Cysharp/UniTask
remove OnMouse_event trigger to prevent warning on Andoird, iOS, #170
parent
21e5cc22c7
commit
fc7b9660a5
|
@ -1541,6 +1541,7 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
#endregion
|
||||
|
||||
#region MouseDown
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseDownHandler
|
||||
{
|
||||
|
@ -1597,9 +1598,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseDownHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDownAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseDrag
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseDragHandler
|
||||
{
|
||||
|
@ -1656,9 +1659,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseDragHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDragAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseEnter
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseEnterHandler
|
||||
{
|
||||
|
@ -1715,9 +1720,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseEnterHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseEnterAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseExit
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseExitHandler
|
||||
{
|
||||
|
@ -1774,9 +1781,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseExitHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseExitAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseOver
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseOverHandler
|
||||
{
|
||||
|
@ -1833,9 +1842,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseOverHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseOverAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseUp
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseUpHandler
|
||||
{
|
||||
|
@ -1892,9 +1903,11 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseUpHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region MouseUpAsButton
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
|
||||
public interface IAsyncOnMouseUpAsButtonHandler
|
||||
{
|
||||
|
@ -1951,6 +1964,7 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((IAsyncOnMouseUpAsButtonHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsButtonAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region ParticleCollision
|
||||
|
|
|
@ -25,13 +25,7 @@
|
|||
("Update", "Update", "AsyncUnit", null, empty),
|
||||
("FixedUpdate", "FixedUpdate", "AsyncUnit", null, empty),
|
||||
("LateUpdate", "LateUpdate", "AsyncUnit", null, empty),
|
||||
("MouseDown", "OnMouseDown", "AsyncUnit", null, empty),
|
||||
("MouseDrag", "OnMouseDrag", "AsyncUnit", null, empty),
|
||||
("MouseEnter", "OnMouseEnter", "AsyncUnit", null, empty),
|
||||
("MouseExit", "OnMouseExit", "AsyncUnit", null, empty),
|
||||
("MouseOver", "OnMouseOver", "AsyncUnit", null, empty),
|
||||
("MouseUp", "OnMouseUp", "AsyncUnit", null, empty),
|
||||
("MouseUpAsButton", "OnMouseUpAsButton", "AsyncUnit", null, empty),
|
||||
|
||||
("ParticleCollision", "OnParticleCollision", "GameObject", null, new []{ ("GameObject", "other") }),
|
||||
("RectTransformDimensionsChange", "OnRectTransformDimensionsChange", "AsyncUnit", null, empty),
|
||||
("RectTransformRemoved", "OnRectTransformRemoved", "AsyncUnit", null, empty),
|
||||
|
@ -47,6 +41,15 @@
|
|||
("BecameInvisible", "OnBecameInvisible", "AsyncUnit", null, empty),
|
||||
("BecameVisible", "OnBecameVisible", "AsyncUnit", null, empty),
|
||||
|
||||
// Mouse... #if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
("MouseDown", "OnMouseDown", "AsyncUnit", null, empty),
|
||||
("MouseDrag", "OnMouseDrag", "AsyncUnit", null, empty),
|
||||
("MouseEnter", "OnMouseEnter", "AsyncUnit", null, empty),
|
||||
("MouseExit", "OnMouseExit", "AsyncUnit", null, empty),
|
||||
("MouseOver", "OnMouseOver", "AsyncUnit", null, empty),
|
||||
("MouseUp", "OnMouseUp", "AsyncUnit", null, empty),
|
||||
("MouseUpAsButton", "OnMouseUpAsButton", "AsyncUnit", null, empty),
|
||||
|
||||
// new in v2
|
||||
("ApplicationFocus", "OnApplicationFocus", "bool", null, new []{("bool", "hasFocus") }),
|
||||
("ApplicationPause", "OnApplicationPause", "bool", null, new []{("bool", "pauseStatus") }),
|
||||
|
@ -104,6 +107,7 @@
|
|||
Func<(string argType, string argName)[], string> BuildResultParameter = x => x.Length == 0 ? "AsyncUnit.Default" : "(" + string.Join(", ", x.Select(y => y.argName)) + ")";
|
||||
|
||||
Func<string, bool> Is2019_3 = x => x == "ParticleUpdateJobScheduled";
|
||||
Func<string, bool> IsMouseTrigger = x => x.StartsWith("Mouse");
|
||||
#>
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
|
||||
|
@ -117,6 +121,9 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
#region <#= t.triggerName #>
|
||||
<# if(Is2019_3(t.triggerName)) { #>
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
<# } #>
|
||||
<# if(IsMouseTrigger(t.triggerName)) { #>
|
||||
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
|
||||
<# } #>
|
||||
|
||||
public interface <#= ToInterfaceName(t.methodName) #>
|
||||
|
@ -174,7 +181,7 @@ namespace Cysharp.Threading.Tasks.Triggers
|
|||
return ((<#= ToInterfaceName(t.methodName) #>)new AsyncTriggerHandler<<#= t.returnType #>>(this, cancellationToken, true)).<#= t.methodName #>Async();
|
||||
}
|
||||
}
|
||||
<# if(Is2019_3(t.triggerName)) { #>
|
||||
<# if(Is2019_3(t.triggerName) || IsMouseTrigger(t.triggerName)) { #>
|
||||
#endif
|
||||
<# } #>
|
||||
#endregion
|
||||
|
|
|
@ -543,7 +543,7 @@ PlayerSettings:
|
|||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Standalone: 0
|
||||
Standalone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel: {}
|
||||
incrementalIl2cppBuild: {}
|
||||
|
|
Loading…
Reference in New Issue