- Home /
How to make unity, auto assign shader and texture correctly?
I just started using Unity couple of week. One of the reason I stick to it so long was because the pipeline seemed smooth until I actually started bringing my model into unity.
Whenever I bring model into Unity using FBX or other format, I can only get the diffuse to auto assign to the object at most. I understand the new version they will be able to fix this bug to get other maps to auto assign. Is there a way to fix this through script in the mean time? Not being a programmer I read up on the post processing scripts but couldn't figure it out how to do it.
Currently i am thinking twice about using normal/spec lighting maps in my projects because of changes by client I would have to do unproductive stuff of reassign maps which takes up alot of time. I couldn't find useful scripts on Asset store. I did find some scripts that require rigid naming conventions. If there is any better way to get around this bug it would be great. Thanks!
Does your fbx model actually store detailed material information?
Yea I would think so because Diffuse comes through. I set it to embed media as well when exporting. I also tried Shiva3D using the collada/DAE format and both spec and diffuse will auto assign. The rest I have to apply manually if needed especially normal/lightmap.
Answer by eaglemaster7 · Jan 11, 2012 at 08:52 AM
import textures first then object, unity will recognise it.
Answer by Elecman · Oct 26, 2018 at 12:58 AM
You can also auto assign them by script. See here for an example: https://forum.unity.com/threads/automatically-assign-all-textures-to-all-materials.497154/