BsScriptPrefab.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. /**
  10. * @brief Interop class between C++ & CLR for Prefab.
  11. */
  12. class BS_SCR_BE_EXPORT ScriptPrefab : public TScriptResource<ScriptPrefab, Prefab>
  13. {
  14. public:
  15. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Prefab")
  16. private:
  17. friend class ScriptResourceManager;
  18. ScriptPrefab(MonoObject* instance, const HPrefab& prefab);
  19. /**
  20. * @brief Creates an empty, uninitialized managed instance of the resource interop object.
  21. */
  22. static MonoObject* createInstance();
  23. /************************************************************************/
  24. /* CLR HOOKS */
  25. /************************************************************************/
  26. static void internal_CreateInstance(MonoObject* instance, ScriptSceneObject* so);
  27. static MonoObject* internal_Instantiate(ScriptPrefab* instance);
  28. };
  29. }