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 Krlos92 · Jun 14, 2015 at 07:20 AM · runtimetexturesloadmanager

How to change Textures after build the game?

Hello,

The idea is this . The game brings a default textures , but I want the user be able to change them if he/she wants. I dont know if it is possible to do this , and if so , how do I do?

I have two things in mind:

  1. The user adds textures in a specific folder , using specific names and sizes , so that after, the game detect and load the textures.

  2. Using an interface that allows the user to find, select and load the textures by object...

What do you recommend me ?

How do I load the textures ?

And if there is a better way, please tell me

Thank you very much.

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
1

Answer by Hellium · Jun 22, 2015 at 07:19 PM

The solutions are both possible, but implementing the second one is much more difficult than the first (no GUI, no scripting, etc)

If you really want the second solution, you will have to make a file browser (some are free over the web). For a custom one see the .NET File and Directory classes :

https://msdn.microsoft.com/en-us/library/system.io.file(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/system.io.directory(v=vs.110).aspx

Then, you could simply copy the selected file by the user with the appropriate .NET function :

https://msdn.microsoft.com/en-us/library/system.io.file.copy(v=vs.110).aspx

You won't have to "load" a texture, but simply copy it in the appropriate folder (inside the Resources folder : http://docs.unity3d.com/ScriptReference/Resources.html) with the appropriate name.

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 Cherno · Jun 22, 2015 at 07:33 PM 0
Share

You might want to set the Filter$$anonymous$$ode etc. too.

avatar image
0

Answer by TheXWolf · Jun 22, 2015 at 07:39 PM

I think #1 is a better solution, saves you from having to create different UI components in the game. Simply load and atlas textures when the game boots by checking a folder for files by name. If the file matches a name for each file, then it simply replaces it. There's a number of basic methods for doing that so I won't go into them; I would simply say the first one is the better option.

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

2 People are following this question.

avatar image avatar image

Related Questions

C# Error when trying to load Texture at runtime 1 Answer

Loadimage Texture at runtime 1 Answer

Export objects to a .3DS file at runtime 1 Answer

Is it possible to load an audio file at runtime? 2 Answers

load c# script from server 4 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