BsScriptMeta.h 1.3 KB

123456789101112131415161718192021222324
  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 BansheeEngine
  6. {
  7. /**
  8. * @brief Contains information required for initializing and handling a single script class.
  9. */
  10. struct BS_MONO_EXPORT ScriptMeta
  11. {
  12. ScriptMeta();
  13. ScriptMeta(const String& assembly, const String& ns, const String& name, std::function<void()> initCallback);
  14. String ns; /**< Namespace the script class is located in. */
  15. String name; /**< Type name of the script class. */
  16. String assembly; /**< Name of the assembly the script class is located in. */
  17. std::function<void()> initCallback; /**< Callback that will be triggered when assembly containing the class is loaded or refreshed. Used for one time initialization. */
  18. MonoClass* scriptClass; /**< Class object describing the script class. Only valid after assembly containing this type was loaded. */
  19. 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. */
  20. };
  21. }