I want to combine LOCOMOTION+UnityChan fbx animation

Asked 2 years ago, Updated 2 years ago, 65 views


I bought Unity-chan from the Meghanim Locomotion Starter Kit. accompanied by locomotion, locomotionplayer
Plus, I tried to merge the two types of scripts that I wrote myself and use them all with the animation that Unity originally had, but Unity-chan hardened.
To be more detailed,

1. I put Unity's animation (wait, damaged, lost, jump, refresh, run, slide, umatobi) in the animator.
2. I made a make transition to the turn on spot of locomotion.
3, I wrote a script (it works fine).
4, I tried playing it, but Unity has hardened.
 
If you reduce the amount of scripts, they work as instructed.
Then, I thought that the data was heavy, so I made a new project and tried it the same way as possible, but it didn't work.
Why is that?
Also, is it not possible to include all animations in the animator?

Script

using System.Collections;
using System.Collections.General;
using UnityEngine;

public class player:MonoBehavior {
    public animator anim;

    // Use this for initialization
    void Start() {
        anim=GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetKeyDown("1")}
            anim.Play("WAIT01", -1,0f);
        }  else if(Input.GetKeyDown("2")){
            anim.Play("WAIT02", -1,0f);
        }  else if(Input.GetKeyDown("3")){
            anim.Play("WAIT03", -1,0f);
        }  else if(Input.GetKeyDown("4")){
            anim.Play("WAIT4", -1,0f);
        }  else if(Input.GetKeyDown("5")){
            anim.Play ("DAMAGED 00", -1,0f);
        }  else if(Input.GetKeyDown("6")){
            anim.Play("JUMP01", -1,0f);
        }  else if(Input.GetKeyDown("7")){
            anim.Play("JUMP01B", -1,0f);
        }  else if(Input.GetKeyDown("8")){
            anim.Play("LOSE00", -1,0f);
        }  else if(Input.GetKeyDown("9")){
            anim.Play ("JUMP00B", -1,0f);
        }  else if(Input.GetKeyDown("0")){
            anim.Play ("JUMP00", -1,0f);
        }  else if(Input.GetKeyDown("-")}
            anim.Play ("REFLESH00", -1,0f);
        }  else if(Input.GetKeyDown("^")}
            anim.Play("HANDUP00", -1,0f);
        }  else if(Input.GetKeyDown(" )))){
            anim.Play("DAMAGED01", -1,0f);
        }  else if(Input.GetKeyDown("["))}
            anim.Play("RUN00_F", -1,0f);
        }  else if(Input.GetKeyDown("@")}
            anim.Play("RUN_L", -1,0f);
        }  else if(Input.GetKeyDown("p")}
            anim.Play("SLIDE", -1,0f);
        }  else if(Input.GetKeyDown("o")}
            anim.Play("RUN00_R", -1,0f);
        }  else if(Input.GetKeyDown("i")}
            anim.Play ("UMATOBI00", -1,0f);
        }   
    }
}

unity3d genymotion

2022-09-30 21:28

1 Answers

There was no problem with the script.
It seems that Unity itself did not accept instructions from scripts such as などで^, so
(We are studying whether Unity itself or Unity itself is bad.)
I took it off and typed another letter, and it was ok.


2022-09-30 21:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.