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
1
Question by benk0913 · Dec 19, 2012 at 11:53 AM · materialassetassignstoragetemporary

Assign a Material temporary (Will function in the built layer)

Hello, I am having trouble assigning a material temporary to a directory which will function in the built layer. I am trying to get the client assign a few pictures which it downloads (Coverd the texture downloading allready) temporary so when the application ends whould be removed.

The problem is that I cannot use "AssetDatabase" to assign the material because it wont function in the standalone build and fits only for the "editor" section.

How do I get it to store temporary a material asset?

Comment
Add comment · Show 1
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 benk0913 · Dec 20, 2012 at 08:09 PM 0
Share

And... no answer...

2 Replies

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

Answer by Statement · Dec 20, 2012 at 09:01 PM

You wouldn't serialize materials at runtime, at least it's nothing that I can see we have built in support for. What you can do however is to serialize the properties you want to store yourself. You can create materials at runtime and get/set properties on them.

http://docs.unity3d.com/Documentation/ScriptReference/Material.html

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 Statement · Dec 20, 2012 at 09:02 PM 0
Share

Or you could just have a few pre made materials without textures in Resources which you can load, and then assign the texture when you have loaded it.

avatar image benk0913 · Dec 21, 2012 at 07:38 AM 0
Share

The thing is that I work over a $$anonymous$$ultiplayer game and it requires to download 4 pictures of each client which is in the room and I guess 32 * 4 whould be 128 materials to assign in the WORST CASE scenario so I guess making 128 materials and assigning the downloaded texture on them whould be silly.. I dont $$anonymous$$d to store temporary textures ins$$anonymous$$d of materials. :P

avatar image
0

Answer by benk0913 · Dec 21, 2012 at 08:15 AM

SOLVED, I assigned the 4 textures to each of the players gameobjects. Many thanks!

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

10 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

Related Questions

Assigning meshes & materials from Assets, how? 1 Answer

Setting sharedMaterial only setting for one object? 1 Answer

Importing Maya assets with applied textures shown 0 Answers

Assign Material by script: Javascript? 1 Answer

Changing two different objects renderer colour 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