- Home /
 
Editmode or Runtime
I have made( a new scrpit(0,0,0,0)) like;
 using UnityEngine;
 using System.Collections;
 [ExecuteInEditMode]
 public class test : MonoBehaviour {
     void Update () {
         if (editmode) {
             Debug.Log("Executing in editmode");
         }
         if (runtime)
         {
             Debug.Log("Execting in runtime mode.")
         }
     }
 }
 
               Please help me( how can I check( is the script() running in editor() or runtime()));
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by GameVortex · Mar 09, 2014 at 09:59 AM
 If(Application.isPlaying)
 {
     //runtime
 }
 else
 {
     // editmode
 }
 
              Your answer