Search Unity

Render procedural mesh in editor

Discussion in 'Scripting' started by jmcclure, Mar 5, 2012.

  1. jmcclure

    jmcclure

    Joined:
    May 5, 2009
    Posts:
    48
    I have a script that generates a procedural mesh. It works fine in-game, but is there any way to render the procedural mesh in the editor if this script is attached to a game object in the scene?

    I've been trying to find the correct search terms to figure this out myself, but so far I'm failing.
     
  2. jmcclure

    jmcclure

    Joined:
    May 5, 2009
    Posts:
    48
    I found the answer myself. For anyone else looking for the same information, there is a class attribute [ExecuteInEditorMode] that makes a script run even if you're not in game mode.