- Home /
It's possible save materials and meshes into a prefab like the unity's model importer?
Hi,
Do you know if it's possible to create a prefab and attach via scripting or less some assets to him, like material, meshes, custom scriptable objects... as Unity does for the model importer since 2018?
Regards, Cippman
Answer by swanijam · Nov 07, 2018 at 03:07 PM
I think that using FBX exporter asset might be able to attach materials to a mesh, but i don't think an FBX can contain scripts or scriptable objects, no. The closest thing to what you're asking for may just be a unity package, but that would only accomplish the 'packaging of related things together' and not the prefab functionality.
Answer by Cippman · Nov 07, 2018 at 03:20 PM
Ok, searching better I found that I wanted. https://docs.unity3d.com/ScriptReference/AssetDatabase.AddObjectToAsset.html
Your answer
Follow this Question
Related Questions
How can I save a gameobject's mesh? 1 Answer
How to have different materials on one GameObject? 1 Answer
How to highlight only one face of a Cube from script? 0 Answers
Is it possible to Change mesh also multi materials by a button or a key 0 Answers
Possible Unity Glitch. A few lines of code erasing prefab data. 1 Answer