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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Ekta-Mehta-D · Nov 21, 2014 at 11:51 AM · maskscrollviewgraphics.drawtexture

Graphics.DrawTexture is not working with GUI.BeginScrollView

Hii

I have big issue regarding Graphics.DrawTexture.

My main functionality is to do masking of texture to show in round shape.

I have used shader to mask my texture..

Shader which i am using is This .

Code to draw texture is :

 Graphics.DrawTexture (new Rect (grp.width * 0.05f, grp.height * 0.036f + x * (grp.height * 0.5f * 0.20f), Screen.width / 2 * 0.32f, Screen.height / 2 * 0.22f), picture, new Rect (0, 0, 1, 1), 0, 0, 0, 0, avtarMaterial);    


If i use GUI.DrawTexture then its working fine in scrollview.

But i want to do mask so i have used Graphics.DrawTexture . . Anyother alternative is there to do masking instead of Graphics .

Please help me guys.. Thanks in advance..


Screenshot of how it is looking :

alt text

screen shot 2014-11-21 at 3.20.59 pm.png (192.6 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 Eric5h5 · Nov 26, 2014 at 06:46 AM 0
Share

Why not use GUI.DrawTextureWithTexCoords?

avatar image Ekta-Mehta-D · Nov 27, 2014 at 05:52 AM 0
Share

ok how can i use GUI.DrawTextureWithTexCoords?

avatar image Eric5h5 · Nov 27, 2014 at 06:22 AM 0
Share

http://docs.unity3d.com/ScriptReference/GUI.DrawTextureWithTexCoords.html

avatar image Ekta-Mehta-D · Nov 27, 2014 at 07:13 AM 0
Share

yea but how will i draw round image ?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by HarshadK · Nov 27, 2014 at 08:19 AM

If I may ask, why not use the new GUI system from 4.6? Using which you can easily achieve these effects using scroll view and masks easily. Also looks like you are developing for mobile and Unity's immediate mode GUI is already considered a villain for mobile devices. In this case why not use what seems to be a way better solution of using Unity 4.6 since a stable version is also released. Just a thought by the way. :-)

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

27 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

Related Questions

Unity UI - Data Management for GameObjects in ScrollRect/TableViews with Large Data Sets 0 Answers

Scroll Rect is not working with UI Mask 2 Answers

new UI Mask soft cutoff 3 Answers

ListView scrolling with swipe 2 Answers

Find objects only viewable within mask 0 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