Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. The Burst compiler has its own forum section now.
    Dismiss Notice
  4. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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.
     
unityunity