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 /
  • Help Room /
avatar image
0
Question by silverthundy · Dec 19, 2015 at 11:40 PM · renderingtreesfog

Start menu problem and tree rendering problem

UPDATE 1: ADDED SCREENCAP FOR ALL COMPONENTS FOR THE BUTTON.

I made a scene thats an start menu for a game, and the buttons i set up wont work. I proofread the code, checked the "interactable" checkbox and looked for any solution, but i didnt find it. The buttons i created: alt text

This one is for the new game, the exit was the same. Scripts:

NEWGAME:

 using UnityEngine;
 using System.Collections;
 
 public class NEWGAME : MonoBehaviour
 {
 
     // When Hovered Turn Object Red
     void OnMouseEnter()
     {
         GetComponent<Renderer>().material.color = Color.red;
     }
 
     // When not hovered turn color back
     void OnMouseExit()
     {
         GetComponent<Renderer>().material.color = Color.white;
     }
 
     // If button Start is clicked, level load, else the game will quit
     void OnMouseDown(){
             Application.LoadLevel("Spawn1");
         }
     }
 

EXIT:

 using UnityEngine;
 using System.Collections;
 
 public class EXIT : MonoBehaviour
 {
 
     // When Hovered Turn Object Red
     void OnMouseEnter()
     {
         GetComponent<Renderer>().material.color = Color.red;
     }
 
     // When not hovered turn color back
     void OnMouseExit()
     {
         GetComponent<Renderer>().material.color = Color.white;
     }
 
     // If button Start is clicked, level load, else the game will quit
     void OnMouseDown()
     {
         Application.Quit();
     }
 }


Additionally, ive been getting an ugly texture rendering problem, the trees show up black on the background of the fog. I tried setting the billboard higher, but its the same. Heres a capture: alt text

button.png (34.7 kB)
trees.png (415.1 kB)
Comment
Add comment · Show 8
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 Statement · Dec 19, 2015 at 11:57 PM 0
Share

Please stick to one question per thread. Please also state what the problem is with your menu.

avatar image silverthundy · Dec 20, 2015 at 12:13 AM 0
Share

@Statement The problem with the menu is that the buttons dont respond to click. I tried everything to fix that.

avatar image Statement silverthundy · Dec 20, 2015 at 12:32 AM 0
Share

Try making On$$anonymous$$ouseDown public.

Try printing a message to console ins$$anonymous$$d of loading a level;

 public void On$$anonymous$$ouseDown()
 {
     // Application.LoadLevel(string) is obsolete
     // Application.LoadLevel("Spawn1");
     print("TODO: Load level");
 }

No errors in console?

avatar image silverthundy Statement · Dec 20, 2015 at 12:50 AM 0
Share

@Statement After making that change, the console returned "The referenced script on this Behaviour is missing!"

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Statement · Dec 20, 2015 at 12:04 AM

The only thing that look strange is that you use Renderer and not Button or Graphic for setting color.

  • Button.colors

  • Graphic.color

But then I don't know if this is the problem you have.


I don't know what's up with your billboards but my best guess would be that the shader on that material doesn't do fog rendering. Try a different shader that support fog.

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 silverthundy · Dec 20, 2015 at 12:15 AM 0
Share

@Statement Ill try the new shader if i can find it. That may solve it. Also, ill change the Renderer for Button.

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

36 People are following this question.

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

Related Questions

Fog showing in editor, but not in build 0 Answers

Halos rendering through other objects if GlobalFog is enabled 0 Answers

Problem when rendering trees 1 Answer

Problems with camera background clear color and fog on Windows build 0 Answers

HDRP's Fog : light's halo passing trough walls 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