2
0

BsScriptPrefab.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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, bool isScene);
  26. static MonoObject* internal_Instantiate(ScriptPrefab* instance);
  27. static bool internal_IsScene(ScriptPrefab* instance);
  28. };
  29. /** @} */
  30. }