Index: code/branches/core5/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/core5/src/libraries/core/CMakeLists.txt	(revision 5866)
+++ code/branches/core5/src/libraries/core/CMakeLists.txt	(revision 5867)
@@ -37,4 +37,5 @@
   PathConfig.cc
   Resource.cc
+  ScopedSingletonManager.cc
   WindowEventListener.cc
 
Index: code/branches/core5/src/libraries/core/Core.cc
===================================================================
--- code/branches/core5/src/libraries/core/Core.cc	(revision 5866)
+++ code/branches/core5/src/libraries/core/Core.cc	(revision 5867)
@@ -65,4 +65,5 @@
 #include "Language.h"
 #include "LuaState.h"
+#include "ScopedSingletonManager.h"
 #include "Shell.h"
 #include "TclBind.h"
@@ -433,5 +434,5 @@
     {
         // singletons from other libraries
-        Scope<ScopeID::Root>::update(time);
+        ScopedSingletonManager::update(time, ScopeID::Root);
         if (this->bGraphicsLoaded_)
         {
@@ -441,5 +442,5 @@
             this->guiManager_->update(time);
             // graphics singletons from other libraries
-            Scope<ScopeID::Graphics>::update(time);
+            ScopedSingletonManager::update(time, ScopeID::Graphics);
         }
         // process thread commands
Index: code/branches/core5/src/libraries/core/ScopedSingletonManager.cc
===================================================================
--- code/branches/core5/src/libraries/core/ScopedSingletonManager.cc	(revision 5867)
+++ code/branches/core5/src/libraries/core/ScopedSingletonManager.cc	(revision 5867)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ScopedSingletonManager.h"
+
+namespace orxonox
+{
+    /*static*/ std::map<std::string, ScopedSingletonManager*>& ScopedSingletonManager::getManagers()
+    {
+        static std::map<std::string, ScopedSingletonManager*> managers;
+        return managers;
+    }
+    /*static*/ ScopedSingletonManager::ManagerMultiMap& ScopedSingletonManager::getManagersByScope()
+    {
+        static ManagerMultiMap managers;
+        return managers;
+    }
+
+    /*static*/ void ScopedSingletonManager::addManager(ScopedSingletonManager* manager)
+    {
+        getManagers()[manager->className_] = manager;
+        getManagersByScope().insert(std::make_pair(manager->scope_, manager));
+    }
+
+    /*static*/ void ScopedSingletonManager::removeManager(ScopedSingletonManager* manager)
+    {
+        getManagers().erase(getManagers().find(manager->className_));
+        for (ManagerMultiMap::iterator it = getManagersByScope().lower_bound(manager->scope_); it != getManagersByScope().upper_bound(manager->scope_);)
+            if (it->second == manager)
+                getManagersByScope().erase(it++);
+            else
+                ++it;
+    }
+}
Index: code/branches/core5/src/libraries/core/ScopedSingletonManager.h
===================================================================
--- code/branches/core5/src/libraries/core/ScopedSingletonManager.h	(revision 5867)
+++ code/branches/core5/src/libraries/core/ScopedSingletonManager.h	(revision 5867)
@@ -0,0 +1,124 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef __ScopedSingletonManager_H__
+#define __ScopedSingletonManager_H__
+
+#include "CorePrereqs.h"
+
+#include <cassert>
+#include <map>
+#include "util/Scope.h"
+#include "util/Singleton.h"
+
+#define ManageScopedSingleton(className, scope) \
+    static ClassScopedSingletonManager<className, scope> className##ScopedSingletonManager(#className)
+
+namespace orxonox
+{
+    class _CoreExport ScopedSingletonManager
+    {
+        public:
+            ScopedSingletonManager(const std::string& className, ScopeID::Value scope)
+                : className_(className)
+                , scope_(scope)
+            { }
+            virtual ~ScopedSingletonManager() { }
+            static void addManager(ScopedSingletonManager* manager);
+            static void removeManager(ScopedSingletonManager* manager);
+
+            static void update(const Clock& time, ScopeID::Value scope)
+            {
+                for (ManagerMultiMap::iterator it = getManagersByScope().lower_bound(scope); it != getManagersByScope().upper_bound(scope); ++it)
+                    it->second->update(time);
+            }
+            virtual void update(const Clock& time) = 0;
+
+            static std::map<std::string, ScopedSingletonManager*>& getManagers();
+            typedef std::multimap<ScopeID::Value, ScopedSingletonManager*> ManagerMultiMap;
+            static ManagerMultiMap& getManagersByScope();
+
+        protected:
+            const std::string className_;
+            const ScopeID::Value scope_;
+    };
+
+    template <class T, ScopeID::Value scope>
+    class ClassScopedSingletonManager : public ScopedSingletonManager, public ScopeListener
+    {
+    public:
+        ClassScopedSingletonManager(const std::string& className)
+            : ScopedSingletonManager(className, scope)
+            , ScopeListener(scope)
+            , singletonPtr_(NULL)
+        {
+            ScopedSingletonManager::addManager(this);
+        }
+
+        ~ClassScopedSingletonManager()
+        {
+            ScopedSingletonManager::removeManager(this);
+        }
+
+        //! Called if the Scope of the Singleton gets active (creates the instance)
+        void activated()
+        {
+            assert(singletonPtr_ == NULL);
+            singletonPtr_ = new T();
+        }
+
+        //! Called if the Scope of this Singleton gets deactivated (destroys the instance)
+        void deactivated()
+        {
+            assert(singletonPtr_ != NULL);
+            this->destroy(singletonPtr_);
+            singletonPtr_ = NULL;
+        }
+
+        void destroy(OrxonoxClass* ptr)
+        {
+            singletonPtr_->destroy();
+        }
+        void destroy(void* ptr)
+        {
+            delete singletonPtr_;
+        }
+
+        //! Called every frame by the ScopedSingletonManager
+        void update(const Clock& time)
+        {
+            // assuming T inherits Singleton<T>
+            singletonPtr_->updateSingleton(time);
+        }
+
+    private:
+        T* singletonPtr_;
+    };
+}
+
+#endif /* __ScopedSingletonManager_H__ */
Index: code/branches/core5/src/libraries/util/Scope.h
===================================================================
--- code/branches/core5/src/libraries/util/Scope.h	(revision 5866)
+++ code/branches/core5/src/libraries/util/Scope.h	(revision 5867)
@@ -73,6 +73,4 @@
             //! Gets called if the scope is deactivated
             virtual void deactivated() = 0;
-            //! Gets called if the scope is updated
-            virtual void updated(const Clock& time) = 0;
 
         private:
@@ -124,14 +122,4 @@
                 return (ScopeManager::instanceCounts_s[scope] > 0);
             }
-
-            //! Update method for the ScopeListeners (to implement singleton updates)
-            static void update(const Clock& time)
-            {
-                if (isActive())
-                {
-                    for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
-                        (*(it++))->updated(time);
-                }
-            }
     };
 }
Index: code/branches/core5/src/libraries/util/ScopedSingleton.h
===================================================================
--- code/branches/core5/src/libraries/util/ScopedSingleton.h	(revision 5866)
+++ 	(revision )
@@ -1,108 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef __Util_ScopedSingleton_H__
-#define __Util_ScopedSingleton_H__
-
-#include "UtilPrereqs.h"
-#include <cassert>
-
-#include "Scope.h"
-
-namespace orxonox
-{
-    class Clock;
-    /**
-    @brief
-        Base for scoped singleton classes.
-        A Scoped singleton creates itself if the scope is active and getInstance() is called.
-        Destroys itself if the scope is deactivated.
-
-        Usage:
-        Inherit publicly from ScopedSingleton<MyClass, scope> and provide access to
-        MyClass::singletonPtr_s.
-        This can easily be done with a friend declaration.
-
-        See @ref UtilPrereqs.h for a list of scopes (ScopeID::Value).
-    */
-    template <class T, ScopeID::Value scope>
-    class ScopedSingleton : public ScopeListener
-    {
-        public:
-            //! Returns a reference to the singleton instance
-            static T& getInstance()
-            {
-                assert(Scope<scope>::isActive());
-
-                if (!T::singletonPtr_s)
-                    T::singletonPtr_s = new T();
-
-                return *T::singletonPtr_s;
-            }
-
-            //! Update method for singletons like the ingame console
-            virtual void updated(const Clock& time) { static_cast<T*>(this)->update(time); }
-            //! Empty update method for the static polymorphism
-            void update(const Clock& time) { }
-
-        protected:
-            //! Constructor sets the singleton instance pointer
-            ScopedSingleton() : ScopeListener(scope)
-            {
-                assert(T::singletonPtr_s == 0);
-                T::singletonPtr_s = static_cast<T*>(this);
-            }
-
-            //! Constructor resets the singleton instance pointer
-            ~ScopedSingleton()
-            {
-                assert(T::singletonPtr_s != 0);
-                T::singletonPtr_s = 0;
-            }
-
-        private:
-            //! Called if the Scope of this Singleton gets active (no instance should be active then)
-            void activated()
-            {
-                // The ScopedSingleton shouldn't be active bevor the scope is activated -> always assertion failed
-                assert(false);
-            }
-
-            //! Called if the Scope of this Singleton gets deactivated (destroys the instance)
-            void deactivated()
-            {
-                if (T::singletonPtr_s)
-                {
-                    T::singletonPtr_s->destroy();
-                    T::singletonPtr_s = 0;
-                }
-            }
-    };
-}
-
-#endif /* __Util_ScopedSingleton_H__ */
Index: code/branches/core5/src/libraries/util/Singleton.h
===================================================================
--- code/branches/core5/src/libraries/util/Singleton.h	(revision 5866)
+++ code/branches/core5/src/libraries/util/Singleton.h	(revision 5867)
@@ -55,4 +55,9 @@
         }
 
+        //! Update method called by ClassSingletonManager (if used)
+        void updateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->update(time); }
+        //! Empty update method for the static polymorphism
+        void update(const Clock& time) { }
+
     protected:
         //! Constructor sets the singleton instance pointer
