- Home /
Creating Material in Unity from using data from 3ds Max v-Ray Material Export with a Max script.
How do I create materials in Unity editor? I do Architectural Rendering using V-ray in 3DS Max and I want to put my models into Unity to play around in my Architectural scene BUT when I import my model (using FBX) I get correct material assignment but they are all blank, recreating all my materials inside of Unity is to much work, So I want to script a material Editor inside of the Unity Editor. I can export all my material maps, bump, ect to a TXT doc using max script. How do I using Unity C Sharp Script, edit existing Scene materials and get values from a text file? I know this will only get me so far I will still need to tweak the materials in Unity to get the look Im after but it will save me tons of time! Help!
Answer by Paulius-Liekis · Apr 11, 2011 at 12:47 PM
I would recommend looking into AssetPostprocessor class, especially OnAssingModelMaterial (or something like that). It allows you to assign material or create one on load time. All you ahve to do is open your text file and assign correct properties to new material.
Edit: If you want to make a custom menu item and custom window in Unity Editor you should look at ExitorWindow examples and MenuItem attribute:
http://unity3d.com/support/documentation/ScriptReference/EditorWindow.html
Ok i had a look into this it is like an event??? I don't want to respond to an event, I want to run (In the Editor not the game) when I click a Custom button on a tool bar or a keyboard Short-cut. Is there a C# hello world script that will open a $$anonymous$$essage box in the Unity Editor when you Click a custom button or use a short cut key
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer isn't changing Materials 0 Answers
Importing Ready Models from 3DMAX to Unity, Materials 1 Answer