- Home /
C# UNITY_IPHONE, Still executing in update()?
I'm not sure whats causing this, but the code within UNITY_IPHONE is still being executed in this update function within the editor.
 void Update () {
         #if UNITY_IPHONE
             setInertia();
         #endif
         
         #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
             setCamera();
         #endif
 }
               Comment
              
 
               
              Answer by liszto · Feb 11, 2013 at 09:47 PM
It's normal when you say :
 #if UNITY_IPHONE
          setInertia();
 #endif
It's not reject by the Unity editor ;)
If you don't want this happen you must do this :
 #if UNITY_IPHONE && !UNITY_EDITOR
          setInertia();
 #endif
Your answer
 
 
             Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Facebook SDK and ADColony Compatible in iOS? 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                