Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

LateUpdate() called when MonoBehaviour.enabled==false

$
0
0
Here is the simple test code for this issue. Unity version 5.3.4f1
Code (CSharp):
  1. public class Player : NetworkBehaviour{
  2.  
  3.     // Use this for initialization
  4.     void Start () {
  5.         if(!isLocalPlayer)
  6.             this.enabled = false;
  7.     }
  8.  
  9.     // Update is called once per frame
  10.     void Update () {
  11.         if(this.enabled == false)
  12.         {
  13.             Debug.Log("Call Update when this.enable == false");
  14.         }
  15.     }
  16.  
  17.     void LateUpdate()
  18.     {
  19.         if(this.enabled == false)...
LateUpdate() called when MonoBehaviour.enabled==false

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>