Search Unity

Save vertexcolors to original mesh file

Discussion in 'Scripting' started by ColorStorm, Jan 27, 2016.

  1. ColorStorm

    ColorStorm

    Joined:
    Jul 4, 2012
    Posts:
    28
    Currently i am changing vertexcolors of a mesh during runtime, and i am wondering if i can commit those changes to the original file - The issue is of course that the original file is a reference to the changed object and i can't seem to duplicate and swap the files during runtime or replace the vertexcolos of the original file due to this and my lack of scripting ability.

    As long as Unity is running the vertexcolos stay put without the need to do any kind of saving, but when i restart the editor they are reset to the source file vertexcolors. I've managed to copy all the data to a new file (file.Asset), but i want to store it in the original file..

    I would appreciate any hints or suggestions, thanks.
     
  2. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906
    Unity does not do any model exporting out of the box, you will need to implement it yourself