Okay I have two problems here.
Please see this video.
1:
I'd like to put a texture animation in Makinom behind motion, but how should it be done?
If it's now, it's being treated with a GUI button. This isn't in the best state.
2:
I'd like to reproduce setting of Mecanim in Makinom, but how should it be done?
Source:
=============================================
using UnityEngine;
using System.Collections;
public class player : MonoBehaviour {
public Animator anim;
// Use this for initialization
void Start ()
{
anim = GetComponent();
}
// Update is called once per frame
void Update ()
{
if(Input.GetKeyDown("1"))
{
anim.Play ("Run",-1,0f);
}
if(Input.GetKeyDown("2"))
{
anim.Play ("Shoot",-1,0f);
}
if(Input.GetKeyDown("3"))
{
anim.Play ("Walk",-1,0f);
}
}
}
=============================================
Can anybody help me?
2) Use a Tick Machine with the Update start type enabled. In the schematic of the machine use an Input Key node to check for your different input keys (which need to be set up in Makinom's editor, this is explaind in different game tutorials series). In the individual input key's next slots, add Play Mecanim Animation nodes that use your needed Mecanim setup (e.g. using Play play mode and the names of your states.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Tutorial's Survival Shooter is very profitable.
1:
Sorry,I want to do that mecanim and texture animation are carried out at the same time.
I tried ChangeMaterial,but failed. Is ChangeMaterial different?
2:
>In the individual input key's next slots
Where should Animation in Mecanim be assigned?
This is screenshot.
Thank you in advance.
2) You need to add an Input Key node to your schematic. You can check multiple input keys there - each input key will have it's own next slot on the node in the editor.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!