BsScriptPrefab.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptResource.h"
  6. #include "BsPrefab.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup ScriptInteropEngine
  10. * @{
  11. */
  12. /** Interop class between C++ & CLR for Prefab. */
  13. class BS_SCR_BE_EXPORT ScriptPrefab : public TScriptResource<ScriptPrefab, Prefab>
  14. {
  15. public:
  16. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Prefab")
  17. /** Creates an empty, uninitialized managed instance of the resource interop object. */
  18. static MonoObject* createInstance();
  19. private:
  20. friend class ScriptResourceManager;
  21. ScriptPrefab(MonoObject* instance, const HPrefab& prefab);
  22. /************************************************************************/
  23. /* CLR HOOKS */
  24. /************************************************************************/
  25. static void internal_CreateInstance(MonoObject* instance, ScriptSceneObject* so);
  26. static MonoObject* internal_Instantiate(ScriptPrefab* instance);
  27. };
  28. /** @} */
  29. }