How to remove the highlight state of button in unity? - unity3d

I have created button animations but i want it to show just the normal, pressed and disabled animation clips. Do You Have any idea how we can achieve this.
When The Cursor Goes over it should keep playing the "normal animation clip".

Make sure that your Button Settings look similar to this example and that you have created all the needed animations for your button with the correct names.
In this example the Button plays the Normal animation when the player highlights as well. You could also add the Normal animation to the Selected Trigger or just let it empty (or don't create the animation with that specific name)
If you just wan't to keep playing the Normal Animation let Highlighted and Selected empty

Related

Swift: Custom Slider (Slide To Unlock style)

I am trying to implement a slider in the known slide to unlock style from older iphones to perform an action inside my swift app. The Slider should change background color and change the text inside while dragging. When the user drags til the end, the thumbView should stick to the right side and wait for a confirmation (some event) coming in to finally present a new view.
The slider should look something like this:
First state
Second state while dragging
Third state after releasing
I have found a few things on the internet but nothing that comes close to what I want to do. How would I go about doing this? My guess would be a combination of views with drag events but I feel like there must be an easier way. Any Ideas?
Maybe a UISlider with a transparent track on a rectangle view with your text and color. You can set your image as the UISlider's thumb and receive events as the value changes and when the user touches and releases it.
You can use that to for example, animate the thumb back to the start when the user releases on any place except the end of the track. Also, you can set the slider's value from 0 to 1 and use it to calculate the color, so it changes smoothly.
When the user releases on the end of the track, you activate the activity indicator and start your process to present the next view....
Even though this is a possibility, I think I'd try doing a custom control using a pan gesture. It'd give you more control and you could for example choose how the thumb image animates when going back to the start on release.... I dont' think you can do that with UISlider's setValue(animated:).

Why are button transition animations not resetting to normal position?

When I mouseover button it works fine. But when I clicked and enter inside the credits scene and came back the default width of the credits button changed and not reset to normal position.
It should return to normal position whenever if I clicked the button and enters into any scene and return to the current scene.
After having long conversation, this is the summary and solution.
Naveen was using Unity's default animation transitions for buttons.
As, he only needed highlighted transition, he only added that animation which scales the button. But, no animation was added for the normal state. As a result, when he was switching the canvas, the scale of the button was already increased and stayed there.
There can be multiple solutions, but here's mine.
Just add keyframes in normal state, which keeps the button in normal scale.

How can I change animation clip length?

The problem is that it's very short. The animation is walking. But the animation length is very short and I want to extend the walking.
When I select the walking animation I see it's read only:
After selecting it I can change the time but the clip it self will be still short:
Copy all keyframes, make a new animation clip, drag it out in time...
HOW TO:
You can select every single keyframe by dragging a marquee selection around all those keyframes and copying them.
Then create a new Animation Clip with the "Create New Clip..." choice in that dropdown where it's showing your current clip to be read only.
In the new clip, make sure the timeline is at 0, and past all your keyframes.
Now select all those keyframes again, with the marquee selection again, and grab the handle at the end, it should be a dark blue vertical stripe going from the top of the time line to the bottom. And drag this to the right, as far as you need. This should do an equal time scaling for all keyframes.
To make an animation within an imported model editable, select the model, expand the inner assets, select the animation, then press Ctrl+D (probably Cmd+D on mac?) to duplicate the animation clip. Unity will create a separate copy of it in your assets, which will then be editable.
However, for this specific case, I'd recommend looping the animations (you want the character to reach the door, She simply doesn't go that far in the animation). Otherwise, if you really just want to make the clip "longer", you can adjust the playback speed within Animator. After you add in a clip, select its node and you'll see an adjustable speed in the inspector.

How to handle multiple button clicks in javafx?

I made a rubiks cube and its animations are working fine until I press the button for a move before the ending of the animation of a previous move. This is quite reasonable. At first I click a button for a particular move and it rotates as per my code for the button's corresponding event handling method. Now if I press the next button for the next desired move after the previous animation is finished everything goes fine. But if I press the button for the next move while animation of the previous move is on action, then my cube becomes distorted. This is so becuase two separate animations are being simultaneously played on the same cube(s) ( If I am wrong about this reason, please correct me ). In order to prevent this I want to store the button event in a queue in the sequence they are clicked and execute them one after the other after the correspomding animations of each are over. How can I achieve this ?

Unity3d UI Buttons MultiTouch

I am building a game in which there are two ui buttons on the game. I am using unity 4.6 to build this.I have one button that will turn my player blue and another that will turn the player yellow. I need it so when both are pressed my player will turn green. I haven't found much on multitouch with these UI buttons. I would love the help!
In the usual button paradigm, the button completes the action when the user presses the button and then ends the press while the pointer (mouse or finger) still on the button. This is called "click". You are saying that you need this event to happen while the buttons are still pressed — so, you want them to react to press-down event, not the click event. Therefore, they are no longer classical buttons, and you probably shouldn't use Unity's UI Button for this functionality. If you'd use buttons for that, when the user first pressed on both buttons, you'd get green color, but when he then stopped touching them, you'd finally get yellow or blue player.
Instead, use the EventTrigger component on each individual "pseudo-button" to register press-down events, and a separate custom component that would implement your logic. Essentially, the only way to realize your requirements without them being contradictory, is to assign the yellow color when the player is pressing down both "pseudo-buttons" and assign other colors when the player lifts his fingers up from either of them — but given that this particular touch wasn't used to trigger the yellow color.