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 /
This question was closed Jul 22, 2014 at 05:19 PM by robertbu for the following reason:

Other

avatar image
0
Question by Foxtail Boyd · Jul 22, 2014 at 05:19 PM · cursortitle

Start Screen Cursor?

Hello, I am currently trying to get a start screen cursor for my menu options, as shown below: alt text

Right now, both of them are visible. I only want one of them visible at a time and the corrisponding one to be visible when the option is moused over. Here is the code I have so far in JavaScript. var ImageEffectOpaque : float;

 function Start () {
     gameObject(ImageEffectOpaque = 0);
 }
 
 function Update () {
     } onMouseEnter()
         ImageEffectOpaque = 100
         } onMouseExit ()
             ImageEffectOpaque = 0
     }
 }

Thie code doesn't seem to be working and I'm getting the error "Assets/Standard Assets/Character Controllers/Sources/Scripts/GemCursor.js(6,20): BCE0043: Unexpected token: ImageEffectOpaque". Can someone tell me what i'm doing wrong? I've been at this for hours and I can't seem to get it to work. :/

untitled.png (60.8 kB)
Comment
Add comment · Show 1
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 robertbu · Jul 22, 2014 at 05:20 PM 0
Share

You code here is nonsense. And even if the changes were made to get it to compile, it won't do anything.

  • In the second line, 'gameObject' is not a function that can be called like your syntax implies, and ImageEffectOpaque is not a property of a gameObject.

  • While you've declared ImageEffectOpaque as a variable, it is no way tied to the visual cursors you are attempting to hide and sho.

  • On$$anonymous$$ouseEnter() and On$$anonymous$$ouseExit() are functions that need a upper case 'O' and correct bracketing.

  • The indentation style you have here indicates you have no idea what the lines do.

  • Without understanding the nature of your cursor objects, no one here can give you an accurate answer of how to show and hide the cursors.

If you are going to be writing scripts, you need to build up an understand of both the syntax of the language, and the underlying concepts of how to do particular things with the language.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Can anyone translate this to C# (Change cursor appearance) 1 Answer

Lock mouse position with a Rect, possible? 1 Answer

Particle Emitter from moving object to cursor location 1 Answer

Moving forward towards the cursor with LookAtMouse? 0 Answers

Error with mouse cursor. 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