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 wiivil-canevil · Feb 23, 2013 at 04:07 PM · ioscustomizationcolourunitypro

Customise texture colour during gameplay?

Hello I have a 3d model. I wish to allow the user to go into a scene to customize the colour of the texture.... does anyone know how I would do this? Does anyone have code or a tutorial I could use? I have unity pro and apparently thats useful... to do this but no one explained how.

Also I want this info to be stored, so if the user changes the colour to blue, then it will apply it to the character and stay that way even when the user closes and reloads the application.

Help would be much appreciated thank you. :)

Comment
Add comment · Show 2
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 MountDoomTeam · Feb 23, 2013 at 05:32 PM 0
Share

have a look on unify wiki, there is a shader that allows you to apply 2 textures at the same time, I'm not sure about this, but you can change one of the textures 2 different coloured textures on-the-fly, or maybe using multicoloured texture as a colour pallette for one of them, but I don't know if the 2 are independent for zoo$$anonymous$$g etc, also the way to show 2 textures at the same time in unity is with alpha channel, although I don't know how yet.

avatar image Graham-Dunnett ♦♦ · Feb 23, 2013 at 10:38 PM 0
Share

Can you not just change the color on the material?

1 Reply

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

Answer by robertbu · Feb 23, 2013 at 10:44 PM

If the problem is a "simple" as you describe (i.e. a single color), the easiest way would be to use a shader that makes use of the main color (Material.color) property. You can use PlayerPrefs to save the either a color index (if they selected from a list) or the rgb values.

Comment
Add comment · Show 2 · 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 wiivil-canevil · Feb 24, 2013 at 03:31 PM 0
Share

That sounds like what I need robertbu. I am not experienced at coding however... is there a tutorial anywhere for this???

avatar image robertbu · Feb 24, 2013 at 05:36 PM 0
Share

I'm not aware of any tutorials. To understand the concept:

  • Create a scene with a cube and a point light illu$$anonymous$$ating the scene.

  • Create a texture this is mostly or all white.

  • Create a material and use this texture. The default diffuse shader is good for a start.

  • Apply this material to a cube.

  • Select the cube and in the $$anonymous$$esh Renderer section you will see a property called "$$anonymous$$ain Color" click and play with this color.

This property is the one I'm proposing you save. How it behaves will vary based on the shader, so you want to play with different shaders until you find what works for you.

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

11 People are following this question.

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

Related Questions

unity pro only, ios splashscreen 1 Answer

I can change the iOS splash screen but I can't change the Android splash screen. Why? 0 Answers

How can I prevent users from skipping video by leaving the app and coming back? 0 Answers

How can I change the colour of part of a texture? 2 Answers

The name 'Joystick' does not denote a valid type ('not found') 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