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 RULV3NOM · Aug 08, 2011 at 09:55 PM · errorbeginner

Help how do i fix this error i can't figure it out.

This error -> if(water) waterLevel = water.gameObject; it says it cannot convert it?

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 Chris D · Aug 08, 2011 at 10:13 PM 0
Share

You don't give nearly enough information for people yo be able to help you. Read this thread for a little guidance:

http://answers.unity3d.com/questions/133869/how-to-ask-a-good-question.html

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by poolts · Aug 08, 2011 at 10:10 PM

It's difficult to tell what you're trying to achieve here.

It would help users help you, but stating what it is you're trying to do with your code :)

But the reason you're receiving the error is that it looks like (what I presume is a int or float variable) into a game object. Additionally, the conditional if statement you've used should hold a boolean value, and I'm not really sure if it is in the context.

Elaborating on what you're trying to achieve with your code, would definitely help :)

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 poolts · Aug 08, 2011 at 10:15 PM 0
Share

I should have probably placed this as a comment under his question, however I shall leave it as a placeholder, in order to answer his question, and also as a re$$anonymous$$der to provide more information next time.

avatar image DFLY · Sep 19, 2012 at 12:40 PM 0
Share

Hi All. I think this question refers to an error that occurs when trying to load the Tropical Paradise scene into unity 3.4. I just discovered it now.

The error code is:

Assets/Scripts/UnderwaterEffects.js(23,46): BCE0022 Cannot convert 'UnityEngine.GameObject' to 'float'.

The offending function is:

function Awake() {

if(!waterLevel)

{ water = FindObjectOfType(Water);

if(water) waterLevel = water.gameObject;

} aColor = RenderSettings.fogColor;

aDensity = RenderSettings.fogDensity;

glow = GetComponent(GlowEffect);

blur = GetComponent(BlurEffect);

if( !glow || !blur ) { Debug.LogError("no right Glow/Blur assigned to camera!");

enabled = false;

} if( !waterSurface || !underwaterSurface ) { Debug.LogError("assign water & underwater surfaces");

enabled = false;

} if( underwaterSurface != null ) underwaterSurface.enabled = false; // initially underwater is disabled }

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

Character moving forwards before pressing anything 0 Answers

Why do these errors keep showing up with C#? Im a beginner with coding 1 Answer

im having trouble with raycast shooting script 0 Answers

In order to call GetTransformInfoExecectUpToDate 1 Answer

expecting EOF, found 'else'. 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