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
1
Question by burakvl · Feb 02, 2017 at 03:14 PM · iostexturesprite

Metal texture validation failure

I have a Unity app inside an iOS app. Basically I took control of main from Unity and integrate UnityAppController to work with AppDelegate lifecycle in harmony. While taking iOS export, I chose background behaviour of Unity to be Exit with IL2CPP scripting, auto graphics enabled, leaving sprite format as default (RGBA Compressed PVRTC 4 bits).

There is one UIViewController which contains UnityGLView as a subView. It waits Unity to be ready before calling UnityGetGLView. After that, it simply sets constraints of UnityGLView, with leading and trailing anchors to be equal to superview, topAnchor to match bottom of topLayout and finally bottomAnchor to be equal to bottom of superview minus 44 (height of a custom view much like a banner ad).

I pause Unity with UnityWillPause and UnityPause functions each time before the UIViewController disappears and resume when the view appears again. Loading UnityGLView as described above, waits a Unity callback to give it time loading the scene preventing an old scene submission to the user.

Everything was working fine until I started to get a crash report. When the app enters the background and than come back to foreground again, UnityAppController seems to fail validating textures. This does not occur frequently, and seems independent from device model and iOS version.

The crash info states:

validateTextureDimensions:681: failed assertion `MTLTextureDescriptor has width of zero.'

The stack-trace is as follows.

Any help would be much appreciated.

crash.txt (2.4 kB)
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
Best Answer

Answer by levin-rock · Mar 05, 2017 at 03:30 PM

@burakvl We too faced the same issue. The issue is unitygetglview() frame becomes zero after the viewcontroller, which holds the unityview, is dismissed. it seems the zero frame issue occurs when we use autolayout constraints. the fix is to set the frame of unityglview directly instead of autolayout constraints

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 developerEbibelot · Dec 18, 2017 at 11:12 PM

Hi,

I'm facing the same problem and it is not happening all the time. So reproducing the problem is very hard. Do you have a sample code for the solution?

Thanks.,Hi,

I'm facing the same problem. How to fix it do you have a sample code or something that would be great!

Thanks.

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

Performance and memory using sprites 1 Answer

Texture changes brightness at random – why? (on iPhone) 0 Answers

Bad quality of the sprite in Unity 0 Answers

Anti aliasing with sprites 0 Answers

show video frame on texture in ios 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