Create animation from many animation clips - unity3d

i am working on a Unity project where i want to show a car coming out from a garage and travel around the house.
so i created Animation Clips of the door opens, car driving around the house and some others.
lets call them animations a, b, c.
now i want to make this animation run in sequence,in this order a -> b -> c.
how can i managed this?
a method without writing scripts is preffered.
good reference will also be great! im kind a new to unity, know key framing aninations. wanted to beleive that there is an easy way to make it trough.
thanks!

You could add an animation event at the end of your animations playing the next animation. This would require a script, but a very simple one. Add the name of the animation in the event, so it's reusable.

I think without scripting you can't solve you problem so you can look this link or ask someone write your code
http://docs.unity3d.com/ScriptReference/Animation.html
https://unity3d.com/ru/learn/tutorials/modules/beginner/animation

Related

How to do a Unity drop and drag unit

I have my prefabs for my characters but I'm lost wondering how am I able to do a drop-able unit like Clash Of Clans. I'm almost done with the game i'm making does anyone have an idea or suggestion to do it? source code or tutorial will be highly appreciated!
just like items in an inventory
instantiate your prefab on touch.
you can either iterate through a loop and keep instantiating until your out of troops,
or
you can use a bool and an update method, to spawn one unit at your touch/mouse down,
move its position to mouse/touch position in update, as long as still touching,
finally in your mouse/touch up you stop updating his position manual and release him.
if you would like some help with the code for either implementation let me know!

Using unity animations globaly

I am trying to code an end for a level in a simple game. A lot of things need to happen at slightly different times. The character needs to do a celebration. Text needs to pop up on screen. The camera needs to move to show off the win, and finally there needs to be a scene transition.
This all seems like a great thing to solve with an animation. All these things could come in and act on specific key-frames, at the end raising an event and ending the scene.
The problem is it looks like animations have to be attached to specific objects. My camera, player, and the static global GameController are completely unrelated. In fact the global controller can't be related to anything. Because of that my animations don't see all the objects and can't control them. I am instead stuck writing synchronized animations, and code with a lot of yield return new WaitForSeconds(...);. I find this very difficult to manage, and seems like a lot of waste. Is there any way I can use animations, or some other frame based tool to globally animate my game?
Look into Unity's Timeline system. I believe this is exactly the sort of thing it was made for.

Unity 5 3d Shop menu with prefabs

Can someone tell me how to implement other player prefabs as a shop menu LIKE THIS.
I'm going to assume that every pink rectangle is a prefab.
First, you need to understand the concept of prefabs.
Second, you need to know how to instantiate a prefab in run time.
Third, you need to acces the properties for your new fresh instantiate game object so you can change the information of that prefab if you want, maybe you want some values to be 200 instead of 100, idk.
Finally, ther's no "right way" to achieve this, but I recommend you to use Unity UI and scroll rect to achieve your goal.
If you have some time to experiment there will be a good idea to check out a pooling system so you doesn't need to use so much memory at instantiate and destroying objects at runtime, you just reuse them.
Hope it helps.

Having multiple unity scenes open simultaneously

I've been developing a board-style game in Unity3D. The main scene is the board, and has the data about each player and the current (randomly-generated) board stored within it.
I intend to add minigames into the game, for example when landing on a particular space on the board. Naturally, I would like to code the minigame in a separate scene. Is there a way I can do this without losing the instance of the current scene, so that the current scene's state is maintained?
Thanks in advance :)
Short answer: no, but there may be another way to do what you want.
A basic call to Application.LoadLevel call will destroy the current scene before loading the next one. This isn't what you want.
If your minigame is relatively simple, you could use Instantiate to bring in a prefab and spawn it far away from the rest of your scene. You can even use scripts to switch to another camera, toggle player controls and other interactions in the scene, and so on. Once the minigame is done, you can destroy or disable whatever you brought in, and re-enable whatever needs to be turned on in the main scene.
You could create a separate scene and call Application.LoadLevelAdditive to load that scene without destroying the current one. As above, you can then use scripts to manage which cameras and scene behaviors are active.
If you're careful, you don't really need two separate scenes. It may be enough to "fake" a scene switch.
Hard to give a complete answer without code, but you should look into the following things either with the unity documentation or youtube:
PlayerPrefs, this is one way of saving data, although i believe it isn't entirely secure i.e. being able to edit from a text file.
Serializable, this is apparently better than playerprefs.
DonDestroyOnLoad, can carry over information to multiple scenes.
Static variables, again not sure if this will help your particular problem.

Unity: Third Person Collision with Animated Platforms

first time posting on stack and everything looks promising so far! I had a bit of a complicated question here so I'll do my best to provide exact details of what I'd like to get accomplished. I'm working with a third person controller in unity, so far everything is going great. I've dabbled with basic up and down platforms, a little glitchy but things work. Anytime my player runs through a mesh I make sure the mesh collider is working and a 'rigid-body' is attached set to Kinematic. Here's the kicker, in my game I have turning gears which the player can jump on. This is great except for the player doesn't turn with my gear, which would make sense according to my game-play. What would be the process for getting my character to interact with this animated mesh? I imagine some sort of script which my nooby mind cannot fathom at this point in my unity career. If anyone out there knows the solution to this, I would love to have any assistance, either way I'll plugging away at a solution. Thanks again!!
This is assuming that you're using the packages that ship with Unity3D, which it sounds like you are. After importing the Character Controllers package, you'll have a bunch of scripts in the Standard Assets\Character Controllers\Sources\Scripts folder, in the project hierarchy view. There's a script in there called CharacterMotor.js, attach that to the same GameObject you're running ThirdPersonController on.
Essentially this script adds more interactivity between the character and the scene. There's several methods inside this script that automatically move the character when in contact with a moving object (as long as it has a collision mesh) basically by inheriting the object's velocity.
If your gear/cog wheel has a proper collision mesh set up, adding this script to your character should be all that you require.