2
0

BsScriptMeta.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsMonoPrerequisites.h"
  5. namespace bs
  6. {
  7. /** @addtogroup Mono
  8. * @{
  9. */
  10. /** Contains information required for initializing and handling a single script class. */
  11. struct BS_MONO_EXPORT ScriptMeta
  12. {
  13. ScriptMeta();
  14. ScriptMeta(const String& assembly, const String& ns, const String& name, std::function<void()> initCallback);
  15. String ns; /**< Namespace the script class is located in. */
  16. String name; /**< Type name of the script class. */
  17. String assembly; /**< Name of the assembly the script class is located in. */
  18. /**
  19. * Callback that will be triggered when assembly containing the class is loaded or refreshed. Used for one time
  20. * initialization.
  21. */
  22. std::function<void()> initCallback;
  23. /** Class object describing the script class. Only valid after assembly containing this type was loaded. */
  24. MonoClass* scriptClass;
  25. /**
  26. * Field object that contains a pointer to the native instance of the script object. Only valid after assembly
  27. * containing this type was loaded.
  28. */
  29. MonoField* thisPtrField;
  30. };
  31. /** @} */
  32. }