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 Infinity · May 26, 2011 at 09:51 AM · texturemodel

Having a model with diferent textures in unity

I have a 3D model and I want to have on editor twice with two diferent textures.

I have tried to put the same model twice on the editor, and change in one of them the texture, but if I do this, it's changed in both models.

What I can do?

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 runonthespot · May 26, 2011 at 11:43 AM

I think the easiest way is to make two prefabs from the model and change the material in each prefab. I think, also, if you drag the model onto the scene once, then select it in the scene and choose "duplicate", you can change the materials independently.

Finally, you can also alter the material on the gameobject directly at runtime. It really depends what you're trying to do.

Comment
Add comment · Show 4 · 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 Infinity · May 26, 2011 at 11:49 AM 0
Share

Uhmm I want to have two enemies, with the same model but with diferent texture, for example: 1 green dinosaur and 1 red dinosaur. I have textures not materials, I don't know exactly how it works >__<''

avatar image runonthespot · May 26, 2011 at 12:42 PM 0
Share

Start with an empty project. Import a 3d model and a texture. Drop the model onto the scene and then the texture onto the model. You will notice that a "materials" folder appears under your project assets. This material basically says: Use this texture on the model, and render it with "Diffuse" shader (Default).

Now in the project view, right-click, create new prefab. Drag the $$anonymous$$odel from your scene hierarchy onto the blank prefab. (it should go from grey to blue).

Now if you drag that prefab onto the scene, it will have your model and a material already added.

Right. So in the project view, create a second prefab, and do exactly the same process. Now you can click on the prefab in your Project assets, and change the texture on its material.

Drop either prefab onto the scene to create the "red" or "blue" dinosaur.

avatar image Infinity · May 26, 2011 at 05:43 PM 1
Share

Thanks It have worked ;)

avatar image runonthespot · May 27, 2011 at 08:40 AM 0
Share

Glad to hear it. I recently solved this issue with scripts too- you can dynamically assign materials at runtime which is awesome if you want some randomness (100 animals, 6 variations for example :). I'm on twitter as @runonthespot or here if the details of that are of interest.

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

Jagged and blurry texture on model 1 Answer

Black marks glitching in model 0 Answers

How to spawn a model with texture? 1 Answer

Texture not woking with any FBX model imported from Blender. 2 Answers

Solid coloured texture after SketchUp Export 1 Answer


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