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 Elrien · Jul 15, 2014 at 10:36 PM · inspectorpublic variable

Inspector doesn't show the public...please, help:)

hi, i'm trying to make a Flappy Bird game following a tutorial but in the inspector tab even if i write "public" in the script (C#) it shows just the name of the script. i've read some other questions but the answers didn't really help me... can you tell me how to fix this? oh and i don't know if this should happen, but when i press new project it doesn't show some packages, but just the ones i've downloaded, but in the trailers i've seen they say that there are some packages already available... but this concerns me less... thank you a lot for your time!

Comment
Add comment · Show 6
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 rutter · Jul 15, 2014 at 08:46 PM 0
Share

If you look at your console window, do you see any errors or warnings? Especially compiler warnings; if your scripts don't compile, Unity can't show updated inspector information.

avatar image Elrien · Jul 15, 2014 at 09:06 PM 0
Share

if i run the game it doesn't show any errors...

avatar image Elrien · Jul 15, 2014 at 09:24 PM 0
Share

ok now it says that there's an error and that the script on his Beaviour is missing and in the player tab it asks to fix any kind of error. if i open the script: using UnityEngine; using System.Collections;

 public class PLayer$$anonymous$$ovement : $$anonymous$$onoBehaviour {
     public float moveSpeed;
     private Vector3 input
     // Use this for initialization
     void Start () {
     
     }
     
 
     void Update () {
         input = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis ("Vertical"));
         rigidbody.AddForce (input * moveSpeed);
     }
 }


it underlines the part where is written void Start (which i didn't written)

avatar image rutter · Jul 15, 2014 at 09:27 PM 0
Share

You're missing a semicolon at the end of this line:

 private Vector3 input
avatar image Elrien · Jul 15, 2014 at 09:31 PM 0
Share

okay thanks, now in the script it looks like there's nothing wrong, but if i run the game it still gives the same error

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Elrien · Jul 17, 2014 at 08:13 AM

for anyone instrested that has the same problem: in my case i (stupid!) didn't save the script and there was an error. if there's an error in the script hte inspector won't show the public (i'm telling this because i didn't know before this question)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Can't Get Public Variable in Code to Update from Inspector 2 Answers

C# public decimal variable not showing up in inspector 2 Answers

How to prevent the value in the Inspector from overriding the value in a script? 4 Answers

InputSystem not showing up in Inspector,My new InputSystem isn't showing in the Inspector also if its in the Script. how to fix that? 0 Answers


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