Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 Cousken-iGotcha · Aug 24, 2016 at 03:04 PM · androidcameracanvasrendertexture

RawImage with RenderTexture texture not working on Android

Hello!

We want to have some 3D models appear on top of our GUI (we use Canvas), so we decided to have an extra camera render those objects to a RenderTexture. Then, in the canvas, we have a Raw Image that uses the texture and is the top (closes to camera) object.

This works really well in Editor and on iOS, but not at all on Android. It's as if nothing gets rendered to the RenderTexture.

I tried changing settings, making sure that the RT is power of two, and also did a printout to check if the references on the Camera or Raw Image were lost ( they were not ). Now i'm out of ideas.

Here's a screenshot from the editor, showing how it's supposed to look. alt text

working.png (159.9 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 Cousken-iGotcha · Aug 24, 2016 at 03:40 PM 0
Share

alt text

A screenshot of how it looks when not working

not-working.png (112.3 kB)
avatar image PhantomSarcasm · Aug 24, 2016 at 03:59 PM 0
Share

Question: your object is stationary or has any animation or script to do it rotate

avatar image Cousken-iGotcha PhantomSarcasm · Aug 25, 2016 at 07:17 AM 0
Share

It's not 100% stationary, it's position is bound to the position of the background panel, so if the panel moves, the object moves. But no rotation. The panel is on a scroll bar so i does move.

avatar image PhantomSarcasm Cousken-iGotcha · Aug 25, 2016 at 01:53 PM 0
Share

the issue is that unity has a problem with rotation to export to android, you have to use identity quaternion angle either in the animator "if it is doing for animation" or on code if using a script. till now I thought that was the main problem.

1 Reply

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

Answer by Cousken-iGotcha · Aug 25, 2016 at 01:57 PM

I was getting quite desperate to fix this untill i did this printout:

    Editor:
     Look at target: Target position is 74.41666, 22.16666, -1.
     Look at target: Camera position is 380, 237.5, -1294.203.

 Android:
 08-25 13:33:44.517: I/Unity(17771): Look at target: Target position is 188, 56, -1.
 08-25 13:33:44.534: I/Unity(17771): Look at target: Camera position is 960, 540, -3269.564.

From this point i could clearly see that on Android the distance between my 3d Gui elements was bigger than 3000, the cameras far plane. Increasing it to 30 000 solved the issue.

I don't know why the values are different on android, editor and ISO. Possibly because the distance is dynamically created based on the size of the canvas position in world.

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 PhantomSarcasm · Aug 25, 2016 at 02:14 PM -1
Share

hahaha it usually happens, one does not realize till things that happens. : V

jaajajajajajajaajajaja

avatar image Bill-Ape · Sep 27, 2017 at 12:53 PM 0
Share

I worked out why this happens. Lots of recent Android phones have high pixel densities, so if you're auto-scaling your UI, which you probably are, and if you have the inner camera inside your UI structure somewhere, the whole thing will be getting scaled up, so moving the object out of the view frustum Scaling up inner scene doesn't scale view frustum

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

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

Related Questions

Trying to put a canvas in Google Cardboard 0 Answers

Canvas differently displayed in built Android version and Unity Game mode. 0 Answers

How to overlay an image onto device camera(android and iOS camera, realtime) 0 Answers

Screen Space - Camera for Mobile (Android) not working 0 Answers

How to scale images corectly? 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