RuntimeMeshComponentPlugin.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2016 Chris Conway (Koderz). All Rights Reserved.
  2. #pragma once
  3. #include "ModuleManager.h"
  4. /**
  5. * The public interface to this module
  6. */
  7. class IRuntimeMeshComponentPlugin : public IModuleInterface
  8. {
  9. public:
  10. /**
  11. * Singleton-like access to this module's interface. This is just for convenience!
  12. * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
  13. *
  14. * @return Returns singleton instance, loading the module on demand if needed
  15. */
  16. static inline IRuntimeMeshComponentPlugin& Get()
  17. {
  18. return FModuleManager::LoadModuleChecked< IRuntimeMeshComponentPlugin >("RuntimeMeshComponentPlugin");
  19. }
  20. /**
  21. * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true.
  22. *
  23. * @return True if the module is loaded and ready to use
  24. */
  25. static inline bool IsAvailable()
  26. {
  27. return FModuleManager::Get().IsModuleLoaded("RuntimeMeshComponentPlugin");
  28. }
  29. };
  30. DECLARE_LOG_CATEGORY_EXTERN(RuntimeMeshLog, Log, All);