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 kbeaud · Dec 15, 2012 at 03:17 AM · scene

Problem with Scenes

I have a 3d text in my scene in front of my object, for a main menu. Now when I change the view to full screen it doesn't look right. So how do I make it so that the scene will look the same no matter what view it's in?

Update: Here are the pictures... same exact thing except the game view was enlarged.

alt text

alt text

capture.png (100.8 kB)
capture1.png (89.1 kB)
Comment
Add comment · Show 4
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 clunk47 · Dec 15, 2012 at 03:26 AM 1
Share

You have to be more specific and post a screenshot of how it looks windowed, and how it looks fullscreen. Can't really help yet until I see what it's looking like.

avatar image kbeaud · Dec 15, 2012 at 03:39 AM 0
Share

ok!!!!!!!!

avatar image clunk47 · Dec 15, 2012 at 03:43 AM 1
Share

Cool I'll be waiting for them screenshots. Always happy to help.

avatar image kbeaud · Dec 15, 2012 at 03:45 AM 1
Share

They're up

1 Reply

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

Answer by clunk47 · Dec 15, 2012 at 03:57 AM

Well I'm used to doing stuff like this with GUI. But it might help the same... When working with GUI, I take the positions that look right and then take the current screen width and height in consideration. So in an Update() function for example, you would have the X and Y position always be a specific percentage of the Screen width and height. Here's an EXAMPLE of what i would do.

Say your editor screen that makes everything look right is 640 x 480. And say an object's position is (X = 100, Y = 250). You want to take 640 / 100 to get 6.4 for X. So instead of having X = 100, have X = Screen.width / 6.4. same with height. 480 / 250 = 1.92, so you would want Y under update to be Y = Screen.height / 1.92. that way, the positions would always be the exact same location on screen in different resolutions. If this doesn't make since, here is a GUI script I did the other day for a calculator and its buttons. I know this isn't GUI you're doing but hopefully this will give you an idea of what I'm trying to explain. You can go ahead and take this code to experiment with, it's working but I have more to add to it. But it should help.

/////SCRIPT REMOVED FOR REASON: //User has no use for the code given.

Comment
Add comment · Show 16 · 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 clunk47 · Dec 15, 2012 at 03:58 AM 1
Share

You could also give the localScale for X and Y the same principal so the sizes would be proportional to screen res as well.

avatar image clunk47 · Dec 15, 2012 at 04:04 AM 1
Share

Yes it is C#. I don't know what needs changed because I don't know what code you're already using. I don't know what screen res you're using, and I don't know the scale of the objects you are using. If you want to post your code up, I could edit it for you.

avatar image clunk47 · Dec 15, 2012 at 05:39 PM 1
Share

I'm sorry but you will need to know some basic program$$anonymous$$g, like I said this is a script I wrote for a calculator and I was just trying to show you that you could set positions depending on the screen resolution... Your best bet is to make the 3D text a CHILD of the grey "bars" you're using and that way each grey bar will be the parent of each text object, therefore the text will stay in place on the bar. Otherwise, you need to look into some program$$anonymous$$g basics. Unity Script Reference for transform.position

avatar image clunk47 · Dec 15, 2012 at 08:27 PM 1
Share

That should work. If you join everything as one mesh, or parent all the meshes to a single object.

avatar image clunk47 · Dec 15, 2012 at 08:27 PM 1
Share

That's if you don't want to do code. You will still need code for clicking on these menu items, however. For 3D space you will need to use raycast from the mouseposition.

Show more comments

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

10 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

Related Questions

Teleporter 2 Answers

all objects are abruptly disappeared 2 Answers

I need help knowing if Im doin this Right 1 Answer

Flares not working in a multi scene game 1 Answer

How to keep players from falling off the map 4 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