private void updateRemoteBehaviour() { if (null != _remoteBehaviour) { _remoteBehaviour.Source = null; DestroyImmediate(_remoteBehaviour); _remoteBehaviour = null; } if (_target) { _remoteBehaviour = _target.gameObject.AddComponent <TargetLayoutElementRemoteBehaviour>(); _remoteBehaviour.Source = this; //_remoteBehaviour.hideFlags |= HideFlags.HideInInspector; } }
public void OnDestroyOfRemoteBehaviour() { _target = null; _remoteBehaviour = null; }