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 saarwii · Sep 30, 2015 at 03:39 AM · uiguiscrollviewmasking

Masking 3d Mesh in a UI ScrollRect

I am trying to add 3d objects to my UI scroll rect? But i am not having any luck masking them out. Is this possible?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by RChrispy · Sep 30, 2015 at 07:17 AM

Well in the reference there are pictures of it happening!

http://docs.unity3d.com/Manual/script-Mask.html

But this may be only a picture because in the text it says : "Image". :/

EDIT:

I tried things out and unity only masks image components! Not the render.

http://fs5.directupload.net/images/150930/e8o8i95i.jpg

But you can render to texture with a 2nd camera. ( Only this camera can see the object. And then store this in an Image component, wich has the mask applied on! ;)

Cheers

Comment
Add comment · Show 5 · 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 saarwii · Sep 30, 2015 at 07:32 AM 0
Share

That what I think....i have not got it to work anyway

avatar image saarwii · Oct 01, 2015 at 10:28 AM 0
Share

Well i could work...But i dont know if i am doing something wrong or if it's just not optimal. I have basicly alot of buttons on a scroll rect. each button should have a 3d object on it. So the second camera should only show the 3d object. in the right size and on the right button. i dont want to set up a "stage with alot of cameras, fil$$anonymous$$g induvidual objects and then projecting them on to the right button

avatar image RChrispy saarwii · Oct 01, 2015 at 10:34 AM 0
Share

You only need a second camera with the perspective you want to see and render the whole perspective to 1 single image. This image gets passed to an image component and this gets masked.

If you see there all button / 3d Objects of your scene they will get masked with the image if its placed right. Thats the only solution I can come up with.

ps: if you use only the uGUI elements for your game you can make the 2nd Camera orthographic and calculate the mask rect to camera. That and then render it on the main screen. that way your camera on its own is a mask for 3D objects.

avatar image saarwii RChrispy · Oct 01, 2015 at 10:38 AM 0
Share

yep....i have to mess around with it. I have asked questions if there is away to modify the standard shader so that it is supportet by the UI masking system...The word "stenceling" seems to come up alot..but shaders is not my strong side

Show more comments
avatar image
0

Answer by Rodrysson · Nov 04, 2018 at 03:28 AM

Hello! I bring a simple solution here. https://answers.unity.com/answers/1568533/edit.html I hope it work for you :D

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 AngeloGebauer · Jul 03, 2019 at 02:11 PM 0
Share

Correct link :D https://answers.unity.com/questions/998203/

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

How to disable ScrollView dragging 4 Answers

Unity 4.6 UI - How to left-align scroll rect content 3 Answers

unity scrollview doesnt bounce 0 Answers

Why is my vertical layout group not spaced correctly? 1 Answer

ScrollRect (Elastic) wait to scroll back to Start 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