private void Start_UCE_Friendship() { UCE_Friends.Callback += OnUCE_FriendListChanged; if (!_instance) { _instance = FindObjectOfType <UCE_UI_FriendList>(); } if (_instance) { _instance.Prepare(); } }
// ----------------------------------------------------------------------------------- // OnUCE_FriendListChanged // ----------------------------------------------------------------------------------- private void OnUCE_FriendListChanged(SyncListUCE_Friend.Operation op, int itemIndex, UCE_Friend oldSlot, UCE_Friend newSlot) { Player player = Player.localPlayer; if (!player) { return; } if (!_instance) { _instance = FindObjectOfType <UCE_UI_FriendList>(); } _instance.Prepare(); }