Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Uvajed · Dec 13, 2014 at 03:26 PM · javascriptrigidbodycompile-errorbce0019

UnityEngine.GameObject Error

 #pragma strict
 var mermi : GameObject;
 var kalanmermi : float = 30;
 var yazi : GUIText;
 var muzzleflash : Renderer;
 var muzzlelight : Light;
 var ateszamani : float = 0;
 var siralama : float = 0.1;
 
 function Start () {
     yazi.enabled = false;
     muzzleflash.enabled = false;
     muzzlelight.enabled = false; 
 }
 
 function Update () {
     if(ateszamani > 0) {
         ateszamani -=Time.deltaTime;
     }
     if(ateszamani < 0){
         ateszamani = 0;
     }
     if(Input.GetMouseButton(0)&& kalanmermi){
         if(ateszamani == 0){
             var mermii = Instantiate(mermi,transform.position,Quaternion.identity);
             mermii.rigibody.AddForce(transform.forward*2900);
             ateszamani = siralama;
             Ammo();
             Effek();
         }
     }
 }
 
 function Ammo () {
     kalanmermi --;
     if(kalanmermi < 1){
         yazi.enabled = true;
         yield WaitForSeconds (2);
         yazi.enabled = false;
         kalanmermi +=30;
     }
 }
 
 
 function Effek () {
     muzzleflash.renderer.enabled = true;
     muzzlelight.enabled = true;
     yield WaitForSeconds(0.02);
     muzzleflash.renderer.enabled = false;
     muzzlelight.enabled = false;
 }


Error : Assets/Scriptler/Namlu.js(26,8): BCE0019: 'rigibody' is not a member of 'UnityEngine.GameObject'.

Help Me Please

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Antony-Blackett · Dec 13, 2014 at 03:27 PM

You spelt rigidbody wrong.

change line 26 to this:

 mermii.rigidbody.AddForce(transform.forward*2900);
Comment
Add comment · Show 2 · 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 Uvajed · Dec 13, 2014 at 03:49 PM 0
Share

Owwwww I'am stupid...Thank Youu :)

avatar image tanoshimi · Dec 13, 2014 at 04:07 PM 0
Share

@Uvajed - Please accept the answer by clicking the tick mark.

avatar image
0

Answer by Ericool · Dec 13, 2014 at 05:57 PM

In order to make sure when you instantiate you put after that if(mermii.GetComponent() == null) mermii.AddComponent();

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Player Rotation with the mouse 1 Answer

How to make a rigid body ignore collider 1 Answer

object is not a member of 'UnityEngine.Component'. 1 Answer

Android Compiler Errors 1 Answer

AddTorque Isn't Working? 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