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 /
avatar image
0
Question by DuFF14 · Feb 25, 2014 at 08:21 PM · iossplash-screenu3dxt

U3DXT access LaunchImage/Splash screen?

I'd like to access the Splash screen texture from a Unity script. In searching for an answer I found this thread: http://stackoverflow.com/questions/19410066/ios-7-xcode-5-access-device-launch-images-programatically

So I want to do something like: Texture2D splash = new UIImage(@"LaunchImage").ToTexture2D(); (but that doesn't work)

Is it possible to access the splash screen texture this way? Thanks.

Comment
Add comment · Show 1
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 Graham-Dunnett ♦♦ · Feb 25, 2014 at 10:48 PM 0
Share

No, it is not possible to access the splash screen. If you are an iOS Pro user simply create the splash screen you want to display in the editor.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by DuFF14 · Feb 26, 2014 at 05:29 PM

I figured it out.

 string splashScreenName = "Default-Portrait@2x.png";  //you'll need to change this per device
 string dataPath = Application.dataPath.Substring (0, Application.dataPath.Length - 4); //Remove "Data" from the end of the path
 string imagePath = dataPath + splashScreenName;
 UIImage image = new UIImage(imagePath);
 Texture2D splashTexture = image.ToTexture2D();
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 u3dxt · Feb 26, 2014 at 06:41 PM

Hi DuFF14, thanks for sharing this. One thing to be careful about using UIImage.ToTexture2D() is that it creates a new Texture2D, and the caller is responsible for destroying it once done, by calling Texture2D.destroy(splashTexture).

Alternatively, you can use Texture2D.LoadImage() passing in the bytes you get from the file.

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 DuFF14 · Feb 26, 2014 at 06:52 PM 0
Share

Good to know, thanks!

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

22 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

Related Questions

iOS Launch Screen Time 1 Answer

ios splash screen problem 2 Answers

Does u3dxt support ios 8 1 Answer

U3DXT MapKit annotation updates and callouts 0 Answers

Unity 4.5 [Pro] black screen after splash in iOS 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