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 Scribe · Aug 20, 2011 at 03:10 PM · guimodelguitexturepositioninglayering

GUI behind a 3D model

hello,

I am making an inventory and armor system and I want to create a background for the inventory system, I also want a 3D view of the character contained within the inventory panel,

To do that I would need to make my 3D model infront of the GUI background and I have no idea how to make this possible, seeing as the OnGUI function always renders at the front how would I do this.

I tried using a GUITexture which I was able to get behind my object but each time I save a reload unity it is pushed to the front of the scene again infront of the 3D model of my character.

thanks for your time and any suggestions you can give Scribe

P.S. yes the model does have to be 3D if it is possible as I want to allow rotating it to see different angles

Comment
Add comment
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

3 Replies

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

Answer by DaveA · Aug 20, 2011 at 04:29 PM

If I'm not mistaken, you'd use a separate camera for that GUI-3d object, and set it's Depth closer than anything else, so it renders last.

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 Scribe · Aug 20, 2011 at 10:06 PM 0
Share

thanks for answering, could you explain how I would set this up, would I have a camera attached to the 3D model that only renders that layer?

avatar image Scribe · Aug 22, 2011 at 08:41 AM 0
Share

don't worry, thanks I sorted it... adding a new camera and model and set the model to a custom later made my main camera not render that layer and made the other camera only render that layer. $$anonymous$$ade the other camera orthographic and set the background to clear, and changed the normalized view area stuff so it all works now :) thanks for your help

avatar image
0

Answer by jkivak · Apr 26, 2012 at 04:55 PM

Can anyone explain this in a little greater detail? For my situation:

I have a script using a semi-transparent black GUILayout.Box to display a wall of text. What I would like is a 3D model (the default unity Constructor for example), doing an idle animation in front of that GUILayout.Box, instead of being covered by the box.

I have a main camera, and a Constructor-only camera. I've added a new layer named "Constructor", and set the 3D Constructor model to that layer. The main camera culling mask is set for all layers EXCEPT "Constructor", and the second camera's culling mask will ONLY render the Constructor layer.

What do I do from here, to get the model to appear on top of the GUI box of text, instead of behind it?

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
avatar image
0

Answer by kevinharte · Aug 23, 2012 at 01:09 AM

I'm not sure about default GUI boxes but I got the GUI health texture behind my boxer by having 3 cameras. The main camera doesn't use the layer the crowd plane is on or the texture. I then had the GUI texture on it's own layer. the main camera would show everything else, then you'd have to play with the depth settings on each camera. The main camera's depth would be the closest.

Photobucket

Still ironing out the code before I start to finalize the graphics. Been a real pain but we've been closing in on it now.

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

6 People are following this question.

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

Related Questions

Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer

GUITexture Design-time positioning problems 1 Answer

GUITexture placement 1 Answer

Android tablet 10.1 and guiTexture gui placement with unity 0 Answers

Get GUITexture to follow ScreenPointToRay ray cast 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