mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-05-15 01:42:07 +02:00
Print an error if more than one UserManagers are trying to become the global instance.
This commit is contained in:
parent
a2309aa272
commit
31dd5d436c
@ -82,6 +82,11 @@ UserManager *UserDB::get_user_manager() {
|
||||
return _user_manager;
|
||||
}
|
||||
void UserDB::set_user_manager(UserManager *um) {
|
||||
if (_user_manager && um && _user_manager != um) {
|
||||
ERR_FAIL_MSG("There is already a global UserManager! Please make sure there is only one with it's register_as_global property set to true in the scene tree!");
|
||||
return;
|
||||
}
|
||||
|
||||
_user_manager = um;
|
||||
}
|
||||
void UserDB::unset_user_manager(UserManager *um) {
|
||||
|
Loading…
Reference in New Issue
Block a user