Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by csco · Dec 04, 2015 at 10:56 AM · animationanimatortriggerparameter

Parameter does not exist

I do not know what is the problem.

 using UnityEngine;
 using System.Collections;
 
 public class FireController : MonoBehaviour {
     public GameObject bulletPrototype;
     Animator anim;
     bool onFire = false;
     // Use this for initialization
     void Start () {
         anim = GetComponent<Animator> ();
     }
     
     // Update is called once per frame
     void FixedUpdate () {
         if(onFire){
             anim.SetTrigger("Bullet");
             onFire = false;
         }
     }
 
     public void animat(){
         onFire = true;
     }
 
     public void Shoot(){
         GameObject bulletCopy = Instantiate (bulletPrototype);
         bulletCopy.transform.position = new Vector3(transform.parent.position.x+1.35f,transform.parent.position.y+0.15f,0f);
         bulletCopy.GetComponent<BulletController> ().direction = new Vector3 (transform.parent.localScale.x,0,0);
     }
 }
 

alt text

alt text

duda1.jpg (34.2 kB)
duda.jpg (40.5 kB)
Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Dec 04, 2015 at 12:19 PM 0
Share

And Bullet is a trigger? Not a bool?

avatar image csco tanoshimi · Dec 04, 2015 at 03:16 PM 0
Share

Yes, it's a trigger. I also tried with a bool and shows the same error. alt text

duda2.jpg (62.1 kB)
avatar image Wilson28300 · Dec 04, 2015 at 03:57 PM 0
Share

Have you attached the script to the object which has the animator component attached? Also, have you set the animator controller which has the parameter to the animator component of the object?

avatar image csco Wilson28300 · Dec 04, 2015 at 04:06 PM 0
Share

yes alt text

duda4.jpg (61.5 kB)

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by MrMarkusHD · Aug 23, 2017 at 02:16 PM

@csco There is a really easy way to fix that...

Go to Window > Animator ||||| Than in the up left corner you should see Layers, Parameters ||||| Click on Parameters ||||| Than on the little "+" sign ||||| And pick Trigger ||||| Than make as many as you need and rename them on what you need ||||| ||||| example.... rename the trigger to Bullet |||||

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ContinentalChamp · May 05, 2021 at 01:03 PM 0
Share

biz de bunu yaptık mal

avatar image
0

Answer by csco · Dec 06, 2015 at 02:43 PM

I think the problem is that I had placed an animator in object that is a child of another object which already has an animator, so only the parameters used for the father's animator are useful; I solved this problem by creating an animation from the father object. That is the only solution that I have found.

alt text


sin-titulo.png (19.8 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by dhurstdev · Feb 17, 2017 at 09:12 AM

If the error is from AssetDatabase.Refresh(): "Parameter 'Normal' does not exist. UnityEditor.AssetDatabase:Refresh()", you can put the Refresh call in a Couroutine with "yield return null;" before it, to fix the warning.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

On/Off Animator using script 2 Answers

How check if an animation trigger is playing? 1 Answer

OnTriggerStay2D Breaks When Adding AnimationController 1 Answer

Player freezes at start of scene due to animator 0 Answers

Animation Trigger is saved even if it is not used immediately. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges