Пример #1
0
 private void OnValidate()
 {
     if (!_profile)
     {
         _profile = GetComponent <CharacterProfile>();
     }
     if (!_account)
     {
         _account = GetComponent <PlayerAccount>();
     }
 }
 //VALIDATE - Auto-Loads Components
 private void OnValidate()
 {
     if (!_player)
     {
         _player = Local.player;
     }
     if (!_account)
     {
         _account = (player) ? player.GetComponent <PlayerAccount>() : null;
     }
     if (!_playerProfile && Local.player)
     {
         _playerProfile = (player) ? player.GetComponent <CharacterProfile>() : null;
     }
 }