remove OnMouse_event trigger to prevent warning on Andoird, iOS, #170

master
neuecc 2020-09-21 12:50:25 +09:00
parent 21e5cc22c7
commit fc7b9660a5
3 changed files with 30 additions and 9 deletions

View File

@ -1541,6 +1541,7 @@ namespace Cysharp.Threading.Tasks.Triggers
#endregion #endregion
#region MouseDown #region MouseDown
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseDownHandler public interface IAsyncOnMouseDownHandler
{ {
@ -1597,9 +1598,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseDownHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDownAsync(); return ((IAsyncOnMouseDownHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDownAsync();
} }
} }
#endif
#endregion #endregion
#region MouseDrag #region MouseDrag
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseDragHandler public interface IAsyncOnMouseDragHandler
{ {
@ -1656,9 +1659,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseDragHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDragAsync(); return ((IAsyncOnMouseDragHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseDragAsync();
} }
} }
#endif
#endregion #endregion
#region MouseEnter #region MouseEnter
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseEnterHandler public interface IAsyncOnMouseEnterHandler
{ {
@ -1715,9 +1720,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseEnterHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseEnterAsync(); return ((IAsyncOnMouseEnterHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseEnterAsync();
} }
} }
#endif
#endregion #endregion
#region MouseExit #region MouseExit
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseExitHandler public interface IAsyncOnMouseExitHandler
{ {
@ -1774,9 +1781,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseExitHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseExitAsync(); return ((IAsyncOnMouseExitHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseExitAsync();
} }
} }
#endif
#endregion #endregion
#region MouseOver #region MouseOver
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseOverHandler public interface IAsyncOnMouseOverHandler
{ {
@ -1833,9 +1842,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseOverHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseOverAsync(); return ((IAsyncOnMouseOverHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseOverAsync();
} }
} }
#endif
#endregion #endregion
#region MouseUp #region MouseUp
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseUpHandler public interface IAsyncOnMouseUpHandler
{ {
@ -1892,9 +1903,11 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseUpHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsync(); return ((IAsyncOnMouseUpHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsync();
} }
} }
#endif
#endregion #endregion
#region MouseUpAsButton #region MouseUpAsButton
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
public interface IAsyncOnMouseUpAsButtonHandler public interface IAsyncOnMouseUpAsButtonHandler
{ {
@ -1951,6 +1964,7 @@ namespace Cysharp.Threading.Tasks.Triggers
return ((IAsyncOnMouseUpAsButtonHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsButtonAsync(); return ((IAsyncOnMouseUpAsButtonHandler)new AsyncTriggerHandler<AsyncUnit>(this, cancellationToken, true)).OnMouseUpAsButtonAsync();
} }
} }
#endif
#endregion #endregion
#region ParticleCollision #region ParticleCollision

View File

@ -25,13 +25,7 @@
("Update", "Update", "AsyncUnit", null, empty), ("Update", "Update", "AsyncUnit", null, empty),
("FixedUpdate", "FixedUpdate", "AsyncUnit", null, empty), ("FixedUpdate", "FixedUpdate", "AsyncUnit", null, empty),
("LateUpdate", "LateUpdate", "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") }), ("ParticleCollision", "OnParticleCollision", "GameObject", null, new []{ ("GameObject", "other") }),
("RectTransformDimensionsChange", "OnRectTransformDimensionsChange", "AsyncUnit", null, empty), ("RectTransformDimensionsChange", "OnRectTransformDimensionsChange", "AsyncUnit", null, empty),
("RectTransformRemoved", "OnRectTransformRemoved", "AsyncUnit", null, empty), ("RectTransformRemoved", "OnRectTransformRemoved", "AsyncUnit", null, empty),
@ -47,6 +41,15 @@
("BecameInvisible", "OnBecameInvisible", "AsyncUnit", null, empty), ("BecameInvisible", "OnBecameInvisible", "AsyncUnit", null, empty),
("BecameVisible", "OnBecameVisible", "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 // new in v2
("ApplicationFocus", "OnApplicationFocus", "bool", null, new []{("bool", "hasFocus") }), ("ApplicationFocus", "OnApplicationFocus", "bool", null, new []{("bool", "hasFocus") }),
("ApplicationPause", "OnApplicationPause", "bool", null, new []{("bool", "pauseStatus") }), ("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 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> 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 #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 #> #region <#= t.triggerName #>
<# if(Is2019_3(t.triggerName)) { #> <# if(Is2019_3(t.triggerName)) { #>
#if UNITY_2019_3_OR_NEWER #if UNITY_2019_3_OR_NEWER
<# } #>
<# if(IsMouseTrigger(t.triggerName)) { #>
#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO)
<# } #> <# } #>
public interface <#= ToInterfaceName(t.methodName) #> 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(); 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 #endif
<# } #> <# } #>
#endregion #endregion

View File

@ -543,7 +543,7 @@ PlayerSettings:
platformArchitecture: {} platformArchitecture: {}
scriptingBackend: scriptingBackend:
Android: 1 Android: 1
Standalone: 0 Standalone: 1
il2cppCompilerConfiguration: {} il2cppCompilerConfiguration: {}
managedStrippingLevel: {} managedStrippingLevel: {}
incrementalIl2cppBuild: {} incrementalIl2cppBuild: {}