Skip to content

Blog

[Solved][Python] Numpy Erorr: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

When using Numpy format data for conditional judgment, sometimes we get the following error message:

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Read More »[Solved][Python] Numpy Erorr: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
unity

[Unity] Button Event: OnPointerDown() and OnPointerUp()

The button component is built in the Unity UI layout, so we can simply to create the function to trigger the button event when user clicking. But if it is necessary to set the events of the button "pressed" and "released" separately, we can write a script to inherit the Button class, and override the OnPointerDown() event and OnPointerUp() event.

Read More »[Unity] Button Event: OnPointerDown() and OnPointerUp()