• 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 $$anonymous$$ · Jan 10, 2013 at 09:47 PM · editortexturematerial

Mass Assigning Textures to Materials

Is there a way to mass assign textures to materials that share the same name with the texture? I have over 100 textures and i cant assign them to the .fbx but the materials seem to share the name... any ideas?

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

1 Reply

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

Answer by Bunny83 · Jan 10, 2013 at 10:02 PM

If the models should use the same material / Texture you just have to place them along with the models or in a higher folder called "Textures". You need to reimport the models so Unity should search for the right material / Texture. See this page and scroll down to "Textures"

Comment
Add comment · Show 3 · 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 ristophonics · Jul 03, 2015 at 07:08 AM 0
Share

Hmm. I have similar issue. What if I have created the meshes in a separate program from the textures and need to mass assign corresponding textures to meshes?

I have a gameobject with 96 meshes and a folder labeled "Textures" with 96 textures inside. I want Unity to read them as a package and assign textures to the materials it is creating for each mesh.

Advantage: The meshes and textures are numerically labeled to correspond to each other.

Dis-advantage: There are not pre-assigned texture/material/mesh relationships co$$anonymous$$g into Unity, such as in an fbx. Is there a way to generate this mass automatic assignment if my lists are in the same order?

I have thousands of meshes/material/texture to process so I need an automatic process.

avatar image Bunny83 · Jul 04, 2015 at 03:40 PM 0
Share

@ristophonics: Well, if there is no premade relation between the textures and the corresponding submesh how should Unity automatically assign the textures?

However you can implement an AssetPostProcessor and code your own post processing steps. So if you have any hints in the assetnames on which you can decide which texture should be used by which material and which material belongs to which model you can do that in the appropriate callback of the post processor.

$$anonymous$$eep in $$anonymous$$d that an AssetPostProcessod will be used for all assets that are imported / reimported.

avatar image ristophonics · Jul 04, 2015 at 07:00 PM 0
Share

Bunny83 Thank you!

I was hoping for a mass drag & drop solution, like dragging all the textures onto the gameobject with the child meshes. The meshes and textures are equal in number and share the same organizational structure so I was hoping Unity would recognize this (if they were in some special folder structure) and apply texture00 to mesh00, texture01 to mesh01, and so forth.

I did not know about the AssetPostProcessor so I will check that out now. Thanks for the direction Bunny83! I will post anything I find for those following this.

Anymore thoughts, pipelines or work-through(s) appreciated!!!

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mipmap view not working in editor. 0 Answers

How to scale specific part of texture when game object scales? 0 Answers

What is the easiest way to import a large number of images into Unity? 2 Answers

OnPostprocessTexture assign Texture to Material 1 Answer

How can I set texture tiling lower 1.0 ? 2 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