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 alexandru-ivan-daniel · Jun 27, 2016 at 03:40 PM · loaddynamicresource

Dynamic Cylinder Skydome

Hello, Is it possible to import a jpg at runtime and then import it in the project and also changing some of it's properties. For example, download a .jpg from the net with some form of curl or www class and import it as a cylindrical map ?

Alex.

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 alexandru-ivan-daniel · Jun 28, 2016 at 12:51 PM 0
Share

What i'm trying to do is exactly the same as in this link http://forum.unity3d.com/threads/is-it-possible-to-generate-a-spheremap-from-a-texture2d-in-unity-at-run-time.328744/

and exactly like the last poster i'm trying to do it with a cylindermap.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by tanoshimi · Jun 27, 2016 at 05:27 PM

Yes. Look at the example on the manual page: https://docs.unity3d.com/ScriptReference/WWW.html

The properties you're referring to are part of the asset importer and can't be accessed at runtime, but you don't need them. Having loaded your texture image from a remote server, you can assign it to one of the faces of the cubemap using SetPixels() - http://docs.unity3d.com/ScriptReference/Cubemap.SetPixels.html

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 alexandru-ivan-daniel · Jun 29, 2016 at 05:11 PM 0
Share

Hello, Thanks for answering so what i need is to download a jpg from a server and set it as a skydome texture. Steps are: 1. Download images (they can be multiple) to a folder on the client. (from what i could find it's preferable i download them in Application.persistentDataPath, that's fine) 2. Create a texture. 3. Apply this image to the texture (which is of the same size as the original image widthxheight), currently this is still an unknown to me in how to achieve this, i see there's a setpixel thing i can do but isn't there some function to load the image into a texture ? 4. I need to change this texture settings (or maybe i can set the textures settings when i create it not sure how this is done either) from Texture Type = "Texture" to "Cubemap" and set it's mapping to Latitude-Longitude Layout(Cylindrical) . Also i understand there's a TextureImporter class i'm unsure whether this is something that can be used here, i would like not to have to do all these steps every time the user restarts his app. This will run on mobile btw.

I don't really need code samples i just want to know on a conceptual level if this thing is achievable, or if any of the steps i mentioned are wrong or unneeded .

Best Regards $$anonymous$$. @tanoshimi @Jessespike

avatar image
0

Answer by Jessespike · Jun 27, 2016 at 05:28 PM

Loading textures at runtime is possible.

Importing it as a cylindrical map, er maybe not. You can have a cylindrical model with predetermined UVs. Just load the texture and slap it on the cylinder model.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Resources.Load dynamic path 2 Answers

load file from Xcode 1 Answer

Dynamically load AudioClip during runtime 1 Answer

non-dynamic asset load? 1 Answer

Load can only be called from the main thread 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