BsScriptMeta.h 1.0 KB

12345678910111213141516171819202122
  1. #pragma once
  2. #include "BsMonoPrerequisites.h"
  3. namespace BansheeEngine
  4. {
  5. /**
  6. * @brief Contains information required for initializing and handling a single script class.
  7. */
  8. struct BS_MONO_EXPORT ScriptMeta
  9. {
  10. ScriptMeta();
  11. ScriptMeta(const String& assembly, const String& ns, const String& name, std::function<void()> initCallback);
  12. String ns; /**< Namespace the script class is located in. */
  13. String name; /**< Type name of the script class. */
  14. String assembly; /**< Name of the assembly the script class is located in. */
  15. std::function<void()> initCallback; /**< Callback that will be triggered when assembly containing the class is loaded or refreshed. Used for one time initialization. */
  16. MonoClass* scriptClass; /**< Class object describing the script class. Only valid after assembly containing this type was loaded. */
  17. MonoField* thisPtrField; /**< Field object that contains a pointer to the native instance of the script object. Only valid after assembly containing this type was loaded. */
  18. };
  19. }