2
0
Эх сурвалжийг харах

More work on improving documentation for doxygen generation

BearishSun 9 жил өмнө
parent
commit
9fe8a629e5
71 өөрчлөгдсөн 3763 нэмэгдсэн , 3849 устгасан
  1. 40 47
      Source/SBansheeEngine/Include/BsEngineScriptLibrary.h
  2. 6 0
      Source/SBansheeEngine/Include/BsManagedComponent.h
  3. 97 103
      Source/SBansheeEngine/Include/BsManagedResource.h
  4. 34 36
      Source/SBansheeEngine/Include/BsManagedResourceManager.h
  5. 30 26
      Source/SBansheeEngine/Include/BsManagedResourceMetaData.h
  6. 79 78
      Source/SBansheeEngine/Include/BsPlayInEditorManager.h
  7. 48 46
      Source/SBansheeEngine/Include/BsScriptAsyncOp.h
  8. 31 33
      Source/SBansheeEngine/Include/BsScriptBoneWeight.h
  9. 32 28
      Source/SBansheeEngine/Include/BsScriptBuiltin.h
  10. 130 135
      Source/SBansheeEngine/Include/BsScriptCamera.h
  11. 31 33
      Source/SBansheeEngine/Include/BsScriptColor.h
  12. 67 61
      Source/SBansheeEngine/Include/BsScriptComponent.h
  13. 47 45
      Source/SBansheeEngine/Include/BsScriptContextMenu.h
  14. 42 38
      Source/SBansheeEngine/Include/BsScriptCursor.h
  15. 49 51
      Source/SBansheeEngine/Include/BsScriptDebug.h
  16. 47 47
      Source/SBansheeEngine/Include/BsScriptFont.h
  17. 74 76
      Source/SBansheeEngine/Include/BsScriptFontBitmap.h
  18. 40 40
      Source/SBansheeEngine/Include/BsScriptGUIContentImages.h
  19. 51 57
      Source/SBansheeEngine/Include/BsScriptGameObject.h
  20. 6 0
      Source/SBansheeEngine/Include/BsScriptGameObjectManager.h
  21. 37 35
      Source/SBansheeEngine/Include/BsScriptHString.h
  22. 86 100
      Source/SBansheeEngine/Include/BsScriptInput.h
  23. 77 79
      Source/SBansheeEngine/Include/BsScriptInputConfiguration.h
  24. 74 76
      Source/SBansheeEngine/Include/BsScriptLight.h
  25. 24 20
      Source/SBansheeEngine/Include/BsScriptLogEntry.h
  26. 59 71
      Source/SBansheeEngine/Include/BsScriptManagedResource.h
  27. 70 70
      Source/SBansheeEngine/Include/BsScriptMaterial.h
  28. 92 110
      Source/SBansheeEngine/Include/BsScriptMesh.h
  29. 74 86
      Source/SBansheeEngine/Include/BsScriptMeshData.h
  30. 183 215
      Source/SBansheeEngine/Include/BsScriptObject.h
  31. 30 26
      Source/SBansheeEngine/Include/BsScriptObjectImpl.h
  32. 75 83
      Source/SBansheeEngine/Include/BsScriptObjectManager.h
  33. 42 36
      Source/SBansheeEngine/Include/BsScriptPhysicsMaterial.h
  34. 36 30
      Source/SBansheeEngine/Include/BsScriptPhysicsMesh.h
  35. 58 65
      Source/SBansheeEngine/Include/BsScriptPixelData.h
  36. 41 37
      Source/SBansheeEngine/Include/BsScriptPixelUtility.h
  37. 38 36
      Source/SBansheeEngine/Include/BsScriptPlainText.h
  38. 36 34
      Source/SBansheeEngine/Include/BsScriptPrefab.h
  39. 39 37
      Source/SBansheeEngine/Include/BsScriptProfilerOverlayInternal.h
  40. 51 51
      Source/SBansheeEngine/Include/BsScriptRenderTarget.h
  41. 24 20
      Source/SBansheeEngine/Include/BsScriptRenderTexture.h
  42. 50 51
      Source/SBansheeEngine/Include/BsScriptRenderTexture2D.h
  43. 53 58
      Source/SBansheeEngine/Include/BsScriptRenderable.h
  44. 138 170
      Source/SBansheeEngine/Include/BsScriptResource.h
  45. 105 107
      Source/SBansheeEngine/Include/BsScriptResourceManager.h
  46. 67 65
      Source/SBansheeEngine/Include/BsScriptResourceRef.h
  47. 33 29
      Source/SBansheeEngine/Include/BsScriptResources.h
  48. 50 44
      Source/SBansheeEngine/Include/BsScriptScene.h
  49. 99 109
      Source/SBansheeEngine/Include/BsScriptSceneObject.h
  50. 45 46
      Source/SBansheeEngine/Include/BsScriptScriptCode.h
  51. 37 33
      Source/SBansheeEngine/Include/BsScriptSerializableArray.h
  52. 38 34
      Source/SBansheeEngine/Include/BsScriptSerializableDictionary.h
  53. 42 39
      Source/SBansheeEngine/Include/BsScriptSerializableField.h
  54. 37 33
      Source/SBansheeEngine/Include/BsScriptSerializableList.h
  55. 44 43
      Source/SBansheeEngine/Include/BsScriptSerializableObject.h
  56. 57 54
      Source/SBansheeEngine/Include/BsScriptSerializableProperty.h
  57. 30 26
      Source/SBansheeEngine/Include/BsScriptSerializableUtility.h
  58. 36 34
      Source/SBansheeEngine/Include/BsScriptShader.h
  59. 30 28
      Source/SBansheeEngine/Include/BsScriptShaderInclude.h
  60. 46 46
      Source/SBansheeEngine/Include/BsScriptSpriteTexture.h
  61. 50 50
      Source/SBansheeEngine/Include/BsScriptStringTable.h
  62. 36 32
      Source/SBansheeEngine/Include/BsScriptStringTableManager.h
  63. 50 48
      Source/SBansheeEngine/Include/BsScriptTexture.h
  64. 41 39
      Source/SBansheeEngine/Include/BsScriptTexture2D.h
  65. 42 38
      Source/SBansheeEngine/Include/BsScriptTexture3D.h
  66. 40 38
      Source/SBansheeEngine/Include/BsScriptTextureCube.h
  67. 33 29
      Source/SBansheeEngine/Include/BsScriptTime.h
  68. 65 83
      Source/SBansheeEngine/Include/BsScriptVector.h
  69. 31 33
      Source/SBansheeEngine/Include/BsScriptVector2I.h
  70. 36 38
      Source/SBansheeEngine/Include/BsScriptVirtualButton.h
  71. 75 75
      Source/SBansheeEngine/Include/BsScriptVirtualInput.h

+ 40 - 47
Source/SBansheeEngine/Include/BsEngineScriptLibrary.h

@@ -1,48 +1,41 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptManager.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Handles initialization/shutdown of the script systems and 
-	 *			loading/refresh of engine-specific assemblies.
-	 */
-	class BS_SCR_BE_EXPORT EngineScriptLibrary : public ScriptLibrary
-	{
-	public:
-		EngineScriptLibrary();
-
-		/**
-		 * @copydoc	ScriptLibrary::initialize
-		 */
-		void initialize() override;
-
-		/**
-		 * @copydoc	ScriptLibrary::reload
-		 */
-		void reload() override;
-
-		/**
-		 * @copydoc	ScriptLibrary::destroy
-		 */
-		void destroy() override;
-
-	protected:
-		/**   
-		 *	@brief	Unloads all manages assemblies and the mono domain. 
-		 */
-		void unloadAssemblies();
-
-		/**   
-		 *	@brief	Shutd down all script engine modules.
-		 */
-		void shutdownModules();
-
-	private:
-		bool mScriptAssembliesLoaded;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptManager.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/** Handles initialization/shutdown of the script systems and loading/refresh of engine-specific assemblies. */
+	class BS_SCR_BE_EXPORT EngineScriptLibrary : public ScriptLibrary
+	{
+	public:
+		EngineScriptLibrary();
+
+		/** @copydoc ScriptLibrary::initialize */
+		void initialize() override;
+
+		/** @copydoc ScriptLibrary::reload */
+		void reload() override;
+
+		/** @copydoc ScriptLibrary::destroy */
+		void destroy() override;
+
+	protected:
+		/** Unloads all manages assemblies and the mono domain. */
+		void unloadAssemblies();
+
+		/** Shuts down all script engine modules. */
+		void shutdownModules();
+
+	private:
+		bool mScriptAssembliesLoaded;
+	};
+
+	/** @} */
 }

+ 6 - 0
Source/SBansheeEngine/Include/BsManagedComponent.h

@@ -8,6 +8,10 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
 	struct ComponentBackupData;
 
 	/**
@@ -165,4 +169,6 @@ namespace BansheeEngine
 		UINT8* data;
 		UINT32 size;
 	};
+
+	/** @} */
 }

+ 97 - 103
Source/SBansheeEngine/Include/BsManagedResource.h

@@ -1,104 +1,98 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsResource.h"
-#include <mono/jit/jit.h>
-#include <mono/metadata/object.h>
-
-namespace BansheeEngine
-{
-	struct ResourceBackupData;
-
-	/**
-	 * @brief	Resource that internally wraps a managed resource object
-	 *			that can be of user-defined type.
-	 */
-	class BS_SCR_BE_EXPORT ManagedResource : public Resource
-	{
-	public:
-		/**
-		 * @brief	Returns the internal managed resource object.
-		 */
-		MonoObject* getManagedInstance() const { return mManagedInstance; }
-
-		/**
-		 * @brief	Serializes the internal managed resource.
-		 *
-		 * @param	clearExisting	Should the managed resource handle be released. (Will trigger a finalizer
-		 *							if this is the last reference to it)
-		 * 
-		 * @return	An object containing the serialized resource. You can provide this to ::restore
-		 *			method to re-create the original resource.
-		 */
-		ResourceBackupData backup(bool clearExisting = true);
-
-		/**
-		 * @brief	Restores a resource from previously serialized data.
-		 *
-		 * @param	instance	New instance of the managed resource. Must be of the valid resource type
-		 *						this object was originally created from. Can be null if the type cannot
-		 *						be found (can happen after an assembly refresh).
-		 * @param	data		Serialized managed resource data that will be used for initializing
-		 *						the new managed instance.
-		 */
-		void restore(MonoObject* instance, const ResourceBackupData& data);
-
-		/**
-		 * @brief	Creates a new managed resource wrapper from an actual managed
-		 *			resource object. Caller must ensure the provided instance
-		 *			actually derives from Resource class.
-		 */
-		static HManagedResource create(MonoObject* managedResource);
-
-		/**
-		 * @brief	Creates an empty managed resource wrapper pointing to no
-		 *			managed instance. You must call ::setHandle before use manually.
-		 */
-		static ManagedResourcePtr createEmpty();
-
-	private:
-		friend class ScriptManagedResource;
-
-		ManagedResource(MonoObject* managedInstance);
-
-		/**
-		 * @brief	Finalizes construction of the object. Must be called before use or when
-		 *			the managed resource instance changes.
-		 *
-		 * @param	object		Managed resource instance.
-		 * @param	myHandle	Handle to myself.
-		 */
-		void setHandle(MonoObject* object, const HManagedResource& myHandle);
-
-		/**
-		 * @copydoc	Resource::destroy
-		 */
-		void destroy() override;
-
-		MonoObject* mManagedInstance;
-		uint32_t mManagedHandle;
-		WeakResourceHandle<ManagedResource> mMyHandle;
-
-		/************************************************************************/
-		/* 								RTTI		                     		*/
-		/************************************************************************/
-	public:
-		friend class ManagedResourceRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const override;
-
-	protected:
-		ManagedResource(); // Serialization only
-	};
-
-	/**
-	 * @brief	Contains serialized resource data buffer.
-	 */
-	struct ResourceBackupData
-	{
-		UINT8* data;
-		UINT32 size;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsResource.h"
+#include <mono/jit/jit.h>
+#include <mono/metadata/object.h>
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	struct ResourceBackupData;
+
+	/** Resource that internally wraps a managed resource object that can be of user-defined type. */
+	class BS_SCR_BE_EXPORT ManagedResource : public Resource
+	{
+	public:
+		/**	Returns the internal managed resource object. */
+		MonoObject* getManagedInstance() const { return mManagedInstance; }
+
+		/**
+		 * Serializes the internal managed resource.
+		 *
+		 * @param[in]	clearExisting	Should the managed resource handle be released. (Will trigger a finalizer if this is
+		 *								the last reference to it)
+		 * @return						An object containing the serialized resource. You can provide this to restore()
+		 *								method to re-create the original resource.
+		 */
+		ResourceBackupData backup(bool clearExisting = true);
+
+		/**
+		 * Restores a resource from previously serialized data.
+		 *
+		 * @param[in]	instance	New instance of the managed resource. Must be of the valid resource type this object was
+		 *							originally created from. Can be null if the type cannot be found (can happen after an
+		 *							assembly refresh).
+		 * @param[in]	data		Serialized managed resource data that will be used for initializing the new managed
+		 *							instance.
+		 */
+		void restore(MonoObject* instance, const ResourceBackupData& data);
+
+		/**
+		 * Creates a new managed resource wrapper from an actual managed resource object. Caller must ensure the provided
+		 * instance actually derives from Resource class.
+		 */
+		static HManagedResource create(MonoObject* managedResource);
+
+		/**
+		 * Creates an empty managed resource wrapper pointing to no managed instance. You must call setHandle() before use
+		 * manually.
+		 */
+		static ManagedResourcePtr createEmpty();
+
+	private:
+		friend class ScriptManagedResource;
+
+		ManagedResource(MonoObject* managedInstance);
+
+		/**
+		 * Finalizes construction of the object. Must be called before use or when the managed resource instance changes.
+		 *
+		 * @param[in]	object		Managed resource instance.
+		 * @param[in]	myHandle	Handle to myself.
+		 */
+		void setHandle(MonoObject* object, const HManagedResource& myHandle);
+
+		/** @copydoc Resource::destroy */
+		void destroy() override;
+
+		MonoObject* mManagedInstance;
+		uint32_t mManagedHandle;
+		WeakResourceHandle<ManagedResource> mMyHandle;
+
+		/************************************************************************/
+		/* 								RTTI		                     		*/
+		/************************************************************************/
+	public:
+		friend class ManagedResourceRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const override;
+
+	protected:
+		ManagedResource(); // Serialization only
+	};
+
+	/**	Contains serialized resource data buffer. */
+	struct ResourceBackupData
+	{
+		UINT8* data;
+		UINT32 size;
+	};
+
+	/** @} */
 }

+ 34 - 36
Source/SBansheeEngine/Include/BsManagedResourceManager.h

@@ -1,37 +1,35 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsModule.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Keeps track of all loaded managed resources.
-	 */
-	class BS_SCR_BE_EXPORT ManagedResourceManager : public Module <ManagedResourceManager>
-	{
-	public:
-		ManagedResourceManager();
-		~ManagedResourceManager();
-
-		/**   
-		 * @brief	 Unloads all managed resources.
-		 */
-		void clear();
-
-		/**
-		 * @brief	Register a newly created managed resource.
-		 */
-		void registerManagedResource(const WeakResourceHandle<ManagedResource>& resource);
-
-		/**
-		 * @brief	Unregister a managed resource that's about to be destroyed.
-		 */
-		void unregisterManagedResource(const WeakResourceHandle<ManagedResource>& resource);
-
-	private:
-		UnorderedMap<String, WeakResourceHandle<ManagedResource>> mResources;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsModule.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/**	Keeps track of all loaded managed resources. */
+	class BS_SCR_BE_EXPORT ManagedResourceManager : public Module <ManagedResourceManager>
+	{
+	public:
+		ManagedResourceManager();
+		~ManagedResourceManager();
+
+		/** Unloads all managed resources. */
+		void clear();
+
+		/**	Register a newly created managed resource. */
+		void registerManagedResource(const WeakResourceHandle<ManagedResource>& resource);
+
+		/**	Unregister a managed resource that's about to be destroyed. */
+		void unregisterManagedResource(const WeakResourceHandle<ManagedResource>& resource);
+
+	private:
+		UnorderedMap<String, WeakResourceHandle<ManagedResource>> mResources;
+	};
+
+	/** @} */
 }

+ 30 - 26
Source/SBansheeEngine/Include/BsManagedResourceMetaData.h

@@ -1,27 +1,31 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsResourceMetaData.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Resource meta-data for user-defined managed resources.
-	 */
-	class BS_SCR_BE_EXPORT ManagedResourceMetaData : public ResourceMetaData
-	{
-	public:
-		String typeNamespace;
-		String typeName;
-
-		/************************************************************************/
-		/* 								SERIALIZATION                      		*/
-		/************************************************************************/
-	public:
-		friend class ManagedResourceMetaDataRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const override;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsResourceMetaData.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/**	Resource meta-data for user-defined managed resources. */
+	class BS_SCR_BE_EXPORT ManagedResourceMetaData : public ResourceMetaData
+	{
+	public:
+		String typeNamespace;
+		String typeName;
+
+		/************************************************************************/
+		/* 								SERIALIZATION                      		*/
+		/************************************************************************/
+	public:
+		friend class ManagedResourceMetaDataRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const override;
+	};
+
+	/** @} */
 }

+ 79 - 78
Source/SBansheeEngine/Include/BsPlayInEditorManager.h

@@ -1,79 +1,80 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsModule.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	States the game in editor can be in.
-	 */
-	enum class PlayInEditorState
-	{
-		Stopped,
-		Playing,
-		Paused
-	};
-
-	/**
-	 * @brief	Handles functionality specific to running the game in editor.
-	 *
-	 * @note	Play-in-editor functionality is only available for managed code, but can be easily extended to 
-	 *			native code if needed (this would involve moving play in editor code into BansheeEngine library).
-	 */
-	class BS_SCR_BE_EXPORT PlayInEditorManager : public Module<PlayInEditorManager>
-	{
-	public:
-		PlayInEditorManager();
-
-		/**
-		 * @brief	Returns the current play state of the game.
-		 */
-		PlayInEditorState getState() const { return mState; }
-
-		/**
-		 * @brief	Updates the play state of the game, making the game stop or start running.
-		 */
-		void setState(PlayInEditorState state);
-
-		/**
-		 * @brief	Gets the number of seconds that have elapsed since the game was started. This time does not
-		 *			include time passed while the game is paused.
-		 */
-		float getPausableTime() const { return mPausableTime; }
-
-		/**
-		 * @brief	Runs the game for a single frame and then pauses it.
-		 */
-		void frameStep();
-
-		/**
-		 * @brief	Called once per frame.
-		 *
-		 * @note	Internal method.
-		 */
-		void update();
-
-	private:
-		/**
-		 * @brief	Updates the play state of the game, making the game stop or start running. Unlike ::setState this
-		 * 			will trigger the state change right away.
-		 */
-		void setStateImmediate(PlayInEditorState state);
-
-		/**
-		 * @brief	Saves the current state of the scene in memory.
-		 */
-		void saveSceneInMemory();
-
-		PlayInEditorState mState;
-		PlayInEditorState mNextState;
-		bool mFrameStepActive;
-		bool mScheduledStateChange;
-
-		float mPausableTime;
-		HSceneObject mSavedScene;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsModule.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/**	States the game in editor can be in. */
+	enum class PlayInEditorState
+	{
+		Stopped,
+		Playing,
+		Paused
+	};
+
+	/**
+	 * Handles functionality specific to running the game in editor.
+	 *
+	 * @note	
+	 * Play-in-editor functionality is only available for managed code, but can be easily extended to native code if needed
+	 * (this would involve moving play in editor code into BansheeEngine library).
+	 */
+	class BS_SCR_BE_EXPORT PlayInEditorManager : public Module<PlayInEditorManager>
+	{
+	public:
+		PlayInEditorManager();
+
+		/**	Returns the current play state of the game. */
+		PlayInEditorState getState() const { return mState; }
+
+		/**	Updates the play state of the game, making the game stop or start running. */
+		void setState(PlayInEditorState state);
+
+		/**
+		 * Gets the number of seconds that have elapsed since the game was started. This time does not include time passed
+		 * while the game is paused.
+		 */
+		float getPausableTime() const { return mPausableTime; }
+
+		/**	Runs the game for a single frame and then pauses it. */
+		void frameStep();
+
+		/** @cond INTERNAL */
+
+		/**
+		 * Called once per frame.
+		 *
+		 * @note	Internal method.
+		 */
+		void update();
+
+		/** @endcond */
+
+	private:
+		/**
+		 * Updates the play state of the game, making the game stop or start running. Unlike setState() this will trigger
+		 * the state change right away.
+		 */
+		void setStateImmediate(PlayInEditorState state);
+
+		/**	Saves the current state of the scene in memory. */
+		void saveSceneInMemory();
+
+		PlayInEditorState mState;
+		PlayInEditorState mNextState;
+		bool mFrameStepActive;
+		bool mScheduledStateChange;
+
+		float mPausableTime;
+		HSceneObject mSavedScene;
+	};
+
+	/** @} */
 }

+ 48 - 46
Source/SBansheeEngine/Include/BsScriptAsyncOp.h

@@ -1,47 +1,49 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsAsyncOp.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for AsyncOp.
-	 */
-	class BS_SCR_BE_EXPORT ScriptAsyncOp : public ScriptObject<ScriptAsyncOp>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "AsyncOp")
-
-		/**
-		 * @brief	Creates a new managed AsyncOp instance.
-		 *
-		 * @param	op						Native AsyncOp to wrap.
-		 * @param	asyncOpToReturnValue	Callback that converts the returned value from native async op
-		 *									to a managed object.
-		 */
-		static MonoObject* create(const AsyncOp& op, std::function<MonoObject*(const AsyncOp&)> asyncOpToReturnValue);
-
-	private:
-		ScriptAsyncOp(MonoObject* instance);
-
-		/**
-		 * @brief	Finishes construction of the AsyncOp wrapper. Must be called before using the object.
-		 */
-		void initialize(const AsyncOp& op, std::function<MonoObject*(const AsyncOp&)> asyncOpToReturnValue);
-
-		AsyncOp mAsyncOp;
-		std::function<MonoObject*(const AsyncOp&)> mConvertCallback;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* managedInstance);
-		static void internal_isComplete(ScriptAsyncOp* thisPtr, bool* value);
-		static MonoObject* internal_getReturnValue(ScriptAsyncOp* thisPtr);
-		static void internal_blockUntilComplete(ScriptAsyncOp* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsAsyncOp.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for AsyncOp. */
+	class BS_SCR_BE_EXPORT ScriptAsyncOp : public ScriptObject<ScriptAsyncOp>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "AsyncOp")
+
+		/**
+		 * Creates a new managed AsyncOp instance.
+		 *
+		 * @param[in]	op						Native AsyncOp to wrap.
+		 * @param[in]	asyncOpToReturnValue	Callback that converts the returned value from native async op to a managed
+		 *										object.
+		 */
+		static MonoObject* create(const AsyncOp& op, std::function<MonoObject*(const AsyncOp&)> asyncOpToReturnValue);
+
+	private:
+		ScriptAsyncOp(MonoObject* instance);
+
+		/**	Finishes construction of the AsyncOp wrapper. Must be called before using the object. */
+		void initialize(const AsyncOp& op, std::function<MonoObject*(const AsyncOp&)> asyncOpToReturnValue);
+
+		AsyncOp mAsyncOp;
+		std::function<MonoObject*(const AsyncOp&)> mConvertCallback;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* managedInstance);
+		static void internal_isComplete(ScriptAsyncOp* thisPtr, bool* value);
+		static MonoObject* internal_getReturnValue(ScriptAsyncOp* thisPtr);
+		static void internal_blockUntilComplete(ScriptAsyncOp* thisPtr);
+	};
+
+	/** @} */
 }

+ 31 - 33
Source/SBansheeEngine/Include/BsScriptBoneWeight.h

@@ -1,34 +1,32 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsMeshData.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for BoneWeight.
-	 */
-	class BS_SCR_BE_EXPORT ScriptBoneWeight : public ScriptObject <ScriptBoneWeight>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "BoneWeight")
-
-		/**
-		 * @brief	Unboxes a boxed managed BoneWeight struct and returns
-		 *			the native version of the structure.
-		 */
-		static BoneWeight unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native BoneWeight struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const BoneWeight& value);
-
-	private:
-		ScriptBoneWeight(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsMeshData.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for BoneWeight. */
+	class BS_SCR_BE_EXPORT ScriptBoneWeight : public ScriptObject <ScriptBoneWeight>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "BoneWeight")
+
+		/**	Unboxes a boxed managed BoneWeight struct and returns the native version of the structure. */
+		static BoneWeight unbox(MonoObject* obj);
+
+		/** Boxes a native BoneWeight struct and returns a managed object containing it. */
+		static MonoObject* box(const BoneWeight& value);
+
+	private:
+		ScriptBoneWeight(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 32 - 28
Source/SBansheeEngine/Include/BsScriptBuiltin.h

@@ -1,29 +1,33 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsBuiltinResources.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for BuiltinResources.
-	 */
-	class BS_SCR_BE_EXPORT ScriptBuiltin : public ScriptObject <ScriptBuiltin>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Builtin")
-
-	private:
-		ScriptBuiltin(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_GetWhiteTexture();
-		static MonoObject* internal_GetDiffuseShader();
-		static MonoObject* internal_GetMesh(BuiltinMesh meshType);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsBuiltinResources.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for BuiltinResources. */
+	class BS_SCR_BE_EXPORT ScriptBuiltin : public ScriptObject <ScriptBuiltin>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Builtin")
+
+	private:
+		ScriptBuiltin(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_GetWhiteTexture();
+		static MonoObject* internal_GetDiffuseShader();
+		static MonoObject* internal_GetMesh(BuiltinMesh meshType);
+	};
+
+	/** @} */
 }

+ 130 - 135
Source/SBansheeEngine/Include/BsScriptCamera.h

@@ -1,136 +1,131 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsVector2.h"
-#include "BsVector3.h"
-#include "BsVector2I.h"
-#include "BsRay.h"
-#include "BsDegree.h"
-#include "BsMatrix4.h"
-#include "BsRect2.h"
-#include "BsColor.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Camera.
-	 */
-	class BS_SCR_BE_EXPORT ScriptCamera : public ScriptObject<ScriptCamera>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeCamera")
-
-		/**
-		 * @brief	Returns the wrapped native Camera object.
-		 */
-		SPtr<Camera> getInternal() const { return mCamera; }
-
-	private:
-		ScriptCamera(MonoObject* managedInstance, const HSceneObject& parentSO);
-		~ScriptCamera();
-
-		/**
-		 * @brief	Updates the internal camera handler from the transform of the
-		 *			provided scene object.
-		 */
-		void updateView(const HSceneObject& parent);
-
-		/**
-		 * @brief	Destroys the internal camera handler object.
-		 */
-		void destroy();
-
-		/**
-		 * @copydoc	ScriptObject::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		SPtr<Camera> mCamera;
-		UINT32 mLastUpdateHash;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_Create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
-
-		static float internal_GetAspect(ScriptCamera* instance);
-		static void internal_SetAspect(ScriptCamera* instance, float value);
-		static float internal_GetNearClip(ScriptCamera* instance);
-		static void internal_SetNearClip(ScriptCamera* instance, float value);
-
-		static float internal_GetFarClip(ScriptCamera* instance);
-		static void internal_SetFarClip(ScriptCamera* instance, float value);
-
-		static void internal_GetFieldOfView(ScriptCamera* instance, Degree* value);
-		static void internal_SetFieldOfView(ScriptCamera* instance, Degree* value);
-
-		static void internal_GetViewportRect(ScriptCamera* instance, Rect2* value);
-		static void internal_SetViewportRect(ScriptCamera* instance, Rect2* value);
-
-		static UINT32 internal_GetProjectionType(ScriptCamera* instance);
-		static void internal_SetProjectionType(ScriptCamera* instance, UINT32 value);
-
-		static float internal_GetOrthographicHeight(ScriptCamera* instance);
-		static void internal_SetOrthographicHeight(ScriptCamera* instance, float value);
-
-		static float internal_GetOrthographicWidth(ScriptCamera* instance);
-
-		static void internal_GetClearColor(ScriptCamera* instance, Color* value);
-		static void internal_SetClearColor(ScriptCamera* instance, Color* value);
-
-		static float internal_GetDepthClearValue(ScriptCamera* instance);
-		static void internal_SetDepthClearValue(ScriptCamera* instance, float value);
-
-		static UINT16 internal_GetStencilClearValue(ScriptCamera* instance);
-		static void internal_SetStencilClearValue(ScriptCamera* instance, UINT16 value);
-
-		static UINT32 internal_GetClearFlags(ScriptCamera* instance);
-		static void internal_SetClearFlags(ScriptCamera* instance, UINT32 value);
-
-		static int internal_GetPriority(ScriptCamera* instance);
-		static void internal_SetPriority(ScriptCamera* instance, int value);
-
-		static UINT64 internal_GetLayers(ScriptCamera* instance);
-		static void internal_SetLayers(ScriptCamera* instance, UINT64 value);
-
-		static void internal_GetProjMatrix(ScriptCamera* instance, Matrix4* value);
-		static void internal_GetProjMatrixInv(ScriptCamera* instance, Matrix4* value);
-
-		static void internal_GetViewMatrix(ScriptCamera* instance, Matrix4* value);
-		static void internal_GetViewMatrixInv(ScriptCamera* instance, Matrix4* value);
-
-		static int internal_GetWidthPixels(ScriptCamera* instance);
-		static int internal_GetHeightPixels(ScriptCamera* instance);
-
-		static void internal_WorldToScreen(ScriptCamera* instance, Vector3* value, Vector2I* output);
-		static void internal_WorldToNDC(ScriptCamera* instance, Vector3* value, Vector2* output);
-		static void internal_WorldToView(ScriptCamera* instance, Vector3* value, Vector3* output);
-
-		static void internal_ScreenToWorld(ScriptCamera* instance, Vector2I* value, float depth, Vector3* output);
-		static void internal_ScreenToView(ScriptCamera* instance, Vector2I* value, float depth, Vector3* output);
-		static void internal_ScreenToNDC(ScriptCamera* instance, Vector2I* value, Vector2* output);
-
-		static void internal_ViewToWorld(ScriptCamera* instance, Vector3* value, Vector3* output);
-		static void internal_ViewToScreen(ScriptCamera* instance, Vector3* value, Vector2I* output);
-		static void internal_ViewToNDC(ScriptCamera* instance, Vector3* value, Vector2* output);
-
-		static void internal_NDCToWorld(ScriptCamera* instance, Vector2* value, float depth, Vector3* output);
-		static void internal_NDCToView(ScriptCamera* instance, Vector2* value, float depth, Vector3* output);
-		static void internal_NDCToScreen(ScriptCamera* instance, Vector2* value, Vector2I* output);
-
-		static void internal_ScreenToWorldRay(ScriptCamera* instance, Vector2I* value, Ray* output);
-		static void internal_ProjectPoint(ScriptCamera* instance, Vector3* value, Vector3* output);
-		static void internal_UnprojectPoint(ScriptCamera* instance, Vector3* value, Vector3* output);
-
-		static void internal_SetRenderTarget(ScriptCamera* instance, ScriptRenderTarget* target);
-
-		static bool internal_GetMain(ScriptCamera* instance);
-		static void internal_SetMain(ScriptCamera* instance, bool main);
-
-		static void internal_UpdateView(ScriptCamera* instance, ScriptSceneObject* parent);
-		static void internal_OnDestroy(ScriptCamera* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsVector2.h"
+#include "BsVector3.h"
+#include "BsVector2I.h"
+#include "BsRay.h"
+#include "BsDegree.h"
+#include "BsMatrix4.h"
+#include "BsRect2.h"
+#include "BsColor.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Camera. */
+	class BS_SCR_BE_EXPORT ScriptCamera : public ScriptObject<ScriptCamera>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeCamera")
+
+		/**	Returns the wrapped native Camera object. */
+		SPtr<Camera> getInternal() const { return mCamera; }
+
+	private:
+		ScriptCamera(MonoObject* managedInstance, const HSceneObject& parentSO);
+		~ScriptCamera();
+
+		/**	Updates the internal camera handler from the transform of the provided scene object. */
+		void updateView(const HSceneObject& parent);
+
+		/**	Destroys the internal camera handler object. */
+		void destroy();
+
+		/** @copydoc ScriptObject::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		SPtr<Camera> mCamera;
+		UINT32 mLastUpdateHash;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_Create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
+
+		static float internal_GetAspect(ScriptCamera* instance);
+		static void internal_SetAspect(ScriptCamera* instance, float value);
+		static float internal_GetNearClip(ScriptCamera* instance);
+		static void internal_SetNearClip(ScriptCamera* instance, float value);
+
+		static float internal_GetFarClip(ScriptCamera* instance);
+		static void internal_SetFarClip(ScriptCamera* instance, float value);
+
+		static void internal_GetFieldOfView(ScriptCamera* instance, Degree* value);
+		static void internal_SetFieldOfView(ScriptCamera* instance, Degree* value);
+
+		static void internal_GetViewportRect(ScriptCamera* instance, Rect2* value);
+		static void internal_SetViewportRect(ScriptCamera* instance, Rect2* value);
+
+		static UINT32 internal_GetProjectionType(ScriptCamera* instance);
+		static void internal_SetProjectionType(ScriptCamera* instance, UINT32 value);
+
+		static float internal_GetOrthographicHeight(ScriptCamera* instance);
+		static void internal_SetOrthographicHeight(ScriptCamera* instance, float value);
+
+		static float internal_GetOrthographicWidth(ScriptCamera* instance);
+
+		static void internal_GetClearColor(ScriptCamera* instance, Color* value);
+		static void internal_SetClearColor(ScriptCamera* instance, Color* value);
+
+		static float internal_GetDepthClearValue(ScriptCamera* instance);
+		static void internal_SetDepthClearValue(ScriptCamera* instance, float value);
+
+		static UINT16 internal_GetStencilClearValue(ScriptCamera* instance);
+		static void internal_SetStencilClearValue(ScriptCamera* instance, UINT16 value);
+
+		static UINT32 internal_GetClearFlags(ScriptCamera* instance);
+		static void internal_SetClearFlags(ScriptCamera* instance, UINT32 value);
+
+		static int internal_GetPriority(ScriptCamera* instance);
+		static void internal_SetPriority(ScriptCamera* instance, int value);
+
+		static UINT64 internal_GetLayers(ScriptCamera* instance);
+		static void internal_SetLayers(ScriptCamera* instance, UINT64 value);
+
+		static void internal_GetProjMatrix(ScriptCamera* instance, Matrix4* value);
+		static void internal_GetProjMatrixInv(ScriptCamera* instance, Matrix4* value);
+
+		static void internal_GetViewMatrix(ScriptCamera* instance, Matrix4* value);
+		static void internal_GetViewMatrixInv(ScriptCamera* instance, Matrix4* value);
+
+		static int internal_GetWidthPixels(ScriptCamera* instance);
+		static int internal_GetHeightPixels(ScriptCamera* instance);
+
+		static void internal_WorldToScreen(ScriptCamera* instance, Vector3* value, Vector2I* output);
+		static void internal_WorldToNDC(ScriptCamera* instance, Vector3* value, Vector2* output);
+		static void internal_WorldToView(ScriptCamera* instance, Vector3* value, Vector3* output);
+
+		static void internal_ScreenToWorld(ScriptCamera* instance, Vector2I* value, float depth, Vector3* output);
+		static void internal_ScreenToView(ScriptCamera* instance, Vector2I* value, float depth, Vector3* output);
+		static void internal_ScreenToNDC(ScriptCamera* instance, Vector2I* value, Vector2* output);
+
+		static void internal_ViewToWorld(ScriptCamera* instance, Vector3* value, Vector3* output);
+		static void internal_ViewToScreen(ScriptCamera* instance, Vector3* value, Vector2I* output);
+		static void internal_ViewToNDC(ScriptCamera* instance, Vector3* value, Vector2* output);
+
+		static void internal_NDCToWorld(ScriptCamera* instance, Vector2* value, float depth, Vector3* output);
+		static void internal_NDCToView(ScriptCamera* instance, Vector2* value, float depth, Vector3* output);
+		static void internal_NDCToScreen(ScriptCamera* instance, Vector2* value, Vector2I* output);
+
+		static void internal_ScreenToWorldRay(ScriptCamera* instance, Vector2I* value, Ray* output);
+		static void internal_ProjectPoint(ScriptCamera* instance, Vector3* value, Vector3* output);
+		static void internal_UnprojectPoint(ScriptCamera* instance, Vector3* value, Vector3* output);
+
+		static void internal_SetRenderTarget(ScriptCamera* instance, ScriptRenderTarget* target);
+
+		static bool internal_GetMain(ScriptCamera* instance);
+		static void internal_SetMain(ScriptCamera* instance, bool main);
+
+		static void internal_UpdateView(ScriptCamera* instance, ScriptSceneObject* parent);
+		static void internal_OnDestroy(ScriptCamera* instance);
+	};
+
+	/** @} */
 }

+ 31 - 33
Source/SBansheeEngine/Include/BsScriptColor.h

@@ -1,34 +1,32 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsColor.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ScriptColor.
-	 */
-	class BS_SCR_BE_EXPORT ScriptColor : public ScriptObject <ScriptColor>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Color")
-
-		/**
-		 * @brief	Unboxes a boxed managed Color struct and returns
-		 *			the native version of the structure.
-		 */
-		static Color unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native Color struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const Color& value);
-
-	private:
-		ScriptColor(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsColor.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ScriptColor. */
+	class BS_SCR_BE_EXPORT ScriptColor : public ScriptObject <ScriptColor>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Color")
+
+		/** Unboxes a boxed managed Color struct and returns the native version of the structure. */
+		static Color unbox(MonoObject* obj);
+
+		/**	Boxes a native Color struct and returns a managed object containing it. */
+		static MonoObject* box(const Color& value);
+
+	private:
+		ScriptColor(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 67 - 61
Source/SBansheeEngine/Include/BsScriptComponent.h

@@ -1,62 +1,68 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptGameObject.h"
-#include "BsScriptObject.h"
-#include "BsFont.h"
-
-namespace BansheeEngine
-{
-	/**	Interop class between C++ & CLR for ManagedComponent. */
-	class BS_SCR_BE_EXPORT ScriptComponent : public ScriptObject<ScriptComponent, ScriptGameObjectBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Component")
-
-		/** @copydoc ScriptGameObjectBase::getNativeHandle */
-		virtual HGameObject getNativeHandle() const override { return mManagedComponent; }
-
-		/** @copydoc ScriptGameObjectBase::setNativeHandle */
-		virtual void setNativeHandle(const HGameObject& gameObject) override;
-
-	private:
-		friend class ScriptGameObjectManager;
-
-		ScriptComponent(MonoObject* instance);
-		
-		/** @copydoc ScriptObjectBase::beginRefresh */
-		virtual ScriptObjectBackup beginRefresh() override;
-
-		/** @copydoc ScriptObjectBase::endRefresh */
-		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
-
-		/** @copydoc ScriptObjectBase::_createManagedInstance */
-		virtual MonoObject* _createManagedInstance(bool construct) override;
-
-		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
-		void _onManagedInstanceDeleted() override;
-
-		/** Checks if the provided game object is destroyed and logs a warning if it is. */
-		static bool checkIfDestroyed(const GameObjectHandleBase& handle);
-
-		GameObjectHandle<ManagedComponent> mManagedComponent;
-		String mNamespace;
-		String mType;
-		bool mTypeMissing;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_addComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
-		static MonoObject* internal_getComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
-		static MonoArray* internal_getComponents(MonoObject* parentSceneObject);
-		static MonoArray* internal_getComponentsPerType(MonoObject* parentSceneObject, MonoReflectionType* type);
-		static void internal_removeComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
-		static MonoObject* internal_getSceneObject(ScriptComponent* nativeInstance);
-		static TransformChangedFlags internal_getNotifyFlags(ScriptComponent* nativeInstance);
-		static void internal_setNotifyFlags(ScriptComponent* nativeInstance, TransformChangedFlags flags);
-		static void internal_destroy(ScriptComponent* nativeInstance, bool immediate);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptGameObject.h"
+#include "BsScriptObject.h"
+#include "BsFont.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedComponent. */
+	class BS_SCR_BE_EXPORT ScriptComponent : public ScriptObject<ScriptComponent, ScriptGameObjectBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Component")
+
+		/** @copydoc ScriptGameObjectBase::getNativeHandle */
+		virtual HGameObject getNativeHandle() const override { return mManagedComponent; }
+
+		/** @copydoc ScriptGameObjectBase::setNativeHandle */
+		virtual void setNativeHandle(const HGameObject& gameObject) override;
+
+	private:
+		friend class ScriptGameObjectManager;
+
+		ScriptComponent(MonoObject* instance);
+		
+		/** @copydoc ScriptObjectBase::beginRefresh */
+		virtual ScriptObjectBackup beginRefresh() override;
+
+		/** @copydoc ScriptObjectBase::endRefresh */
+		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
+
+		/** @copydoc ScriptObjectBase::_createManagedInstance */
+		virtual MonoObject* _createManagedInstance(bool construct) override;
+
+		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		/** Checks if the provided game object is destroyed and logs a warning if it is. */
+		static bool checkIfDestroyed(const GameObjectHandleBase& handle);
+
+		GameObjectHandle<ManagedComponent> mManagedComponent;
+		String mNamespace;
+		String mType;
+		bool mTypeMissing;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_addComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
+		static MonoObject* internal_getComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
+		static MonoArray* internal_getComponents(MonoObject* parentSceneObject);
+		static MonoArray* internal_getComponentsPerType(MonoObject* parentSceneObject, MonoReflectionType* type);
+		static void internal_removeComponent(MonoObject* parentSceneObject, MonoReflectionType* type);
+		static MonoObject* internal_getSceneObject(ScriptComponent* nativeInstance);
+		static TransformChangedFlags internal_getNotifyFlags(ScriptComponent* nativeInstance);
+		static void internal_setNotifyFlags(ScriptComponent* nativeInstance, TransformChangedFlags flags);
+		static void internal_destroy(ScriptComponent* nativeInstance, bool immediate);
+	};
+
+	/** @} */
 }

+ 47 - 45
Source/SBansheeEngine/Include/BsScriptContextMenu.h

@@ -1,46 +1,48 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for GUIContextMenu.
-	 */
-	class BS_SCR_BE_EXPORT ScriptContextMenu : public ScriptObject < ScriptContextMenu >
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ContextMenu")
-
-		/**
-		 * @brief	Returns the internal native context menu object.
-		 */
-		GUIContextMenuPtr getInternal() const { return mContextMenu; }
-
-	private:
-		ScriptContextMenu(MonoObject* instance);
-
-		/**
-		 * @brief	Triggered when an item in the context menu is clicked.
-		 *
-		 * @param	idx	Sequential index of the item that was clicked.
-		 */
-		void onContextMenuItemTriggered(UINT32 idx);
-
-		GUIContextMenuPtr mContextMenu;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		typedef void(__stdcall *OnEntryTriggeredThunkDef) (MonoObject*, UINT32 callbackIdx, MonoException**);
-		static OnEntryTriggeredThunkDef onEntryTriggered;
-
-		static void internal_CreateInstance(MonoObject* instance);
-		static void internal_AddItem(ScriptContextMenu* instance, MonoString* path, UINT32 callbackIdx, ShortcutKey* shortcut);
-		static void internal_AddSeparator(ScriptContextMenu* instance, MonoString* path);
-		static void internal_SetLocalizedName(ScriptContextMenu* instance, MonoString* label, ScriptHString* name);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for GUIContextMenu. */
+	class BS_SCR_BE_EXPORT ScriptContextMenu : public ScriptObject < ScriptContextMenu >
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ContextMenu")
+
+		/**	Returns the internal native context menu object. */
+		GUIContextMenuPtr getInternal() const { return mContextMenu; }
+
+	private:
+		ScriptContextMenu(MonoObject* instance);
+
+		/**
+		 * Triggered when an item in the context menu is clicked.
+		 *
+		 * @param[in]	idx		Sequential index of the item that was clicked.
+		 */
+		void onContextMenuItemTriggered(UINT32 idx);
+
+		GUIContextMenuPtr mContextMenu;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		typedef void(__stdcall *OnEntryTriggeredThunkDef) (MonoObject*, UINT32 callbackIdx, MonoException**);
+		static OnEntryTriggeredThunkDef onEntryTriggered;
+
+		static void internal_CreateInstance(MonoObject* instance);
+		static void internal_AddItem(ScriptContextMenu* instance, MonoString* path, UINT32 callbackIdx, ShortcutKey* shortcut);
+		static void internal_AddSeparator(ScriptContextMenu* instance, MonoString* path);
+		static void internal_SetLocalizedName(ScriptContextMenu* instance, MonoString* label, ScriptHString* name);
+	};
+
+	/** @} */
 }

+ 42 - 38
Source/SBansheeEngine/Include/BsScriptCursor.h

@@ -1,39 +1,43 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsRect2I.h"
-#include "BsVector2I.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Cursor.
-	 */
-	class BS_SCR_BE_EXPORT ScriptCursor : public ScriptObject <ScriptCursor>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Cursor")
-
-	private:
-		ScriptCursor(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_getScreenPosition(Vector2I* value);
-		static void internal_setScreenPosition(Vector2I* value);
-		static void internal_hide();
-		static void internal_show();
-		static void internal_clipToRect(Rect2I* value);
-		static void internal_clipDisable();
-		static void internal_setCursorStr(MonoString* name);
-		static void internal_setCursor(CursorType cursor);
-		static void internal_setCursorIconStr(MonoString* name, MonoObject* iconData, Vector2I* hotspot);
-		static void internal_setCursorIcon(CursorType cursor, MonoObject* iconData, Vector2I* hotspot);
-		static void internal_clearCursorIconStr(MonoString* name);
-		static void internal_clearCursorIcon(CursorType cursor);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsRect2I.h"
+#include "BsVector2I.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Cursor. */
+	class BS_SCR_BE_EXPORT ScriptCursor : public ScriptObject <ScriptCursor>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Cursor")
+
+	private:
+		ScriptCursor(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_getScreenPosition(Vector2I* value);
+		static void internal_setScreenPosition(Vector2I* value);
+		static void internal_hide();
+		static void internal_show();
+		static void internal_clipToRect(Rect2I* value);
+		static void internal_clipDisable();
+		static void internal_setCursorStr(MonoString* name);
+		static void internal_setCursor(CursorType cursor);
+		static void internal_setCursorIconStr(MonoString* name, MonoObject* iconData, Vector2I* hotspot);
+		static void internal_setCursorIcon(CursorType cursor, MonoObject* iconData, Vector2I* hotspot);
+		static void internal_clearCursorIconStr(MonoString* name);
+		static void internal_clearCursorIcon(CursorType cursor);
+	};
+
+	/** @} */
 }

+ 49 - 51
Source/SBansheeEngine/Include/BsScriptDebug.h

@@ -1,52 +1,50 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Debug.
-	 */
-	class BS_SCR_BE_EXPORT ScriptDebug : public ScriptObject<ScriptDebug>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Debug")
-
-		/**
-		 * @brief	Registers internal callbacks. Must be called on scripting system load.
-		 */
-		static void startUp();
-
-		/**
-		 * @brief	Unregisters internal callbacks. Must be called on scripting system shutdown.
-		 */
-		static void shutDown();
-	private:
-		ScriptDebug(MonoObject* instance);
-
-		/**
-		 * @brief	Triggered when a new entry is added to the debug log.
-		 */
-		static void onLogEntryAdded(const LogEntry& entry);
-
-		static HEvent mOnLogEntryAddedConn;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_log(MonoString* message);
-		static void internal_logWarning(MonoString* message);
-		static void internal_logError(MonoString* message);
-		static void internal_logMessage(MonoString* message, UINT32 type);
-		static void internal_clear();
-		static void internal_clearType(UINT32 type);
-		static MonoArray* internal_getMessages();
-
-		typedef void(__stdcall *OnAddedThunkDef) (UINT32, MonoString*, MonoException**);
-
-		static OnAddedThunkDef onAddedThunk;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Debug. */
+	class BS_SCR_BE_EXPORT ScriptDebug : public ScriptObject<ScriptDebug>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Debug")
+
+		/**	Registers internal callbacks. Must be called on scripting system load. */
+		static void startUp();
+
+		/**	Unregisters internal callbacks. Must be called on scripting system shutdown. */
+		static void shutDown();
+	private:
+		ScriptDebug(MonoObject* instance);
+
+		/**	Triggered when a new entry is added to the debug log. */
+		static void onLogEntryAdded(const LogEntry& entry);
+
+		static HEvent mOnLogEntryAddedConn;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_log(MonoString* message);
+		static void internal_logWarning(MonoString* message);
+		static void internal_logError(MonoString* message);
+		static void internal_logMessage(MonoString* message, UINT32 type);
+		static void internal_clear();
+		static void internal_clearType(UINT32 type);
+		static MonoArray* internal_getMessages();
+
+		typedef void(__stdcall *OnAddedThunkDef) (UINT32, MonoString*, MonoException**);
+
+		static OnAddedThunkDef onAddedThunk;
+	};
+
+	/** @} */
 }

+ 47 - 47
Source/SBansheeEngine/Include/BsScriptFont.h

@@ -1,48 +1,48 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-#include "BsFont.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Font.
-	 */
-	class BS_SCR_BE_EXPORT ScriptFont : public TScriptResource<ScriptFont, Font>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Font")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptFont(MonoObject* instance, const HFont& font);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_GetBitmap(ScriptFont* instance, int size);
-		static int internal_GetClosestSize(ScriptFont* instance, int size);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for CharRange.
-	 */
-	class BS_SCR_BE_EXPORT ScriptCharRange : public ScriptObject <ScriptCharRange>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "CharRange")
-
-	private:
-		ScriptCharRange(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+#include "BsFont.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Font. */
+	class BS_SCR_BE_EXPORT ScriptFont : public TScriptResource<ScriptFont, Font>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Font")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptFont(MonoObject* instance, const HFont& font);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_GetBitmap(ScriptFont* instance, int size);
+		static int internal_GetClosestSize(ScriptFont* instance, int size);
+	};
+
+	/**	Interop class between C++ & CLR for CharRange. */
+	class BS_SCR_BE_EXPORT ScriptCharRange : public ScriptObject <ScriptCharRange>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "CharRange")
+
+	private:
+		ScriptCharRange(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 74 - 76
Source/SBansheeEngine/Include/BsScriptFontBitmap.h

@@ -1,77 +1,75 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-#include "BsFont.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Describes a single character in a font of a specific size.
-	 */
-	struct ScriptCharDesc // Note: Must match C# struct CharDesc
-	{
-		UINT32 charId; /**< Character ID, corresponding to a Unicode key. */
-		UINT32 page; /**< Index of the texture the character is located on. */
-		float uvX, uvY; /**< Texture coordinates of the character in the page texture. */
-		float uvWidth, uvHeight; /**< Width/height of the character in texture coordinates. */
-		UINT32 width, height; /**< Width/height of the character in pixels. */
-		INT32 xOffset, yOffset; /**< Offset for the visible portion of the character in pixels. */
-		INT32 xAdvance, yAdvance; /**< Determines how much to advance the pen after writing this character, in pixels. */
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for FontBitmap.
-	 */
-	class BS_SCR_BE_EXPORT ScriptFontBitmap : public ScriptObject<ScriptFontBitmap>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "FontBitmap")
-
-		/**
-		 * @brief	Creates a new managed instance of a font bitmap.
-		 *
-		 * @param	bitmap	Native font bitmap to initialize the managed instance with.
-		 */
-		static MonoObject* create(SPtr<const FontBitmap> bitmap);
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptFontBitmap(MonoObject* instance, SPtr<const FontBitmap> bitmap);
-
-		/**
-		 * @brief	Converts the native character description into a script character description.
-		 */
-		static ScriptCharDesc convertCharDesc(const CHAR_DESC& desc);
-
-		SPtr<const FontBitmap> mBitmap;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static UINT32 internal_GetSize(ScriptFontBitmap* instance);
-		static INT32 internal_GetBaselineOffset(ScriptFontBitmap* instance);
-		static UINT32 internal_GetLineHeight(ScriptFontBitmap* instance);
-		static UINT32 internal_GetSpaceWidth(ScriptFontBitmap* instance);
-		static void internal_GetMissingChar(ScriptFontBitmap* instance, ScriptCharDesc* output);
-		static MonoArray* internal_GetPages(ScriptFontBitmap* instance);
-		static void internal_GetChar(ScriptFontBitmap* instance, UINT32 id, ScriptCharDesc* output);
-		static MonoArray* internal_GetKerning(ScriptFontBitmap* instance, UINT32 id);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for KerningPair.
-	 */
-	class BS_SCR_BE_EXPORT ScriptKerningPair : public ScriptObject <ScriptKerningPair>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "KerningPair")
-
-	private:
-		ScriptKerningPair(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+#include "BsFont.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Describes a single character in a font of a specific size. */
+	struct ScriptCharDesc // Note: Must match C# struct CharDesc
+	{
+		UINT32 charId; /**< Character ID, corresponding to a Unicode key. */
+		UINT32 page; /**< Index of the texture the character is located on. */
+		float uvX, uvY; /**< Texture coordinates of the character in the page texture. */
+		float uvWidth, uvHeight; /**< Width/height of the character in texture coordinates. */
+		UINT32 width, height; /**< Width/height of the character in pixels. */
+		INT32 xOffset, yOffset; /**< Offset for the visible portion of the character in pixels. */
+		INT32 xAdvance, yAdvance; /**< Determines how much to advance the pen after writing this character, in pixels. */
+	};
+
+	/**	Interop class between C++ & CLR for FontBitmap. */
+	class BS_SCR_BE_EXPORT ScriptFontBitmap : public ScriptObject<ScriptFontBitmap>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "FontBitmap")
+
+		/**
+		 * Creates a new managed instance of a font bitmap.
+		 *
+		 * @param[in]	bitmap	Native font bitmap to initialize the managed instance with.
+		 */
+		static MonoObject* create(SPtr<const FontBitmap> bitmap);
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptFontBitmap(MonoObject* instance, SPtr<const FontBitmap> bitmap);
+
+		/**	Converts the native character description into a script character description. */
+		static ScriptCharDesc convertCharDesc(const CHAR_DESC& desc);
+
+		SPtr<const FontBitmap> mBitmap;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static UINT32 internal_GetSize(ScriptFontBitmap* instance);
+		static INT32 internal_GetBaselineOffset(ScriptFontBitmap* instance);
+		static UINT32 internal_GetLineHeight(ScriptFontBitmap* instance);
+		static UINT32 internal_GetSpaceWidth(ScriptFontBitmap* instance);
+		static void internal_GetMissingChar(ScriptFontBitmap* instance, ScriptCharDesc* output);
+		static MonoArray* internal_GetPages(ScriptFontBitmap* instance);
+		static void internal_GetChar(ScriptFontBitmap* instance, UINT32 id, ScriptCharDesc* output);
+		static MonoArray* internal_GetKerning(ScriptFontBitmap* instance, UINT32 id);
+	};
+
+	/**	Interop class between C++ & CLR for KerningPair. */
+	class BS_SCR_BE_EXPORT ScriptKerningPair : public ScriptObject <ScriptKerningPair>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "KerningPair")
+
+	private:
+		ScriptKerningPair(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 40 - 40
Source/SBansheeEngine/Include/BsScriptGUIContentImages.h

@@ -1,41 +1,41 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsGUIContent.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for GUIContentImages.
-	 */
-	class BS_SCR_BE_EXPORT ScriptGUIContentImages : public ScriptObject<ScriptGUIContentImages>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIContentImages")
-
-		/**
-		 * @brief	Converts a managed GUIContentImages instance to a native one.
-		 */
-		static GUIContentImages getNative(MonoObject* instance);
-
-		/**
-		 * @brief	Converts a native GUIContentImages instance to a managed one.
-		 */
-		static MonoObject* getManaged(const GUIContentImages& images);
-
-	private:
-		ScriptGUIContentImages(MonoObject* instance);
-
-		static MonoField* mNormalField;
-		static MonoField* mHoverField;
-		static MonoField* mActiveField;
-		static MonoField* mFocusedField;
-		static MonoField* mNormalOnField;
-		static MonoField* mHoverOnField;
-		static MonoField* mActiveOnField;
-		static MonoField* mFocusedOnField;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsGUIContent.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for GUIContentImages. */
+	class BS_SCR_BE_EXPORT ScriptGUIContentImages : public ScriptObject<ScriptGUIContentImages>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GUIContentImages")
+
+		/**	Converts a managed GUIContentImages instance to a native one. */
+		static GUIContentImages getNative(MonoObject* instance);
+
+		/**	Converts a native GUIContentImages instance to a managed one. */
+		static MonoObject* getManaged(const GUIContentImages& images);
+
+	private:
+		ScriptGUIContentImages(MonoObject* instance);
+
+		static MonoField* mNormalField;
+		static MonoField* mHoverField;
+		static MonoField* mActiveField;
+		static MonoField* mFocusedField;
+		static MonoField* mNormalOnField;
+		static MonoField* mHoverOnField;
+		static MonoField* mActiveOnField;
+		static MonoField* mFocusedOnField;
+	};
+
+	/** @} */
 }

+ 51 - 57
Source/SBansheeEngine/Include/BsScriptGameObject.h

@@ -1,58 +1,52 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Base class for all GameObject interop classes.
-	 */
-	class BS_SCR_BE_EXPORT ScriptGameObjectBase : public PersistentScriptObjectBase
-	{
-	public:
-		ScriptGameObjectBase(MonoObject* instance);
-		virtual ~ScriptGameObjectBase() { }
-
-		/**
-		 * @brief	Returns the internal native GameObject handle.
-		 */
-		virtual HGameObject getNativeHandle() const = 0;
-
-		/**
-		 * @brief	Sets the internal native GameObject handle.
-		 */
-		virtual void setNativeHandle(const HGameObject& gameObject) = 0;
-
-		/**
-		 * @copydoc	ScriptObjectBase::beginRefresh
-		 */
-		virtual ScriptObjectBackup beginRefresh() override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::endRefresh
-		 */
-		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
-	protected:
-		bool mRefreshInProgress;
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for GameObject.
-	 */
-	class BS_SCR_BE_EXPORT ScriptGameObject : public ScriptObject<ScriptGameObject, ScriptGameObjectBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GameObject")
-
-	private:
-		ScriptGameObject(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static UINT64 internal_getInstanceId(ScriptGameObject* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Base class for all GameObject interop classes. */
+	class BS_SCR_BE_EXPORT ScriptGameObjectBase : public PersistentScriptObjectBase
+	{
+	public:
+		ScriptGameObjectBase(MonoObject* instance);
+		virtual ~ScriptGameObjectBase() { }
+
+		/**	Returns the internal native GameObject handle. */
+		virtual HGameObject getNativeHandle() const = 0;
+
+		/**	Sets the internal native GameObject handle. */
+		virtual void setNativeHandle(const HGameObject& gameObject) = 0;
+
+		/** @copydoc ScriptObjectBase::beginRefresh */
+		virtual ScriptObjectBackup beginRefresh() override;
+
+		/** @copydoc ScriptObjectBase::endRefresh */
+		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
+	protected:
+		bool mRefreshInProgress;
+	};
+
+	/**	Interop class between C++ & CLR for GameObject. */
+	class BS_SCR_BE_EXPORT ScriptGameObject : public ScriptObject<ScriptGameObject, ScriptGameObjectBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "GameObject")
+
+	private:
+		ScriptGameObject(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static UINT64 internal_getInstanceId(ScriptGameObject* nativeInstance);
+	};
+
+	/** @} */
 }

+ 6 - 0
Source/SBansheeEngine/Include/BsScriptGameObjectManager.h

@@ -8,6 +8,10 @@
 
 namespace BansheeEngine
 {
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
 	/**
 	 * Manages all active GameObject interop objects. GameObjects can be created from native code and used in managed code
 	 * therefore we need to keep a dictionary or all the native objects we have mapped to managed objects.
@@ -105,4 +109,6 @@ namespace BansheeEngine
 		HEvent mOnAssemblyReloadDoneConn;
 		HEvent onGameObjectDestroyedConn;
 	};
+
+	/** @} */
 }

+ 37 - 35
Source/SBansheeEngine/Include/BsScriptHString.h

@@ -1,36 +1,38 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsHString.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for HString.
-	 */
-	class BS_SCR_BE_EXPORT ScriptHString : public ScriptObject<ScriptHString>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LocString")
-
-		/**
-		 * @brief	Returns the wrapped native HString.
-		 */
-		const HString& getInternalValue() const { return mString; }
-
-	private:
-		ScriptHString(MonoObject* instance, const HString& string);
-
-		HString mString;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoString* identifier, UINT32 tableId);
-		static void internal_setParameter(ScriptHString* nativeInstance, UINT32 idx, MonoString* value);
-		static void internal_getValue(ScriptHString* nativeInstance, MonoString** value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsHString.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for HString. */
+	class BS_SCR_BE_EXPORT ScriptHString : public ScriptObject<ScriptHString>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LocString")
+
+		/**	Returns the wrapped native HString. */
+		const HString& getInternalValue() const { return mString; }
+
+	private:
+		ScriptHString(MonoObject* instance, const HString& string);
+
+		HString mString;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoString* identifier, UINT32 tableId);
+		static void internal_setParameter(ScriptHString* nativeInstance, UINT32 idx, MonoString* value);
+		static void internal_getValue(ScriptHString* nativeInstance, MonoString** value);
+	};
+
+	/** @} */
 }

+ 86 - 100
Source/SBansheeEngine/Include/BsScriptInput.h

@@ -1,101 +1,87 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsInputFwd.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Input.
-	 */
-	class BS_SCR_BE_EXPORT ScriptInput : public ScriptObject<ScriptInput>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Input")
-
-		/**
-		 * @brief	Registers internal callbacks. Must be called on scripting system load.
-		 */
-		static void startUp();
-
-		/**
-		 * @brief	Unregisters internal callbacks. Must be called on scripting system shutdown.
-		 */
-		static void shutDown();
-	private:
-		ScriptInput(MonoObject* instance);
-
-		/**
-		 * @brief	Triggered when the specified button is pressed.
-		 */
-		static void onButtonDown(const ButtonEvent& ev);
-
-		/**
-		 * @brief	Triggered when the specified button is released.
-		 */
-		static void onButtonUp(const ButtonEvent& ev);
-
-		/**
-		 * @brief	Triggered when the specified character is entered.
-		 */
-		static void onCharInput(const TextInputEvent& ev);
-
-		/**
-		 * @brief	Triggered when the pointer is moved.
-		 */
-		static void onPointerMoved(const PointerEvent& ev);
-
-		/**
-		 * @brief	Triggered when a pointer button is pressed.
-		 */
-		static void onPointerPressed(const PointerEvent& ev);
-
-		/**
-		 * @brief	Triggered when a pointer button is released.
-		 */
-		static void onPointerReleased(const PointerEvent& ev);
-
-		/**
-		 * @brief	Triggered when a pointer button is double-clicked.
-		 */
-		static void onPointerDoubleClick(const PointerEvent& ev);
-
-		static HEvent OnButtonPressedConn;
-		static HEvent OnButtonReleasedConn;
-		static HEvent OnCharInputConn;
-		static HEvent OnPointerPressedConn;
-		static HEvent OnPointerReleasedConn;
-		static HEvent OnPointerMovedConn;
-		static HEvent OnPointerDoubleClickConn;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static bool internal_isButtonHeld(ButtonCode code, UINT32 deviceIdx);
-		static bool internal_isButtonDown(ButtonCode code, UINT32 deviceIdx);
-		static bool internal_isButtonUp(ButtonCode code, UINT32 deviceIdx);
-		static bool internal_isPointerButtonHeld(PointerEventButton code);
-		static bool internal_isPointerButtonDown(PointerEventButton code);
-		static bool internal_isPointerButtonUp(PointerEventButton code);
-		static bool internal_isPointerDoubleClicked();
-		static float internal_getAxisValue(UINT32 axisType, UINT32 deviceIdx);
-		static void internal_getPointerPosition(Vector2I* position);
-		static void internal_getPointerDelta(Vector2I* position);
-
-		typedef void(__stdcall *OnButtonEventThunkDef) (ButtonCode, UINT32, MonoException**);
-		typedef void(__stdcall *OnCharInputEventThunkDef) (UINT32, MonoException**);
-		typedef void(__stdcall *OnPointerEventThunkDef) (MonoObject*, MonoObject*, PointerEventButton,
-			bool, bool, bool, float, MonoException**);
-
-		static OnButtonEventThunkDef OnButtonPressedThunk;
-		static OnButtonEventThunkDef OnButtonReleasedThunk;
-		static OnCharInputEventThunkDef OnCharInputThunk;
-		static OnPointerEventThunkDef OnPointerPressedThunk;
-		static OnPointerEventThunkDef OnPointerReleasedThunk;
-		static OnPointerEventThunkDef OnPointerMovedThunk;
-		static OnPointerEventThunkDef OnPointerDoubleClickThunk;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsInputFwd.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Input. */
+	class BS_SCR_BE_EXPORT ScriptInput : public ScriptObject<ScriptInput>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Input")
+
+		/**	Registers internal callbacks. Must be called on scripting system load. */
+		static void startUp();
+
+		/**	Unregisters internal callbacks. Must be called on scripting system shutdown. */
+		static void shutDown();
+	private:
+		ScriptInput(MonoObject* instance);
+
+		/**	Triggered when the specified button is pressed. */
+		static void onButtonDown(const ButtonEvent& ev);
+
+		/**	Triggered when the specified button is released. */
+		static void onButtonUp(const ButtonEvent& ev);
+
+		/**	Triggered when the specified character is entered. */
+		static void onCharInput(const TextInputEvent& ev);
+
+		/**	Triggered when the pointer is moved. */
+		static void onPointerMoved(const PointerEvent& ev);
+
+		/**	Triggered when a pointer button is pressed. */
+		static void onPointerPressed(const PointerEvent& ev);
+
+		/**	Triggered when a pointer button is released. */
+		static void onPointerReleased(const PointerEvent& ev);
+
+		/**	Triggered when a pointer button is double-clicked. */
+		static void onPointerDoubleClick(const PointerEvent& ev);
+
+		static HEvent OnButtonPressedConn;
+		static HEvent OnButtonReleasedConn;
+		static HEvent OnCharInputConn;
+		static HEvent OnPointerPressedConn;
+		static HEvent OnPointerReleasedConn;
+		static HEvent OnPointerMovedConn;
+		static HEvent OnPointerDoubleClickConn;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static bool internal_isButtonHeld(ButtonCode code, UINT32 deviceIdx);
+		static bool internal_isButtonDown(ButtonCode code, UINT32 deviceIdx);
+		static bool internal_isButtonUp(ButtonCode code, UINT32 deviceIdx);
+		static bool internal_isPointerButtonHeld(PointerEventButton code);
+		static bool internal_isPointerButtonDown(PointerEventButton code);
+		static bool internal_isPointerButtonUp(PointerEventButton code);
+		static bool internal_isPointerDoubleClicked();
+		static float internal_getAxisValue(UINT32 axisType, UINT32 deviceIdx);
+		static void internal_getPointerPosition(Vector2I* position);
+		static void internal_getPointerDelta(Vector2I* position);
+
+		typedef void(__stdcall *OnButtonEventThunkDef) (ButtonCode, UINT32, MonoException**);
+		typedef void(__stdcall *OnCharInputEventThunkDef) (UINT32, MonoException**);
+		typedef void(__stdcall *OnPointerEventThunkDef) (MonoObject*, MonoObject*, PointerEventButton,
+			bool, bool, bool, float, MonoException**);
+
+		static OnButtonEventThunkDef OnButtonPressedThunk;
+		static OnButtonEventThunkDef OnButtonReleasedThunk;
+		static OnCharInputEventThunkDef OnCharInputThunk;
+		static OnPointerEventThunkDef OnPointerPressedThunk;
+		static OnPointerEventThunkDef OnPointerReleasedThunk;
+		static OnPointerEventThunkDef OnPointerMovedThunk;
+		static OnPointerEventThunkDef OnPointerDoubleClickThunk;
+	};
+
+	/** @} */
 }

+ 77 - 79
Source/SBansheeEngine/Include/BsScriptInputConfiguration.h

@@ -1,80 +1,78 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsInputConfiguration.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for InputConfiguration.
-	 */
-	class BS_SCR_BE_EXPORT ScriptInputConfiguration : public ScriptObject<ScriptInputConfiguration>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "InputConfiguration")
-
-		/**
-		 * @brief	Returns the internal wrapped InputConfiguration object.
-		 */
-		InputConfigurationPtr getInternalValue() const { return mInputConfig; }
-
-		/**
-		 * @brief	Attempts to find a existing interop object for the provided input configuration.
-		 *			Returns null if one cannot be found.
-		 */
-		static ScriptInputConfiguration* getScriptInputConfig(const InputConfigurationPtr& inputConfig);
-
-		/**
-		 * @brief	Creates a new interop object for the provided input configuration. Caller should first
-		 *			call ::getScriptInputConfig to ensure one doesn't already exist.
-		 */
-		static ScriptInputConfiguration* createScriptInputConfig(const InputConfigurationPtr& inputConfig);
-
-	private:
-		ScriptInputConfiguration(MonoObject* instance, const InputConfigurationPtr& inputConfig);
-
-		/**
-		 * @copydoc	ScriptObjectBase::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		InputConfigurationPtr mInputConfig;
-		static Map<UINT64, ScriptInputConfiguration*> ScriptInputConfigurations;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* object);
-
-		static void internal_RegisterButton(ScriptInputConfiguration* thisPtr, MonoString* name, ButtonCode buttonCode,
-			ButtonModifier modifiers, bool repeatable);
-		static void internal_UnregisterButton(ScriptInputConfiguration* thisPtr, MonoString* name);
-
-		static void internal_RegisterAxis(ScriptInputConfiguration* thisPtr, MonoString* name, InputAxis type, float deadZone,
-			float sensitivity, bool invert);
-		static void internal_UnregisterAxis(ScriptInputConfiguration* thisPtr, MonoString* name);
-
-		static void internal_SetRepeatInterval(ScriptInputConfiguration* thisPtr, UINT64 milliseconds);
-		static UINT64 internal_GetRepeatInterval(ScriptInputConfiguration* thisPtr);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for VirtualAxis.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVirtualAxis : public ScriptObject <ScriptVirtualAxis>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualAxis")
-
-	private:
-		ScriptVirtualAxis(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static UINT32 internal_InitVirtualAxis(MonoString* name);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsInputConfiguration.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/** Interop class between C++ & CLR for InputConfiguration. */
+	class BS_SCR_BE_EXPORT ScriptInputConfiguration : public ScriptObject<ScriptInputConfiguration>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "InputConfiguration")
+
+		/**	Returns the internal wrapped InputConfiguration object. */
+		InputConfigurationPtr getInternalValue() const { return mInputConfig; }
+
+		/**
+		 * Attempts to find a existing interop object for the provided input configuration. Returns null if one cannot be
+		 * found.
+		 */
+		static ScriptInputConfiguration* getScriptInputConfig(const InputConfigurationPtr& inputConfig);
+
+		/**
+		 * Creates a new interop object for the provided input configuration. Caller should first call 
+		 * getScriptInputConfig() to ensure one doesn't already exist.
+		 */
+		static ScriptInputConfiguration* createScriptInputConfig(const InputConfigurationPtr& inputConfig);
+
+	private:
+		ScriptInputConfiguration(MonoObject* instance, const InputConfigurationPtr& inputConfig);
+
+		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		InputConfigurationPtr mInputConfig;
+		static Map<UINT64, ScriptInputConfiguration*> ScriptInputConfigurations;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* object);
+
+		static void internal_RegisterButton(ScriptInputConfiguration* thisPtr, MonoString* name, ButtonCode buttonCode,
+			ButtonModifier modifiers, bool repeatable);
+		static void internal_UnregisterButton(ScriptInputConfiguration* thisPtr, MonoString* name);
+
+		static void internal_RegisterAxis(ScriptInputConfiguration* thisPtr, MonoString* name, InputAxis type, float deadZone,
+			float sensitivity, bool invert);
+		static void internal_UnregisterAxis(ScriptInputConfiguration* thisPtr, MonoString* name);
+
+		static void internal_SetRepeatInterval(ScriptInputConfiguration* thisPtr, UINT64 milliseconds);
+		static UINT64 internal_GetRepeatInterval(ScriptInputConfiguration* thisPtr);
+	};
+
+	/**	Interop class between C++ & CLR for VirtualAxis. */
+	class BS_SCR_BE_EXPORT ScriptVirtualAxis : public ScriptObject <ScriptVirtualAxis>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualAxis")
+
+	private:
+		ScriptVirtualAxis(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static UINT32 internal_InitVirtualAxis(MonoString* name);
+	};
+
+	/** @} */
 }

+ 74 - 76
Source/SBansheeEngine/Include/BsScriptLight.h

@@ -1,77 +1,75 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsDegree.h"
-#include "BsColor.h"
-#include "BsLight.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Light.
-	 */
-	class BS_SCR_BE_EXPORT ScriptLight : public ScriptObject <ScriptLight>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeLight")
-
-		/**
-		 * @brief	Gets the wrapped native LightInternal object.
-		 */
-		SPtr<Light> getInternal() const { return mLight; }
-
-	private:
-		ScriptLight(MonoObject* managedInstance, const HSceneObject& parentSO);
-		~ScriptLight();
-
-		/**
-		 * @brief	Destroys the internal light handler object.
-		 */
-		void destroy();
-
-		/**
-		 * @copydoc	ScriptObject::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		SPtr<Light> mLight;
-		UINT32 mLastUpdateHash;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
-
-		static LightType internal_getType(ScriptLight* thisPtr);
-		static void internal_setType(ScriptLight* thisPtr, LightType type);
-
-		static bool internal_getCastsShadow(ScriptLight* thisPtr);
-		static void internal_setCastsShadow(ScriptLight* thisPtr, bool castsShadow);
-
-		static bool internal_getPhysicallyBasedAttenuation(ScriptLight* thisPtr);
-		static void internal_setPhysicallyBasedAttenuation(ScriptLight* thisPtr, bool value);
-
-		static void internal_getColor(ScriptLight* thisPtr, Color* color);
-		static void internal_setColor(ScriptLight* thisPtr, Color color);
-
-		static float internal_getRange(ScriptLight* thisPtr);
-		static void internal_setRange(ScriptLight* thisPtr, float range);
-
-		static float internal_getIntensity(ScriptLight* thisPtr);
-		static void internal_setIntensity(ScriptLight* thisPtr, float intensity);
-
-		static float internal_getSpotAngle(ScriptLight* thisPtr);
-		static void internal_setSpotAngle(ScriptLight* thisPtr, float spotAngle);
-
-		static float internal_getSpotFalloffAngle(ScriptLight* thisPtr);
-		static void internal_setSpotFalloffAngle(ScriptLight* thisPtr, float spotFalloffAngle);
-
-		static void internal_getBounds(ScriptLight* thisPtr, Sphere* bounds);
-
-		static void internal_updateTransform(ScriptLight* thisPtr, ScriptSceneObject* parent);
-		static void internal_onDestroy(ScriptLight* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsDegree.h"
+#include "BsColor.h"
+#include "BsLight.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Light. */
+	class BS_SCR_BE_EXPORT ScriptLight : public ScriptObject <ScriptLight>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeLight")
+
+		/**	Gets the wrapped native LightInternal object. */
+		SPtr<Light> getInternal() const { return mLight; }
+
+	private:
+		ScriptLight(MonoObject* managedInstance, const HSceneObject& parentSO);
+		~ScriptLight();
+
+		/**	Destroys the internal light handler object. */
+		void destroy();
+
+		/** @copydoc ScriptObject::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		SPtr<Light> mLight;
+		UINT32 mLastUpdateHash;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
+
+		static LightType internal_getType(ScriptLight* thisPtr);
+		static void internal_setType(ScriptLight* thisPtr, LightType type);
+
+		static bool internal_getCastsShadow(ScriptLight* thisPtr);
+		static void internal_setCastsShadow(ScriptLight* thisPtr, bool castsShadow);
+
+		static bool internal_getPhysicallyBasedAttenuation(ScriptLight* thisPtr);
+		static void internal_setPhysicallyBasedAttenuation(ScriptLight* thisPtr, bool value);
+
+		static void internal_getColor(ScriptLight* thisPtr, Color* color);
+		static void internal_setColor(ScriptLight* thisPtr, Color color);
+
+		static float internal_getRange(ScriptLight* thisPtr);
+		static void internal_setRange(ScriptLight* thisPtr, float range);
+
+		static float internal_getIntensity(ScriptLight* thisPtr);
+		static void internal_setIntensity(ScriptLight* thisPtr, float intensity);
+
+		static float internal_getSpotAngle(ScriptLight* thisPtr);
+		static void internal_setSpotAngle(ScriptLight* thisPtr, float spotAngle);
+
+		static float internal_getSpotFalloffAngle(ScriptLight* thisPtr);
+		static void internal_setSpotFalloffAngle(ScriptLight* thisPtr, float spotFalloffAngle);
+
+		static void internal_getBounds(ScriptLight* thisPtr, Sphere* bounds);
+
+		static void internal_updateTransform(ScriptLight* thisPtr, ScriptSceneObject* parent);
+		static void internal_onDestroy(ScriptLight* instance);
+	};
+
+	/** @} */
 }

+ 24 - 20
Source/SBansheeEngine/Include/BsScriptLogEntry.h

@@ -1,21 +1,25 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for LogEntry.
-	 */
-	class BS_SCR_BE_EXPORT ScriptLogEntry : public ScriptObject <ScriptLogEntry>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LogEntry")
-
-	private:
-		ScriptLogEntry(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for LogEntry. */
+	class BS_SCR_BE_EXPORT ScriptLogEntry : public ScriptObject <ScriptLogEntry>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LogEntry")
+
+	private:
+		ScriptLogEntry(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 59 - 71
Source/SBansheeEngine/Include/BsScriptManagedResource.h

@@ -1,72 +1,60 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedResource.
-	 */
-	class BS_SCR_BE_EXPORT ScriptManagedResource : public ScriptObject<ScriptManagedResource, ScriptResourceBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ManagedResource")
-
-		ScriptManagedResource(MonoObject* instance, const HManagedResource& resource);
-
-		/**
-		 * @copydoc	ScriptResourceBase::getGenericHandle
-		 */
-		HResource getGenericHandle() const override { return mResource; }
-
-		/**
-		 * @copydoc	ScriptResourceBase::setResource
-		 */
-		void setResource(const HResource& resource) override;
-
-		/**
-		 * @brief	Returns a handle to the internal wrapped resource.
-		 */
-		const HManagedResource& getHandle() const { return mResource; }
-	private:
-		friend class ScriptResourceManager;
-
-		/**
-		 * @copydoc	ScriptObjectBase::beginRefresh
-		 */
-		virtual ScriptObjectBackup beginRefresh() override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::endRefresh
-		 */
-		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::_createManagedInstance
-		 */
-		virtual MonoObject* _createManagedInstance(bool construct) override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		HManagedResource mResource;
-		String mNamespace;
-		String mType;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedResource. */
+	class BS_SCR_BE_EXPORT ScriptManagedResource : public ScriptObject<ScriptManagedResource, ScriptResourceBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ManagedResource")
+
+		ScriptManagedResource(MonoObject* instance, const HManagedResource& resource);
+
+		/** @copydoc ScriptResourceBase::getGenericHandle */
+		HResource getGenericHandle() const override { return mResource; }
+
+		/** @copydoc ScriptResourceBase::setResource */
+		void setResource(const HResource& resource) override;
+
+		/**	Returns a handle to the internal wrapped resource. */
+		const HManagedResource& getHandle() const { return mResource; }
+	private:
+		friend class ScriptResourceManager;
+
+		/** @copydoc ScriptObjectBase::beginRefresh */
+		virtual ScriptObjectBackup beginRefresh() override;
+
+		/** @copydoc ScriptObjectBase::endRefresh */
+		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
+
+		/** @copydoc ScriptObjectBase::_createManagedInstance */
+		virtual MonoObject* _createManagedInstance(bool construct) override;
+
+		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		HManagedResource mResource;
+		String mNamespace;
+		String mType;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 70 - 70
Source/SBansheeEngine/Include/BsScriptMaterial.h

@@ -1,71 +1,71 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsMaterial.h"
-#include "BsVector2.h"
-#include "BsVector3.h"
-#include "BsVector4.h"
-#include "BsMatrix3.h"
-#include "BsMatrix4.h"
-#include "BsColor.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Material.
-	 */
-	class BS_SCR_BE_EXPORT ScriptMaterial : public TScriptResource <ScriptMaterial, Material>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Material")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptMaterial(MonoObject* instance, const HMaterial& material);
-
-		/**
-		 * @copydoc	ScriptObjectBase::_createManagedInstance
-		 */
-		MonoObject* _createManagedInstance(bool construct) override;
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, ScriptShader* shader);
-		static MonoObject* internal_Clone(ScriptMaterial* nativeInstance);
-
-		static MonoObject* internal_GetShader(ScriptMaterial* nativeInstance);
-		static void internal_SetShader(ScriptMaterial* nativeInstance, ScriptShader* shader);
-
-		static void internal_SetFloat(ScriptMaterial* nativeInstance, MonoString* name, float value);
-		static void internal_SetVector2(ScriptMaterial* nativeInstance, MonoString* name, Vector2* value);
-		static void internal_SetVector3(ScriptMaterial* nativeInstance, MonoString* name, Vector3* value);
-		static void internal_SetVector4(ScriptMaterial* nativeInstance, MonoString* name, Vector4* value);
-		static void internal_SetMatrix3(ScriptMaterial* nativeInstance, MonoString* name, Matrix3* value);
-		static void internal_SetMatrix4(ScriptMaterial* nativeInstance, MonoString* name, Matrix4* value);
-		static void internal_SetColor(ScriptMaterial* nativeInstance, MonoString* name, Color* value);
-		static void internal_SetTexture2D(ScriptMaterial* nativeInstance, MonoString* name, ScriptTexture2D* value);
-		static void internal_SetTexture3D(ScriptMaterial* nativeInstance, MonoString* name, ScriptTexture3D* value);
-		static void internal_SetTextureCube(ScriptMaterial* nativeInstance, MonoString* name, ScriptTextureCube* value);
-
-		static float internal_GetFloat(ScriptMaterial* nativeInstance, MonoString* name);
-		static void internal_GetVector2(ScriptMaterial* nativeInstance, MonoString* name, Vector2* value);
-		static void internal_GetVector3(ScriptMaterial* nativeInstance, MonoString* name, Vector3* value);
-		static void internal_GetVector4(ScriptMaterial* nativeInstance, MonoString* name, Vector4* value);
-		static void internal_GetMatrix3(ScriptMaterial* nativeInstance, MonoString* name, Matrix3* value);
-		static void internal_GetMatrix4(ScriptMaterial* nativeInstance, MonoString* name, Matrix4* value);
-		static void internal_GetColor(ScriptMaterial* nativeInstance, MonoString* name, Color* value);
-		static MonoObject* internal_GetTexture2D(ScriptMaterial* nativeInstance, MonoString* name);
-		static MonoObject* internal_GetTexture3D(ScriptMaterial* nativeInstance, MonoString* name);
-		static MonoObject* internal_GetTextureCube(ScriptMaterial* nativeInstance, MonoString* name);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsMaterial.h"
+#include "BsVector2.h"
+#include "BsVector3.h"
+#include "BsVector4.h"
+#include "BsMatrix3.h"
+#include "BsMatrix4.h"
+#include "BsColor.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Material. */
+	class BS_SCR_BE_EXPORT ScriptMaterial : public TScriptResource <ScriptMaterial, Material>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Material")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptMaterial(MonoObject* instance, const HMaterial& material);
+
+		/** @copydoc ScriptObjectBase::_createManagedInstance */
+		MonoObject* _createManagedInstance(bool construct) override;
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, ScriptShader* shader);
+		static MonoObject* internal_Clone(ScriptMaterial* nativeInstance);
+
+		static MonoObject* internal_GetShader(ScriptMaterial* nativeInstance);
+		static void internal_SetShader(ScriptMaterial* nativeInstance, ScriptShader* shader);
+
+		static void internal_SetFloat(ScriptMaterial* nativeInstance, MonoString* name, float value);
+		static void internal_SetVector2(ScriptMaterial* nativeInstance, MonoString* name, Vector2* value);
+		static void internal_SetVector3(ScriptMaterial* nativeInstance, MonoString* name, Vector3* value);
+		static void internal_SetVector4(ScriptMaterial* nativeInstance, MonoString* name, Vector4* value);
+		static void internal_SetMatrix3(ScriptMaterial* nativeInstance, MonoString* name, Matrix3* value);
+		static void internal_SetMatrix4(ScriptMaterial* nativeInstance, MonoString* name, Matrix4* value);
+		static void internal_SetColor(ScriptMaterial* nativeInstance, MonoString* name, Color* value);
+		static void internal_SetTexture2D(ScriptMaterial* nativeInstance, MonoString* name, ScriptTexture2D* value);
+		static void internal_SetTexture3D(ScriptMaterial* nativeInstance, MonoString* name, ScriptTexture3D* value);
+		static void internal_SetTextureCube(ScriptMaterial* nativeInstance, MonoString* name, ScriptTextureCube* value);
+
+		static float internal_GetFloat(ScriptMaterial* nativeInstance, MonoString* name);
+		static void internal_GetVector2(ScriptMaterial* nativeInstance, MonoString* name, Vector2* value);
+		static void internal_GetVector3(ScriptMaterial* nativeInstance, MonoString* name, Vector3* value);
+		static void internal_GetVector4(ScriptMaterial* nativeInstance, MonoString* name, Vector4* value);
+		static void internal_GetMatrix3(ScriptMaterial* nativeInstance, MonoString* name, Matrix3* value);
+		static void internal_GetMatrix4(ScriptMaterial* nativeInstance, MonoString* name, Matrix4* value);
+		static void internal_GetColor(ScriptMaterial* nativeInstance, MonoString* name, Color* value);
+		static MonoObject* internal_GetTexture2D(ScriptMaterial* nativeInstance, MonoString* name);
+		static MonoObject* internal_GetTexture3D(ScriptMaterial* nativeInstance, MonoString* name);
+		static MonoObject* internal_GetTextureCube(ScriptMaterial* nativeInstance, MonoString* name);
+	};
+
+	/** @} */
 }

+ 92 - 110
Source/SBansheeEngine/Include/BsScriptMesh.h

@@ -1,111 +1,93 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptMeshData.h"
-#include "BsMesh.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Possible mesh toplogy values. 
-	 *
-	 * @note	Must match C# enum MeshTopology.
-	 */
-	enum class MeshTopology
-	{
-		PointList = 1,
-		LineList = 2,
-		LineStrip = 3,
-		TriangleList = 4,
-		TriangleStrip = 5,
-		TriangleFan = 6
-	};
-
-	/**
-	 * @brief	Contains data about a portion of a mesh inside MeshData.
-	 */
-	struct BS_SCR_BE_EXPORT SubMeshData
-	{
-		UINT32 indexOffset;
-		UINT32 indexCount;
-		MeshTopology topology;
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for SubMesh.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSubMesh : public ScriptObject < ScriptSubMesh >
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SubMesh")
-
-		/**
-		 * @brief	Unboxes a boxed managed SubMesh struct and returns
-		 *			the native version of the structure.
-		 */
-		static SubMeshData unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native SubMesh struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const SubMeshData& value);
-
-	private:
-		ScriptSubMesh(MonoObject* instance);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for Mesh.
-	 */
-	class BS_SCR_BE_EXPORT ScriptMesh : public TScriptResource<ScriptMesh, Mesh>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Mesh")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptMesh(MonoObject* instance, const HMesh& mesh);
-
-		/**
-		 * @brief	Converts the C# MeshTopology enum to DrawOperationType enum
-		 *			used by engine internals.
-		 */
-		static DrawOperationType meshTopologyToDrawOp(MeshTopology topology);
-
-		/**
-		 * @brief	Converts the DrawOperationType enum used by engine 
-		 *			internals to C# MeshTopology enum.
-		 */
-		static MeshTopology drawOpToMeshTopology(DrawOperationType drawOp);
-		
-		/**
-		 * @brief	Converts a managed array of SubMeshData%es into an array
-		 *			of SubMesh%es used by engine internals.
-		 */
-		static Vector<SubMesh> monoToNativeSubMeshes(MonoArray* subMeshes);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-
-		static void internal_CreateInstance(MonoObject* instance, int numVertices,
-			int numIndices, MonoArray* subMeshes, MeshUsage usage, VertexLayout vertex, ScriptIndexType index);
-		static void internal_CreateInstanceMeshData(MonoObject* instance, ScriptMeshData* data, MonoArray* subMeshes,
-			MeshUsage usage);
-		static MonoArray* internal_GetSubMeshes(ScriptMesh* thisPtr);
-		static UINT32 internal_GetSubMeshCount(ScriptMesh* thisPtr);
-		static void internal_GetBounds(ScriptMesh* thisPtr, AABox* box, Sphere* sphere);
-		static MonoObject* internal_GetMeshData(ScriptMesh* thisPtr);
-		static void internal_SetMeshData(ScriptMesh* thisPtr, ScriptMeshData* value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptMeshData.h"
+#include "BsMesh.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**
+	 * Possible mesh toplogy values. 
+	 *
+	 * @note	Must match C# enum MeshTopology.
+	 */
+	enum class MeshTopology
+	{
+		PointList = 1,
+		LineList = 2,
+		LineStrip = 3,
+		TriangleList = 4,
+		TriangleStrip = 5,
+		TriangleFan = 6
+	};
+
+	/**	Contains data about a portion of a mesh inside MeshData. */
+	struct BS_SCR_BE_EXPORT SubMeshData
+	{
+		UINT32 indexOffset;
+		UINT32 indexCount;
+		MeshTopology topology;
+	};
+
+	/**	Interop class between C++ & CLR for SubMesh. */
+	class BS_SCR_BE_EXPORT ScriptSubMesh : public ScriptObject < ScriptSubMesh >
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SubMesh")
+
+		/** Unboxes a boxed managed SubMesh struct and returns the native version of the structure. */
+		static SubMeshData unbox(MonoObject* obj);
+
+		/** Boxes a native SubMesh struct and returns a managed object containing it. */
+		static MonoObject* box(const SubMeshData& value);
+
+	private:
+		ScriptSubMesh(MonoObject* instance);
+	};
+
+	/**	Interop class between C++ & CLR for Mesh. */
+	class BS_SCR_BE_EXPORT ScriptMesh : public TScriptResource<ScriptMesh, Mesh>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Mesh")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptMesh(MonoObject* instance, const HMesh& mesh);
+
+		/** Converts the C# MeshTopology enum to DrawOperationType enum used by engine internals. */
+		static DrawOperationType meshTopologyToDrawOp(MeshTopology topology);
+
+		/** Converts the DrawOperationType enum used by engine internals to C# MeshTopology enum. */
+		static MeshTopology drawOpToMeshTopology(DrawOperationType drawOp);
+		
+		/** Converts a managed array of SubMeshData%es into an array of SubMesh%es used by engine internals. */
+		static Vector<SubMesh> monoToNativeSubMeshes(MonoArray* subMeshes);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, int numVertices,
+			int numIndices, MonoArray* subMeshes, MeshUsage usage, VertexLayout vertex, ScriptIndexType index);
+		static void internal_CreateInstanceMeshData(MonoObject* instance, ScriptMeshData* data, MonoArray* subMeshes,
+			MeshUsage usage);
+		static MonoArray* internal_GetSubMeshes(ScriptMesh* thisPtr);
+		static UINT32 internal_GetSubMeshCount(ScriptMesh* thisPtr);
+		static void internal_GetBounds(ScriptMesh* thisPtr, AABox* box, Sphere* sphere);
+		static MonoObject* internal_GetMeshData(ScriptMesh* thisPtr);
+		static void internal_SetMeshData(ScriptMesh* thisPtr, ScriptMeshData* value);
+	};
+
+	/** @} */
 }

+ 74 - 86
Source/SBansheeEngine/Include/BsScriptMeshData.h

@@ -1,87 +1,75 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsRendererMeshData.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Valid index types for mesh indices.
-	 */
-	// Note: Do not modify, it must match the layout of C# enum IndexType
-	enum class ScriptIndexType
-	{
-		Index16,
-		Index32
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for RendererMeshData.
-	 */
-	class BS_SCR_BE_EXPORT ScriptMeshData : public ScriptObject <ScriptMeshData>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "MeshData")
-
-		/**
-		 * @brief	Returns the internal wrapped mesh data.
-		 */
-		RendererMeshDataPtr getInternalValue() const { return mMeshData; }
-
-		/**
-		 * @brief	Creates a new managed MeshData object from the provided
-		 *			native render mesh data.
-		 */
-		static MonoObject* create(const RendererMeshDataPtr& meshData);
-
-		/**
-		 * @brief	Creates a new managed MeshData object from the provided
-		 *			native mesh data.
-		 */
-		static MonoObject* create(const MeshDataPtr& meshData);
-	private:
-		ScriptMeshData(MonoObject* managedInstance);
-		~ScriptMeshData();
-
-		/**
-		 * @brief	Initializes the object. Must be called after construction
-		 *			and before use.
-		 */
-		void initialize(const RendererMeshDataPtr& meshData);
-
-		/**
-		 * @brief	Checks is the underlying mesh data of the provided object locked.
-		 *			When locked mesh data cannot be accessed.
-		 */
-		static bool checkIsLocked(ScriptMeshData* thisPtr);
-
-		RendererMeshDataPtr mMeshData;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, int numVertices,
-			int numIndices, VertexLayout vertex, ScriptIndexType index);
-		static MonoArray* internal_GetPositions(ScriptMeshData* thisPtr);
-		static void internal_SetPositions(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetNormals(ScriptMeshData* thisPtr);
-		static void internal_SetNormals(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetTangents(ScriptMeshData* thisPtr);
-		static void internal_SetTangents(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetColors(ScriptMeshData* thisPtr);
-		static void internal_SetColors(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetUV0(ScriptMeshData* thisPtr);
-		static void internal_SetUV0(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetUV1(ScriptMeshData* thisPtr);
-		static void internal_SetUV1(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetBoneWeights(ScriptMeshData* thisPtr);
-		static void internal_SetBoneWeights(ScriptMeshData* thisPtr, MonoArray* value);
-		static MonoArray* internal_GetIndices(ScriptMeshData* thisPtr);
-		static void internal_SetIndices(ScriptMeshData* thisPtr, MonoArray* value);
-		static int internal_GetVertexCount(ScriptMeshData* thisPtr);
-		static int internal_GetIndexCount(ScriptMeshData* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsRendererMeshData.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Valid index types for mesh indices. */
+	// Note: Do not modify, it must match the layout of C# enum IndexType
+	enum class ScriptIndexType
+	{
+		Index16,
+		Index32
+	};
+
+	/**	Interop class between C++ & CLR for RendererMeshData. */
+	class BS_SCR_BE_EXPORT ScriptMeshData : public ScriptObject <ScriptMeshData>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "MeshData")
+
+		/**	Returns the internal wrapped mesh data. */
+		RendererMeshDataPtr getInternalValue() const { return mMeshData; }
+
+		/**	Creates a new managed MeshData object from the provided native render mesh data. */
+		static MonoObject* create(const RendererMeshDataPtr& meshData);
+
+		/**	Creates a new managed MeshData object from the provided native mesh data. */
+		static MonoObject* create(const MeshDataPtr& meshData);
+	private:
+		ScriptMeshData(MonoObject* managedInstance);
+		~ScriptMeshData();
+
+		/**	Initializes the object. Must be called after construction and before use. */
+		void initialize(const RendererMeshDataPtr& meshData);
+
+		/**	Checks is the underlying mesh data of the provided object locked. When locked mesh data cannot be accessed. */
+		static bool checkIsLocked(ScriptMeshData* thisPtr);
+
+		RendererMeshDataPtr mMeshData;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, int numVertices,
+			int numIndices, VertexLayout vertex, ScriptIndexType index);
+		static MonoArray* internal_GetPositions(ScriptMeshData* thisPtr);
+		static void internal_SetPositions(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetNormals(ScriptMeshData* thisPtr);
+		static void internal_SetNormals(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetTangents(ScriptMeshData* thisPtr);
+		static void internal_SetTangents(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetColors(ScriptMeshData* thisPtr);
+		static void internal_SetColors(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetUV0(ScriptMeshData* thisPtr);
+		static void internal_SetUV0(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetUV1(ScriptMeshData* thisPtr);
+		static void internal_SetUV1(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetBoneWeights(ScriptMeshData* thisPtr);
+		static void internal_SetBoneWeights(ScriptMeshData* thisPtr, MonoArray* value);
+		static MonoArray* internal_GetIndices(ScriptMeshData* thisPtr);
+		static void internal_SetIndices(ScriptMeshData* thisPtr, MonoArray* value);
+		static int internal_GetVertexCount(ScriptMeshData* thisPtr);
+		static int internal_GetIndexCount(ScriptMeshData* thisPtr);
+	};
+
+	/** @} */
 }

+ 183 - 215
Source/SBansheeEngine/Include/BsScriptObject.h

@@ -1,216 +1,184 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptMeta.h"
-#include "BsException.h"
-#include "BsMonoManager.h"
-#include "BsMonoField.h"
-#include "BsMonoClass.h"
-#include <mono/jit/jit.h>
-
-namespace BansheeEngine
-{
-	struct ScriptObjectBackup;
-
-	/**
-	 * @brief	Helper class to initialize all script interop objects
-	 *			as soon as the library is loaded.
-	 */
-	template <class Type, class Base>
-	struct InitScriptObjectOnStart
-	{
-	public:
-		InitScriptObjectOnStart()
-		{
-			ScriptObject<Type, Base>::_initMetaData();
-		}
-	};
-
-	/**
-	 * @brief	Base class for all script interop objects. Interop
-	 *			objects form a connection between C++ and CLR classes
-	 *			and methods.
-	 */
-	class BS_SCR_BE_EXPORT ScriptObjectBase
-	{
-	public:
-		ScriptObjectBase(MonoObject* instance);
-		virtual ~ScriptObjectBase();
-
-		/**
-		 * @brief	Gets the managed object this interop object represents.
-		 */
-		MonoObject* getManagedInstance() const { return mManagedInstance; }
-
-		/**
-		 * @brief	Should the interop object persist through assembly reload.
-		 *			If false then the interop object will be destroyed on reload.
-		 */
-		virtual bool isPersistent() const { return false; }
-
-		/**
-		 * @brief	Clears any managed instance references from the interop object.
-		 *			Normally called right after the assemblies are unloaded.
-		 */
-		virtual void _clearManagedInstance() { }
-
-		/**
-		 * @brief	Allows persistent objects to restore their managed instances after
-		 *			assembly reload.
-		 */
-		virtual void _restoreManagedInstance() { }
-
-		/**
-		 * @brief	Called when the managed instance gets finalized by the CLR.
-		 */
-		virtual void _onManagedInstanceDeleted();
-
-		/**
-		 * @brief	Called before assembly reload starts to give the object a chance to
-		 *			back up its data.
-		 */
-		virtual ScriptObjectBackup beginRefresh();
-
-		/**
-		 * @brief	Called after assembly reload starts to give the object a chance
-		 *			to restore the data backed up by the previous ::beginRefresh call.
-		 */
-		virtual void endRefresh(const ScriptObjectBackup& data);
-
-	protected:
-		MonoObject* mManagedInstance;
-	};
-
-	/**
-	 * @brief	Base class for all persistent interop objects. Persistent objects
-	 *			persist through assembly reload.
-	 */
-	class BS_SCR_BE_EXPORT PersistentScriptObjectBase : public ScriptObjectBase
-	{
-	public:
-		PersistentScriptObjectBase(MonoObject* instance);
-		virtual ~PersistentScriptObjectBase();
-
-		/**
-		 * @copydoc	ScriptObjectBase::isPersistent 
-		 */
-		virtual bool isPersistent() const override { return true; }
-	};
-
-	/**
-	 * @brief	Template version of ScriptObjectBase populates the object
-	 *			meta-data on library load.
-	 */
-	template <class Type, class Base = ScriptObjectBase>
-	class ScriptObject : public Base
-	{
-	public:
-		ScriptObject(MonoObject* instance)
-			:Base(instance)
-		{	
-			Type* param = (Type*)(Base*)this; // Needed due to multiple inheritance. Safe since Type must point to an class derived from this one.
-
-			if(metaData.thisPtrField != nullptr)
-				metaData.thisPtrField->setValue(instance, &param);
-		}
-
-		virtual ~ScriptObject() 
-		{ }
-
-		/**
-		 * @copydoc	ScriptObjectBase::_clearManagedInstance
-		 */
-		void _clearManagedInstance()
-		{
-			if (metaData.thisPtrField != nullptr && mManagedInstance != nullptr)
-				metaData.thisPtrField->setValue(mManagedInstance, nullptr);
-
-			mManagedInstance = nullptr;
-		}
-
-		/**
-		 * @copydoc	ScriptObjectBase::_restoreManagedInstance
-		 */
-		void _restoreManagedInstance()
-		{
-			mManagedInstance = _createManagedInstance(true);
-
-			Type* param = (Type*)(Base*)this; // Needed due to multiple inheritance. Safe since Type must point to an class derived from this one.
-
-			if (metaData.thisPtrField != nullptr && mManagedInstance != nullptr)
-				metaData.thisPtrField->setValue(mManagedInstance, &param);
-		}
-
-		/**
-		 * @brief	Creates a new managed instance of the type wrapped
-		 *			by this interop object.
-		 */
-		virtual MonoObject* _createManagedInstance(bool construct)
-		{
-			return metaData.scriptClass->createInstance(construct);
-		}
-
-		/**
-		 * @brief	Converts a managed instance into a specific interop object.
-		 *			Caller must ensure the managed instance is of the proper type.
-		 */
-		static Type* toNative(MonoObject* managedInstance)
-		{
-			Type* nativeInstance = nullptr;
-
-			if (metaData.thisPtrField != nullptr && managedInstance != nullptr)
-				metaData.thisPtrField->getValue(managedInstance, &nativeInstance);
-
-			return nativeInstance;
-		}
-
-		/**
-		 * @brief	Returns the meta-data containing class and method information
-		 *			for the managed type.
-		 */
-		static const ScriptMeta* getMetaData() { return &metaData; }
-
-		/**
-		 * @brief	Initializes the meta-data containing class and method information
-		 *			for the managed type. Called on library load and on assembly reload.
-		 */
-		static void _initMetaData()
-		{
-			metaData = ScriptMeta(Type::getAssemblyName(), Type::getNamespace(), Type::getTypeName(), &Type::initRuntimeData);
-
-			MonoManager::registerScriptType(&metaData);
-		}
-
-	protected:
-		static ScriptMeta metaData;
-
-	private:
-		static volatile InitScriptObjectOnStart<Type, Base> initOnStart;
-	};
-
-	template <typename Type, typename Base>
-	volatile InitScriptObjectOnStart<Type, Base> ScriptObject<Type, Base>::initOnStart;
-
-	template <typename Type, typename Base>
-	ScriptMeta ScriptObject<Type, Base>::metaData;
-
-	/**
-	 * @brief	Contains backed up interop object data.
-	 */
-	struct ScriptObjectBackup
-	{
-		Any data;
-	};
-
-/**
- * @brief	Helper macro to use with script interop objects that
- *			form a link between C++ and CLR.
- */
-#define SCRIPT_OBJ(assembly, namespace, name)		\
-	static String getAssemblyName() { return assembly; }	\
-	static String getNamespace() { return namespace; }		\
-	static String getTypeName() { return name; }			\
-	static void initRuntimeData();
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptMeta.h"
+#include "BsException.h"
+#include "BsMonoManager.h"
+#include "BsMonoField.h"
+#include "BsMonoClass.h"
+#include <mono/jit/jit.h>
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	struct ScriptObjectBackup;
+
+	/** Helper class to initialize all script interop objects as soon as the library is loaded. */
+	template <class Type, class Base>
+	struct InitScriptObjectOnStart
+	{
+	public:
+		InitScriptObjectOnStart()
+		{
+			ScriptObject<Type, Base>::_initMetaData();
+		}
+	};
+
+	/**
+	 * Base class for all script interop objects. Interop objects form a connection between C++ and CLR classes and methods.
+	 */
+	class BS_SCR_BE_EXPORT ScriptObjectBase
+	{
+	public:
+		ScriptObjectBase(MonoObject* instance);
+		virtual ~ScriptObjectBase();
+
+		/**	Gets the managed object this interop object represents. */
+		MonoObject* getManagedInstance() const { return mManagedInstance; }
+
+		/**
+		 * Should the interop object persist through assembly reload. If false then the interop object will be destroyed on
+		 * reload.
+		 */
+		virtual bool isPersistent() const { return false; }
+
+		/**	
+		 * Clears any managed instance references from the interop object. Normally called right after the assemblies are
+		 * unloaded.
+		 */
+		virtual void _clearManagedInstance() { }
+
+		/**	Allows persistent objects to restore their managed instances after assembly reload. */
+		virtual void _restoreManagedInstance() { }
+
+		/**	Called when the managed instance gets finalized by the CLR. */
+		virtual void _onManagedInstanceDeleted();
+
+		/**	Called before assembly reload starts to give the object a chance to back up its data. */
+		virtual ScriptObjectBackup beginRefresh();
+
+		/**
+		 * Called after assembly reload starts to give the object a chance to restore the data backed up by the previous
+		 * beginRefresh() call.
+		 */
+		virtual void endRefresh(const ScriptObjectBackup& data);
+
+	protected:
+		MonoObject* mManagedInstance;
+	};
+
+	/**	Base class for all persistent interop objects. Persistent objects persist through assembly reload. */
+	class BS_SCR_BE_EXPORT PersistentScriptObjectBase : public ScriptObjectBase
+	{
+	public:
+		PersistentScriptObjectBase(MonoObject* instance);
+		virtual ~PersistentScriptObjectBase();
+
+		/** @copydoc ScriptObjectBase::isPersistent  */
+		virtual bool isPersistent() const override { return true; }
+	};
+
+	/**	Template version of ScriptObjectBase populates the object meta-data on library load. */
+	template <class Type, class Base = ScriptObjectBase>
+	class ScriptObject : public Base
+	{
+	public:
+		ScriptObject(MonoObject* instance)
+			:Base(instance)
+		{	
+			Type* param = (Type*)(Base*)this; // Needed due to multiple inheritance. Safe since Type must point to an class derived from this one.
+
+			if(metaData.thisPtrField != nullptr)
+				metaData.thisPtrField->setValue(instance, &param);
+		}
+
+		virtual ~ScriptObject() 
+		{ }
+
+		/** @copydoc ScriptObjectBase::_clearManagedInstance */
+		void _clearManagedInstance()
+		{
+			if (metaData.thisPtrField != nullptr && mManagedInstance != nullptr)
+				metaData.thisPtrField->setValue(mManagedInstance, nullptr);
+
+			mManagedInstance = nullptr;
+		}
+
+		/** @copydoc ScriptObjectBase::_restoreManagedInstance */
+		void _restoreManagedInstance()
+		{
+			mManagedInstance = _createManagedInstance(true);
+
+			Type* param = (Type*)(Base*)this; // Needed due to multiple inheritance. Safe since Type must point to an class derived from this one.
+
+			if (metaData.thisPtrField != nullptr && mManagedInstance != nullptr)
+				metaData.thisPtrField->setValue(mManagedInstance, &param);
+		}
+
+		/**	Creates a new managed instance of the type wrapped by this interop object. */
+		virtual MonoObject* _createManagedInstance(bool construct)
+		{
+			return metaData.scriptClass->createInstance(construct);
+		}
+
+		/**
+		 * Converts a managed instance into a specific interop object. Caller must ensure the managed instance is of the
+		 * proper type.
+		 */
+		static Type* toNative(MonoObject* managedInstance)
+		{
+			Type* nativeInstance = nullptr;
+
+			if (metaData.thisPtrField != nullptr && managedInstance != nullptr)
+				metaData.thisPtrField->getValue(managedInstance, &nativeInstance);
+
+			return nativeInstance;
+		}
+
+		/** Returns the meta-data containing class and method information for the managed type. */
+		static const ScriptMeta* getMetaData() { return &metaData; }
+
+		/**
+		 * Initializes the meta-data containing class and method information for the managed type. Called on library load
+		 * and on assembly reload.
+		 */
+		static void _initMetaData()
+		{
+			metaData = ScriptMeta(Type::getAssemblyName(), Type::getNamespace(), Type::getTypeName(), &Type::initRuntimeData);
+
+			MonoManager::registerScriptType(&metaData);
+		}
+
+	protected:
+		static ScriptMeta metaData;
+
+	private:
+		static volatile InitScriptObjectOnStart<Type, Base> initOnStart;
+	};
+
+	template <typename Type, typename Base>
+	volatile InitScriptObjectOnStart<Type, Base> ScriptObject<Type, Base>::initOnStart;
+
+	template <typename Type, typename Base>
+	ScriptMeta ScriptObject<Type, Base>::metaData;
+
+	/**	Contains backed up interop object data. */
+	struct ScriptObjectBackup
+	{
+		Any data;
+	};
+
+/** Helper macro to use with script interop objects that form a link between C++ and CLR. */
+#define SCRIPT_OBJ(assembly, namespace, name)		\
+	static String getAssemblyName() { return assembly; }	\
+	static String getNamespace() { return namespace; }		\
+	static String getTypeName() { return name; }			\
+	static void initRuntimeData();
+
+	/** @} */
 }

+ 30 - 26
Source/SBansheeEngine/Include/BsScriptObjectImpl.h

@@ -1,27 +1,31 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsRect2I.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ScriptObject.
-	 */
-	class BS_SCR_BE_EXPORT ScriptObjectImpl : public ScriptObject<ScriptObjectImpl>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ScriptObject")
-
-	private:
-		ScriptObjectImpl(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_managedInstanceDeleted(ScriptObjectBase* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsRect2I.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ScriptObject. */
+	class BS_SCR_BE_EXPORT ScriptObjectImpl : public ScriptObject<ScriptObjectImpl>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ScriptObject")
+
+	private:
+		ScriptObjectImpl(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_managedInstanceDeleted(ScriptObjectBase* instance);
+	};
+
+	/** @} */
 }

+ 75 - 83
Source/SBansheeEngine/Include/BsScriptObjectManager.h

@@ -1,84 +1,76 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsModule.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Keeps track of all script interop objects and handles assembly refresh.
-	 */
-	class BS_SCR_BE_EXPORT ScriptObjectManager : public Module <ScriptObjectManager>
-	{
-	public:
-		ScriptObjectManager();
-		~ScriptObjectManager();
-
-		/**
-		 * @brief	Registers a newly created script interop object.
-		 */
-		void registerScriptObject(ScriptObjectBase* instance);
-
-		/**
-		 * @brief	Unregisters a script interop object that is no longer valid.
-		 */
-		void unregisterScriptObject(ScriptObjectBase* instance);
-
-		/**
-		 * @brief	Refreshes the list of active assemblies. Unloads all current assemblies and loads 
-		 *			the newly provided set. This involves backup up managed object data, destroying all 
-		 *			managed objects and restoring the objects after reload.
-		 *
-		 * @param	assemblies	A list of assembly names and paths to load. First value represents
-		 *						the assembly name, and second a path its the assembly .dll.
-		 *						Assemblies will be loaded in order specified.
-		 */
-		void refreshAssemblies(const Vector<std::pair<String, Path>>& assemblies);
-
-		/**
-		 * @brief	Called once per frame. Triggers queued finalizer callbacks.
-		 */
-		void update();
-
-		/**
-		 * @brief	Call this when object finalizer is triggered. At the end of the frame
-		 *			all objects queued with this method will have their _onManagedInstanceDeleted methods
-		 *			triggered.
-		 *
-		 * @note	Thread safe.
-		 */
-		void notifyObjectFinalized(ScriptObjectBase* instance);
-
-		/**
-		 * @brief	Triggers _onManagedInstanceDeleted deleted callbacks on all objects that were finalized this frame.
-		 *			This allows the native portions of those objects to properly clean up any resources.
-		 */
-		void processFinalizedObjects();
-
-		/**
-		 * @brief	Triggered right after a domain was reloaded. This signals the outside world that they should
-		 *			update any kept Mono references as the old ones will no longer be valid.
-		 */
-		Event<void()> onRefreshDomainLoaded;
-
-		/**
-		 * @brief	Triggered just before the assembly refresh starts. At this point all managed
-		 *			objects are still valid, but are about to be destroyed.
-		 */
-		Event<void()> onRefreshStarted;
-
-		/**
-		 * @brief	Triggered after the assembly refresh ends. New assemblies should be loaded at
-		 *			this point.
-		 */
-		Event<void()> onRefreshComplete;
-	private:
-		Set<ScriptObjectBase*> mScriptObjects;
-
-		Vector<ScriptObjectBase*> mFinalizedObjects[2];
-		UINT32 mFinalizedQueueIdx;
-		BS_MUTEX(mMutex);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsModule.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/**	Keeps track of all script interop objects and handles assembly refresh. */
+	class BS_SCR_BE_EXPORT ScriptObjectManager : public Module <ScriptObjectManager>
+	{
+	public:
+		ScriptObjectManager();
+		~ScriptObjectManager();
+
+		/**	Registers a newly created script interop object. */
+		void registerScriptObject(ScriptObjectBase* instance);
+
+		/**	Unregisters a script interop object that is no longer valid. */
+		void unregisterScriptObject(ScriptObjectBase* instance);
+
+		/**
+		 * Refreshes the list of active assemblies. Unloads all current assemblies and loads the newly provided set. This
+		 * involves backup up managed object data, destroying all managed objects and restoring the objects after reload.
+		 *
+		 * @param[in]	assemblies	A list of assembly names and paths to load. First value represents the assembly name,
+		 *							and second a path its the assembly .dll. Assemblies will be loaded in order specified.
+		 */
+		void refreshAssemblies(const Vector<std::pair<String, Path>>& assemblies);
+
+		/**	Called once per frame. Triggers queued finalizer callbacks. */
+		void update();
+
+		/**
+		 * Call this when object finalizer is triggered. At the end of the frame all objects queued with this method will
+		 * have their _onManagedInstanceDeleted methods triggered.
+		 *
+		 * @note	Thread safe.
+		 */
+		void notifyObjectFinalized(ScriptObjectBase* instance);
+
+		/**
+		 * Triggers _onManagedInstanceDeleted deleted callbacks on all objects that were finalized this frame. This allows
+		 * the native portions of those objects to properly clean up any resources.
+		 */
+		void processFinalizedObjects();
+
+		/**
+		 * Triggered right after a domain was reloaded. This signals the outside world that they should update any kept Mono
+		 * references as the old ones will no longer be valid.
+		 */
+		Event<void()> onRefreshDomainLoaded;
+
+		/**
+		 * Triggered just before the assembly refresh starts. At this point all managed objects are still valid, but are
+		 * about to be destroyed.
+		 */
+		Event<void()> onRefreshStarted;
+
+		/**	Triggered after the assembly refresh ends. New assemblies should be loaded at this point. */
+		Event<void()> onRefreshComplete;
+	private:
+		Set<ScriptObjectBase*> mScriptObjects;
+
+		Vector<ScriptObjectBase*> mFinalizedObjects[2];
+		UINT32 mFinalizedQueueIdx;
+		BS_MUTEX(mMutex);
+	};
+
+	/** @} */
 }

+ 42 - 36
Source/SBansheeEngine/Include/BsScriptPhysicsMaterial.h

@@ -1,37 +1,43 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsPhysicsMaterial.h"
-
-namespace BansheeEngine
-{
-	/**	Interop class between C++ & CLR for PhysicsMaterial. */
-	class BS_SCR_BE_EXPORT ScriptPhysicsMaterial : public TScriptResource<ScriptPhysicsMaterial, PhysicsMaterial>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PhysicsMaterial")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptPhysicsMaterial(MonoObject* instance, const HPhysicsMaterial& material);
-
-		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, float staticFriction,
-			float dynamicFriction, float restitution);
-		static float internal_GetStaticFriction(ScriptPhysicsMaterial* thisPtr);
-		static void internal_SetStaticFriction(ScriptPhysicsMaterial* thisPtr, float value);
-		static float internal_GetDynamicFriction(ScriptPhysicsMaterial* thisPtr);
-		static void internal_SetDynamicFriction(ScriptPhysicsMaterial* thisPtr, float value);
-		static float internal_GetRestitution(ScriptPhysicsMaterial* thisPtr);
-		static void internal_SetRestitution(ScriptPhysicsMaterial* thisPtr, float value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsPhysicsMaterial.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for PhysicsMaterial. */
+	class BS_SCR_BE_EXPORT ScriptPhysicsMaterial : public TScriptResource<ScriptPhysicsMaterial, PhysicsMaterial>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PhysicsMaterial")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptPhysicsMaterial(MonoObject* instance, const HPhysicsMaterial& material);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, float staticFriction,
+			float dynamicFriction, float restitution);
+		static float internal_GetStaticFriction(ScriptPhysicsMaterial* thisPtr);
+		static void internal_SetStaticFriction(ScriptPhysicsMaterial* thisPtr, float value);
+		static float internal_GetDynamicFriction(ScriptPhysicsMaterial* thisPtr);
+		static void internal_SetDynamicFriction(ScriptPhysicsMaterial* thisPtr, float value);
+		static float internal_GetRestitution(ScriptPhysicsMaterial* thisPtr);
+		static void internal_SetRestitution(ScriptPhysicsMaterial* thisPtr, float value);
+	};
+
+	/** @} */
 }

+ 36 - 30
Source/SBansheeEngine/Include/BsScriptPhysicsMesh.h

@@ -1,31 +1,37 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsPhysicsMesh.h"
-
-namespace BansheeEngine
-{
-	/**	Interop class between C++ & CLR for PhysicsMesh. */
-	class BS_SCR_BE_EXPORT ScriptPhysicsMesh : public TScriptResource<ScriptPhysicsMesh, PhysicsMesh>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PhysicsMesh")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptPhysicsMesh(MonoObject* instance, const HPhysicsMesh& mesh);
-
-		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_GetMeshData(ScriptPhysicsMesh* thisPtr);
-		static int internal_GetMeshType(ScriptPhysicsMesh* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsPhysicsMesh.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for PhysicsMesh. */
+	class BS_SCR_BE_EXPORT ScriptPhysicsMesh : public TScriptResource<ScriptPhysicsMesh, PhysicsMesh>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PhysicsMesh")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptPhysicsMesh(MonoObject* instance, const HPhysicsMesh& mesh);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_GetMeshData(ScriptPhysicsMesh* thisPtr);
+		static int internal_GetMeshType(ScriptPhysicsMesh* thisPtr);
+	};
+
+	/** @} */
 }

+ 58 - 65
Source/SBansheeEngine/Include/BsScriptPixelData.h

@@ -1,66 +1,59 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsPixelData.h"
-#include "BsColor.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for PixelData.
-	 */
-	class BS_SCR_BE_EXPORT ScriptPixelData : public ScriptObject <ScriptPixelData>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PixelData")
-
-		/**
-		 * @brief	Returns the internal wrapped pixel data.
-		 */
-		PixelDataPtr getInternalValue() const { return mPixelData; }
-
-		/**
-		 * @brief	Creates a new managed pixel data instance that wraps
-		 *			the provided native pixel data instance.
-		 */
-		static MonoObject* create(const PixelDataPtr& pixelData);
-
-	private:
-		ScriptPixelData(MonoObject* managedInstance);
-		~ScriptPixelData();
-
-		/**
-		 * @brief	Initializes the object. Must be called after construction
-		 *			and before use.
-		 */
-		void initialize(const PixelDataPtr& pixelData);
-
-		/**
-		 * @brief	Checks is the underlying pixel data of the provided object locked.
-		 *			When locked pixel data cannot be accessed.
-		 */
-		static bool checkIsLocked(ScriptPixelData* thisPtr);
-
-		PixelDataPtr mPixelData;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, PixelVolume* volume, PixelFormat format);
-		static void internal_getPixel(ScriptPixelData* thisPtr, int x, int y, int z, Color* value);
-		static void internal_setPixel(ScriptPixelData* thisPtr, int x, int y, int z, Color* value);
-		static void internal_getPixels(ScriptPixelData* thisPtr, MonoArray** value);
-		static void internal_setPixels(ScriptPixelData* thisPtr, MonoArray* value);
-		static void internal_getRawPixels(ScriptPixelData* thisPtr, MonoArray** value);
-		static void internal_setRawPixels(ScriptPixelData* thisPtr, MonoArray* value);
-		static void internal_getExtents(ScriptPixelData* thisPtr, PixelVolume* value);
-		static void internal_getFormat(ScriptPixelData* thisPtr, PixelFormat* value);
-		static void internal_getRowPitch(ScriptPixelData* thisPtr, int* value);
-		static void internal_getSlicePitch(ScriptPixelData* thisPtr, int* value);
-		static void internal_getSize(ScriptPixelData* thisPtr, int* value);
-		static void internal_getIsConsecutive(ScriptPixelData* thisPtr, bool* value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsPixelData.h"
+#include "BsColor.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for PixelData. */
+	class BS_SCR_BE_EXPORT ScriptPixelData : public ScriptObject <ScriptPixelData>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PixelData")
+
+		/**	Returns the internal wrapped pixel data. */
+		PixelDataPtr getInternalValue() const { return mPixelData; }
+
+		/** Creates a new managed pixel data instance that wraps the provided native pixel data instance. */
+		static MonoObject* create(const PixelDataPtr& pixelData);
+
+	private:
+		ScriptPixelData(MonoObject* managedInstance);
+		~ScriptPixelData();
+
+		/**	Initializes the object. Must be called after construction and before use. */
+		void initialize(const PixelDataPtr& pixelData);
+
+		/** Checks is the underlying pixel data of the provided object locked. When locked pixel data cannot be accessed. */
+		static bool checkIsLocked(ScriptPixelData* thisPtr);
+
+		PixelDataPtr mPixelData;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, PixelVolume* volume, PixelFormat format);
+		static void internal_getPixel(ScriptPixelData* thisPtr, int x, int y, int z, Color* value);
+		static void internal_setPixel(ScriptPixelData* thisPtr, int x, int y, int z, Color* value);
+		static void internal_getPixels(ScriptPixelData* thisPtr, MonoArray** value);
+		static void internal_setPixels(ScriptPixelData* thisPtr, MonoArray* value);
+		static void internal_getRawPixels(ScriptPixelData* thisPtr, MonoArray** value);
+		static void internal_setRawPixels(ScriptPixelData* thisPtr, MonoArray* value);
+		static void internal_getExtents(ScriptPixelData* thisPtr, PixelVolume* value);
+		static void internal_getFormat(ScriptPixelData* thisPtr, PixelFormat* value);
+		static void internal_getRowPitch(ScriptPixelData* thisPtr, int* value);
+		static void internal_getSlicePitch(ScriptPixelData* thisPtr, int* value);
+		static void internal_getSize(ScriptPixelData* thisPtr, int* value);
+		static void internal_getIsConsecutive(ScriptPixelData* thisPtr, bool* value);
+	};
+
+	/** @} */
 }

+ 41 - 37
Source/SBansheeEngine/Include/BsScriptPixelUtility.h

@@ -1,38 +1,42 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsPixelData.h"
-#include "BsPixelUtil.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for PixelUtility.
-	 */
-	class BS_SCR_BE_EXPORT ScriptPixelUtility : public ScriptObject <ScriptPixelUtility>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PixelUtility")
-
-	private:
-		ScriptPixelUtility(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_getMemorySize(UINT32 width, UINT32 height, UINT32 depth, PixelFormat format, UINT32* value);
-		static void internal_hasAlpha(PixelFormat format, bool* value);
-		static void internal_isFloatingPoint(PixelFormat format, bool* value);
-		static void internal_isCompressed(PixelFormat format, bool* value);
-		static void internal_isDepth(PixelFormat format, bool* value);
-		static void internal_getMaxMipmaps(UINT32 width, UINT32 height, UINT32 depth, PixelFormat format, UINT32* value);
-		static MonoObject* internal_convertFormat(MonoObject* source, PixelFormat newFormat);
-		static MonoObject* internal_compress(MonoObject* source, CompressionOptions* options);
-		static MonoArray* internal_generateMipmaps(MonoObject* source, MipMapGenOptions* options);
-		static MonoObject* internal_scale(MonoObject* source, PixelVolume* newSize, PixelUtil::Filter filter);
-		static void internal_applyGamma(MonoObject* source, float gamma);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsPixelData.h"
+#include "BsPixelUtil.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for PixelUtility. */
+	class BS_SCR_BE_EXPORT ScriptPixelUtility : public ScriptObject <ScriptPixelUtility>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PixelUtility")
+
+	private:
+		ScriptPixelUtility(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_getMemorySize(UINT32 width, UINT32 height, UINT32 depth, PixelFormat format, UINT32* value);
+		static void internal_hasAlpha(PixelFormat format, bool* value);
+		static void internal_isFloatingPoint(PixelFormat format, bool* value);
+		static void internal_isCompressed(PixelFormat format, bool* value);
+		static void internal_isDepth(PixelFormat format, bool* value);
+		static void internal_getMaxMipmaps(UINT32 width, UINT32 height, UINT32 depth, PixelFormat format, UINT32* value);
+		static MonoObject* internal_convertFormat(MonoObject* source, PixelFormat newFormat);
+		static MonoObject* internal_compress(MonoObject* source, CompressionOptions* options);
+		static MonoArray* internal_generateMipmaps(MonoObject* source, MipMapGenOptions* options);
+		static MonoObject* internal_scale(MonoObject* source, PixelVolume* newSize, PixelUtil::Filter filter);
+		static void internal_applyGamma(MonoObject* source, float gamma);
+	};
+
+	/** @} */
 }

+ 38 - 36
Source/SBansheeEngine/Include/BsScriptPlainText.h

@@ -1,37 +1,39 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-#include "BsPlainText.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for PlainText.
-	 */
-	class BS_SCR_BE_EXPORT ScriptPlainText : public TScriptResource<ScriptPlainText, PlainText>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PlainText")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptPlainText(MonoObject* instance, const HPlainText& plainText);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoString* text);
-		static MonoString* internal_getText(ScriptPlainText* thisPtr);
-		static void internal_setText(ScriptPlainText* thisPtr, MonoString* text);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+#include "BsPlainText.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for PlainText. */
+	class BS_SCR_BE_EXPORT ScriptPlainText : public TScriptResource<ScriptPlainText, PlainText>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "PlainText")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptPlainText(MonoObject* instance, const HPlainText& plainText);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoString* text);
+		static MonoString* internal_getText(ScriptPlainText* thisPtr);
+		static void internal_setText(ScriptPlainText* thisPtr, MonoString* text);
+	};
+
+	/** @} */
 }

+ 36 - 34
Source/SBansheeEngine/Include/BsScriptPrefab.h

@@ -1,35 +1,37 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsPrefab.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Prefab.
-	 */
-	class BS_SCR_BE_EXPORT ScriptPrefab : public TScriptResource<ScriptPrefab, Prefab>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Prefab")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptPrefab(MonoObject* instance, const HPrefab& prefab);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, ScriptSceneObject* so);
-		static MonoObject* internal_Instantiate(ScriptPrefab* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsPrefab.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Prefab. */
+	class BS_SCR_BE_EXPORT ScriptPrefab : public TScriptResource<ScriptPrefab, Prefab>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Prefab")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptPrefab(MonoObject* instance, const HPrefab& prefab);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, ScriptSceneObject* so);
+		static MonoObject* internal_Instantiate(ScriptPrefab* instance);
+	};
+
+	/** @} */
 }

+ 39 - 37
Source/SBansheeEngine/Include/BsScriptProfilerOverlayInternal.h

@@ -1,38 +1,40 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsProfilerOverlay.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ProfilerOverlayInternal.
-	 */
-	class BS_SCR_BE_EXPORT ScriptProfilerOverlayInternal : public ScriptObject < ScriptProfilerOverlayInternal >
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ProfilerOverlayInternal")
-
-		/**
-		 * @brief	Returns the native profiler overlay instance.
-		 */
-		ProfilerOverlayInternal* getInternal() const { return mProfilerOverlayInternal; }
-
-	private:
-		ScriptProfilerOverlayInternal(MonoObject* managedInstance, const SPtr<Camera>& camera);
-		~ScriptProfilerOverlayInternal();
-
-		ProfilerOverlayInternal* mProfilerOverlayInternal;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, ScriptCamera* camera);
-		static void internal_SetType(ScriptProfilerOverlayInternal* thisPtr, ProfilerOverlayType type);
-		static void internal_Update(ScriptProfilerOverlayInternal* thisPtr);
-		static void internal_DestroyInstance(ScriptProfilerOverlayInternal* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsProfilerOverlay.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ProfilerOverlayInternal. */
+	class BS_SCR_BE_EXPORT ScriptProfilerOverlayInternal : public ScriptObject < ScriptProfilerOverlayInternal >
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ProfilerOverlayInternal")
+
+		/**	Returns the native profiler overlay instance. */
+		ProfilerOverlayInternal* getInternal() const { return mProfilerOverlayInternal; }
+
+	private:
+		ScriptProfilerOverlayInternal(MonoObject* managedInstance, const SPtr<Camera>& camera);
+		~ScriptProfilerOverlayInternal();
+
+		ProfilerOverlayInternal* mProfilerOverlayInternal;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, ScriptCamera* camera);
+		static void internal_SetType(ScriptProfilerOverlayInternal* thisPtr, ProfilerOverlayType type);
+		static void internal_Update(ScriptProfilerOverlayInternal* thisPtr);
+		static void internal_DestroyInstance(ScriptProfilerOverlayInternal* thisPtr);
+	};
+
+	/** @} */
 }

+ 51 - 51
Source/SBansheeEngine/Include/BsScriptRenderTarget.h

@@ -1,52 +1,52 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Base interop class for any types deriving from RenderTarget.
-	 */
-	class BS_SCR_BE_EXPORT ScriptRenderTargetBase : public ScriptObjectBase
-	{
-	public:
-		/**
-		 * @brief	Returns the native render target this object wraps.
-		 */
-		virtual RenderTargetPtr getNativeValue() const = 0;
-
-	protected:
-		friend class ScriptResourceManager;
-
-		ScriptRenderTargetBase(MonoObject* instance)
-			:ScriptObjectBase(instance)
-		{ }
-
-		virtual ~ScriptRenderTargetBase() {}
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for RenderTarget.
-	 */
-	class BS_SCR_BE_EXPORT ScriptRenderTarget : public ScriptObject<ScriptRenderTarget, ScriptRenderTargetBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTarget")
-
-	private:
-		ScriptRenderTarget(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_getWidth(ScriptRenderTarget* thisPtr, int* value);
-		static void internal_getHeight(ScriptRenderTarget* thisPtr, int* value);
-		static void internal_getGammaCorrection(ScriptRenderTarget* thisPtr, bool* value);
-		static void internal_getSampleCount(ScriptRenderTarget* thisPtr, int* value);
-		static void internal_getPriority(ScriptRenderTarget* thisPtr, int* value);
-		static void internal_setPriority(ScriptRenderTarget* thisPtr, int value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Base interop class for any types deriving from RenderTarget. */
+	class BS_SCR_BE_EXPORT ScriptRenderTargetBase : public ScriptObjectBase
+	{
+	public:
+		/**	Returns the native render target this object wraps. */
+		virtual RenderTargetPtr getNativeValue() const = 0;
+
+	protected:
+		friend class ScriptResourceManager;
+
+		ScriptRenderTargetBase(MonoObject* instance)
+			:ScriptObjectBase(instance)
+		{ }
+
+		virtual ~ScriptRenderTargetBase() {}
+	};
+
+	/**	Interop class between C++ & CLR for RenderTarget. */
+	class BS_SCR_BE_EXPORT ScriptRenderTarget : public ScriptObject<ScriptRenderTarget, ScriptRenderTargetBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTarget")
+
+	private:
+		ScriptRenderTarget(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_getWidth(ScriptRenderTarget* thisPtr, int* value);
+		static void internal_getHeight(ScriptRenderTarget* thisPtr, int* value);
+		static void internal_getGammaCorrection(ScriptRenderTarget* thisPtr, bool* value);
+		static void internal_getSampleCount(ScriptRenderTarget* thisPtr, int* value);
+		static void internal_getPriority(ScriptRenderTarget* thisPtr, int* value);
+		static void internal_setPriority(ScriptRenderTarget* thisPtr, int value);
+	};
+
+	/** @} */
 }

+ 24 - 20
Source/SBansheeEngine/Include/BsScriptRenderTexture.h

@@ -1,21 +1,25 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptRenderTarget.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for RenderTexture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptRenderTexture : public ScriptObject <ScriptRenderTexture, ScriptRenderTargetBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTexture")
-
-	private:
-		ScriptRenderTexture(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptRenderTarget.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for RenderTexture. */
+	class BS_SCR_BE_EXPORT ScriptRenderTexture : public ScriptObject <ScriptRenderTexture, ScriptRenderTargetBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTexture")
+
+	private:
+		ScriptRenderTexture(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 50 - 51
Source/SBansheeEngine/Include/BsScriptRenderTexture2D.h

@@ -1,52 +1,51 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptRenderTarget.h"
-#include "BsPixelUtil.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for a single or multi RenderTexture using a 2D texture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptRenderTexture2D : public ScriptObject < ScriptRenderTexture2D, ScriptRenderTargetBase >
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTexture2D")
-
-		/**
-		 * @copydoc	ScriptRenderTargetBase::getNativeValue
-		 */
-		RenderTargetPtr getNativeValue() const override { return mRenderTarget; }
-
-		/**
-		 * @brief	Returns the internal wrapped render texture. Returns null if this object
-		 *			instead wraps a multi render target.
-		 */
-		RenderTexturePtr getRenderTexture() const;
-
-		/**
-		 * @brief	Returns the internal wrapped multi render texture. Returns null if this object
-		 *			instead wraps a single render target.
-		 */
-		MultiRenderTexturePtr getMultiRenderTexture() const;
-
-	private:
-		ScriptRenderTexture2D(const RenderTargetPtr& target, bool isMulti, MonoObject* instance);
-
-		RenderTargetPtr mRenderTarget;
-		bool mIsMulti;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createDetailed(MonoObject* instance, PixelFormat format, UINT32 width, UINT32 height,
-			UINT32 numSamples, bool gammaCorrection, bool createDepth, PixelFormat depthStencilFormat);
-		static void internal_create(MonoObject* instance, MonoArray* colorSurfaces, MonoObject* depthStencilSurface);
-
-		static void internal_getColorSurfaces(ScriptRenderTexture2D* thisPtr, MonoArray** value);
-		static void internal_getDepthStencilSurface(ScriptRenderTexture2D* thisPtr, MonoObject** value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptRenderTarget.h"
+#include "BsPixelUtil.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for a single or multi RenderTexture using a 2D texture. */
+	class BS_SCR_BE_EXPORT ScriptRenderTexture2D : public ScriptObject < ScriptRenderTexture2D, ScriptRenderTargetBase >
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "RenderTexture2D")
+
+		/** @copydoc ScriptRenderTargetBase::getNativeValue */
+		RenderTargetPtr getNativeValue() const override { return mRenderTarget; }
+
+		/** Returns the internal wrapped render texture. Returns null if this object instead wraps a multi render target. */
+		RenderTexturePtr getRenderTexture() const;
+
+		/** 
+		 * Returns the internal wrapped multi render texture. Returns null if this object instead wraps a single render
+		 * target.
+		 */
+		MultiRenderTexturePtr getMultiRenderTexture() const;
+
+	private:
+		ScriptRenderTexture2D(const RenderTargetPtr& target, bool isMulti, MonoObject* instance);
+
+		RenderTargetPtr mRenderTarget;
+		bool mIsMulti;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createDetailed(MonoObject* instance, PixelFormat format, UINT32 width, UINT32 height,
+			UINT32 numSamples, bool gammaCorrection, bool createDepth, PixelFormat depthStencilFormat);
+		static void internal_create(MonoObject* instance, MonoArray* colorSurfaces, MonoObject* depthStencilSurface);
+
+		static void internal_getColorSurfaces(ScriptRenderTexture2D* thisPtr, MonoArray** value);
+		static void internal_getDepthStencilSurface(ScriptRenderTexture2D* thisPtr, MonoObject** value);
+	};
+
+	/** @} */
 }

+ 53 - 58
Source/SBansheeEngine/Include/BsScriptRenderable.h

@@ -1,59 +1,54 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Renderable.
-	 */
-	class BS_SCR_BE_EXPORT ScriptRenderable : public ScriptObject < ScriptRenderable >
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeRenderable")
-
-		/**
-		 * @brief	Returns the native wrapped renderable handler.
-		 */
-		SPtr<Renderable> getInternal() const { return mRenderable; }
-
-	private:
-		ScriptRenderable(MonoObject* managedInstance, const HSceneObject& parentSO);
-		~ScriptRenderable();
-
-		/**
-		 * @brief	Updates the internal transform of the renderable handled according to
-		 *			the scene object it is attached to.
-		 */
-		void updateTransform(const HSceneObject& parent);
-
-		/**
-		 * @brief	Destroys the internal renderable handler object.
-		 */
-		void destroy();
-
-		/**
-		 * @copydoc	ScriptObject::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		SPtr<Renderable> mRenderable;
-		UINT32 mLastUpdateHash;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_Create(MonoObject* instance, ScriptSceneObject* parentSO);
-		static void internal_UpdateTransform(ScriptRenderable* thisPtr, ScriptSceneObject* parentSO);
-		static void internal_SetMesh(ScriptRenderable* thisPtr, ScriptMesh* mesh);
-		static void internal_GetBounds(ScriptRenderable* thisPtr, ScriptSceneObject* parentSO, AABox* box, Sphere* sphere);
-		static UINT64 internal_GetLayers(ScriptRenderable* thisPtr);
-		static void internal_SetLayers(ScriptRenderable* thisPtr, UINT64 layers);
-		static void internal_SetMaterial(ScriptRenderable* thisPtr, ScriptMaterial* material, int index);
-		static void internal_SetMaterials(ScriptRenderable* thisPtr, MonoArray* materials);
-		static void internal_OnDestroy(ScriptRenderable* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Renderable. */
+	class BS_SCR_BE_EXPORT ScriptRenderable : public ScriptObject < ScriptRenderable >
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeRenderable")
+
+		/**	Returns the native wrapped renderable handler. */
+		SPtr<Renderable> getInternal() const { return mRenderable; }
+
+	private:
+		ScriptRenderable(MonoObject* managedInstance, const HSceneObject& parentSO);
+		~ScriptRenderable();
+
+		/** Updates the internal transform of the renderable handled according to the scene object it is attached to. */
+		void updateTransform(const HSceneObject& parent);
+
+		/**	Destroys the internal renderable handler object. */
+		void destroy();
+
+		/** @copydoc ScriptObject::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		SPtr<Renderable> mRenderable;
+		UINT32 mLastUpdateHash;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_Create(MonoObject* instance, ScriptSceneObject* parentSO);
+		static void internal_UpdateTransform(ScriptRenderable* thisPtr, ScriptSceneObject* parentSO);
+		static void internal_SetMesh(ScriptRenderable* thisPtr, ScriptMesh* mesh);
+		static void internal_GetBounds(ScriptRenderable* thisPtr, ScriptSceneObject* parentSO, AABox* box, Sphere* sphere);
+		static UINT64 internal_GetLayers(ScriptRenderable* thisPtr);
+		static void internal_SetLayers(ScriptRenderable* thisPtr, UINT64 layers);
+		static void internal_SetMaterial(ScriptRenderable* thisPtr, ScriptMaterial* material, int index);
+		static void internal_SetMaterials(ScriptRenderable* thisPtr, MonoArray* materials);
+		static void internal_OnDestroy(ScriptRenderable* thisPtr);
+	};
+
+	/** @} */
 }

+ 138 - 170
Source/SBansheeEngine/Include/BsScriptResource.h

@@ -1,171 +1,139 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Types of resources accessible from script code.
-	 */
-	enum class ScriptResourceType // Note: Must be the same as C# enum ResourceType
-	{
-		Texture, SpriteTexture, Mesh, Font, Shader, ShaderInclude, Material, Prefab, 
-		PlainText, ScriptCode, StringTable, GUISkin, PhysicsMaterial, PhysicsMesh, Undefined
-	};
-
-	/**
-	 * @brief	Base class for all resource interop objects.
-	 */
-	class BS_SCR_BE_EXPORT ScriptResourceBase : public PersistentScriptObjectBase
-	{
-	public:
-		/**
-		 * @brief	Returns a generic handle to the internal wrapped resource.
-		 */
-		virtual HResource getGenericHandle() const = 0;
-
-		/**
-		 * @brief	Sets the internal resource this object wraps.
-		 */
-		virtual void setResource(const HResource& resource) = 0;
-
-		/**
-		 * @copydoc	ScriptObjectBase::beginRefresh
-		 */
-		virtual ScriptObjectBackup beginRefresh() override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::endRefresh
-		 */
-		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
-
-	protected:
-		friend class ScriptResourceManager;
-
-		ScriptResourceBase(MonoObject* instance);
-		virtual ~ScriptResourceBase() {}
-
-		/**
-		 * @brief	Triggered by the script resource managed when the native resource handle this object point to has
-		 * 			been destroyed.
-		 */
-		virtual void notifyResourceDestroyed() { }
-
-		/**
-		 * @brief	Destroys the interop object, unless refresh is in progress in which case it is just prepared
-		 * 			for re-creation.
-		 */
-		void destroy();
-
-		bool mRefreshInProgress;
-	};
-
-	/**
-	 * @brief	Base class for a specific resource's interop object.
-	 */
-	template<class ScriptClass, class ResType>
-	class BS_SCR_BE_EXPORT TScriptResource : public ScriptObject <ScriptClass, ScriptResourceBase>
-	{
-	public:
-		/**
-		 * @copydoc	ScriptResourceBase::getGenericHandle
-		 */
-		HResource getGenericHandle() const override { return mResource; }
-
-		/**
-		 * @copydoc	ScriptResourceBase::setResource
-		 */
-		void setResource(const HResource& resource) override { mResource = static_resource_cast<ResType>(resource); }
-
-		/**
-		 * @brief	Returns a handle to the internal wrapped resource.
-		 */
-		const ResourceHandle<ResType>& getHandle() const { return mResource; }
-
-	protected:
-		friend class ScriptResourceManager;
-
-		TScriptResource(MonoObject* instance, const ResourceHandle<ResType>& resource)
-			:ScriptObject(instance), mResource(resource)
-		{
-			mManagedHandle = mono_gchandle_new(instance, false);
-
-			BS_DEBUG_ONLY(mHandleValid = true);
-		}
-
-		virtual ~TScriptResource() {}
-
-		/**
-		 * @copydoc	ScriptObjectBase::endRefresh
-		 */
-		virtual void endRefresh(const ScriptObjectBackup& backupData) override
-		{
-			BS_ASSERT(!mHandleValid);
-			mManagedHandle = mono_gchandle_new(mManagedInstance, false);
-
-			ScriptObject::endRefresh(backupData);
-		}
-
-		/**
-		 * @copydoc	ScriptObjectBase::notifyResourceDestroyed
-		 */
-		void notifyResourceDestroyed() override
-		{
-			mono_gchandle_free(mManagedHandle);
-			BS_DEBUG_ONLY(mHandleValid = false);
-		}
-
-		/**
-		 * @copydoc	ScriptObjectBase::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override
-		{
-			mono_gchandle_free(mManagedHandle);
-			BS_DEBUG_ONLY(mHandleValid = false);
-
-			destroy();
-		}
-
-		ResourceHandle<ResType> mResource;
-		uint32_t mManagedHandle;
-		BS_DEBUG_ONLY(bool mHandleValid);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for Resource.
-	 */
-	class BS_SCR_BE_EXPORT ScriptResource : public ScriptObject<ScriptResource, ScriptResourceBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Resource")
-
-		/**
-		 * @brief	Converts a RTTI id belonging to a resource type into a ScriptResourceType.
-		 */
-		static ScriptResourceType getTypeFromTypeId(UINT32 typeId);
-
-		/**
-		 * @brief	Converts a ScriptResourceType into a RTTI id belonging to that resource type.
-		 */
-		static UINT32 getTypeIdFromType(ScriptResourceType type);
-
-		/**
-		 * @brief	Converts a RTTI id belonging to a resource type into a managed class representing that type.
-		 */
-		static MonoClass* ScriptResource::getClassFromTypeId(UINT32 typeId);
-	private:
-		ScriptResource(MonoObject* instance)
-			:ScriptObject(instance)
-		{ }
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoString* internal_getName(ScriptResourceBase* nativeInstance);
-		static MonoString* internal_getUUID(ScriptResourceBase* nativeInstance);
-		static void internal_release(ScriptResourceBase* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Types of resources accessible from script code. */
+	enum class ScriptResourceType // Note: Must be the same as C# enum ResourceType
+	{
+		Texture, SpriteTexture, Mesh, Font, Shader, ShaderInclude, Material, Prefab, 
+		PlainText, ScriptCode, StringTable, GUISkin, PhysicsMaterial, PhysicsMesh, Undefined
+	};
+
+	/**	Base class for all resource interop objects. */
+	class BS_SCR_BE_EXPORT ScriptResourceBase : public PersistentScriptObjectBase
+	{
+	public:
+		/**	Returns a generic handle to the internal wrapped resource. */
+		virtual HResource getGenericHandle() const = 0;
+
+		/**	Sets the internal resource this object wraps. */
+		virtual void setResource(const HResource& resource) = 0;
+
+		/** @copydoc ScriptObjectBase::beginRefresh */
+		virtual ScriptObjectBackup beginRefresh() override;
+
+		/** @copydoc ScriptObjectBase::endRefresh */
+		virtual void endRefresh(const ScriptObjectBackup& backupData) override;
+
+	protected:
+		friend class ScriptResourceManager;
+
+		ScriptResourceBase(MonoObject* instance);
+		virtual ~ScriptResourceBase() {}
+
+		/**	
+		 * Triggered by the script resource managed when the native resource handle this object point to has been destroyed.
+		 */
+		virtual void notifyResourceDestroyed() { }
+
+		/** Destroys the interop object, unless refresh is in progress in which case it is just prepared for re-creation. */
+		void destroy();
+
+		bool mRefreshInProgress;
+	};
+
+	/**	Base class for a specific resource's interop object. */
+	template<class ScriptClass, class ResType>
+	class BS_SCR_BE_EXPORT TScriptResource : public ScriptObject <ScriptClass, ScriptResourceBase>
+	{
+	public:
+		/** @copydoc ScriptResourceBase::getGenericHandle */
+		HResource getGenericHandle() const override { return mResource; }
+
+		/** @copydoc ScriptResourceBase::setResource */
+		void setResource(const HResource& resource) override { mResource = static_resource_cast<ResType>(resource); }
+
+		/**	Returns a handle to the internal wrapped resource. */
+		const ResourceHandle<ResType>& getHandle() const { return mResource; }
+
+	protected:
+		friend class ScriptResourceManager;
+
+		TScriptResource(MonoObject* instance, const ResourceHandle<ResType>& resource)
+			:ScriptObject(instance), mResource(resource)
+		{
+			mManagedHandle = mono_gchandle_new(instance, false);
+
+			BS_DEBUG_ONLY(mHandleValid = true);
+		}
+
+		virtual ~TScriptResource() {}
+
+		/** @copydoc ScriptObjectBase::endRefresh */
+		virtual void endRefresh(const ScriptObjectBackup& backupData) override
+		{
+			BS_ASSERT(!mHandleValid);
+			mManagedHandle = mono_gchandle_new(mManagedInstance, false);
+
+			ScriptObject::endRefresh(backupData);
+		}
+
+		/** @copydoc ScriptObjectBase::notifyResourceDestroyed */
+		void notifyResourceDestroyed() override
+		{
+			mono_gchandle_free(mManagedHandle);
+			BS_DEBUG_ONLY(mHandleValid = false);
+		}
+
+		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override
+		{
+			mono_gchandle_free(mManagedHandle);
+			BS_DEBUG_ONLY(mHandleValid = false);
+
+			destroy();
+		}
+
+		ResourceHandle<ResType> mResource;
+		uint32_t mManagedHandle;
+		BS_DEBUG_ONLY(bool mHandleValid);
+	};
+
+	/**	Interop class between C++ & CLR for Resource. */
+	class BS_SCR_BE_EXPORT ScriptResource : public ScriptObject<ScriptResource, ScriptResourceBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Resource")
+
+		/**	Converts a RTTI id belonging to a resource type into a ScriptResourceType. */
+		static ScriptResourceType getTypeFromTypeId(UINT32 typeId);
+
+		/**	Converts a ScriptResourceType into a RTTI id belonging to that resource type. */
+		static UINT32 getTypeIdFromType(ScriptResourceType type);
+
+		/**	Converts a RTTI id belonging to a resource type into a managed class representing that type. */
+		static MonoClass* ScriptResource::getClassFromTypeId(UINT32 typeId);
+	private:
+		ScriptResource(MonoObject* instance)
+			:ScriptObject(instance)
+		{ }
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoString* internal_getName(ScriptResourceBase* nativeInstance);
+		static MonoString* internal_getUUID(ScriptResourceBase* nativeInstance);
+		static void internal_release(ScriptResourceBase* nativeInstance);
+	};
+
+	/** @} */
 }

+ 105 - 107
Source/SBansheeEngine/Include/BsScriptResourceManager.h

@@ -1,108 +1,106 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsModule.h"
-#include <mono/jit/jit.h>
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Handles creation and lookup of script interop objects for resources.
-	 *			Since resources can be created in native code yet used by managed code
-	 *			this manager provides lookups to find managed equivalents of
-	 *			native resources.
-	 */
-	class BS_SCR_BE_EXPORT ScriptResourceManager : public Module<ScriptResourceManager>
-	{
-	public:
-		ScriptResourceManager();
-		~ScriptResourceManager();
-
-		/**
-		 * @brief	Creates a new managed instance and interop object for the specified resource.
-		 *
-		 * @param	resourceHandle	Native resource to wrap in a managed instance.
-		 * @param	out				Output interop object corresponding to the new managed instance.
-		 *
-		 * @note	Throws an exception if a managed instance for the provided resource already exists.
-		 */
-		template<class RetType, class InType>
-		void createScriptResource(const ResourceHandle<InType>& resourceHandle, RetType** out);
-
-		/**
-		 * @brief	Creates a new interop object for the specified resource using an existing managed instance.
-		 *
-		 * @param	existingInstance	Existing managed instance. Caller must ensure the managed instance
-		 *								matches the native resource type.
-		 * @param	resourceHandle		Native resource to link to the managed instance.
-		 * @param	out					Output interop object corresponding to the new managed instance.
-		 *
-		 * @note	Throws an exception if a managed instance for the provided resource already exists.
-		 */
-		template<class RetType, class InType>
-		void createScriptResource(MonoObject* existingInstance, const ResourceHandle<InType>& resourceHandle, RetType** out);
-
-		/**
-		 * @brief	Attempts to find an existing interop object for the specified resource, and optionally
-		 *			creates a new one if one cannot be found.
-		 * 
-		 * @param	resourceHandle	Resource to search for.
-		 * @param	out				Found or created interop object containing the resource.
-		 * @param	create			If a resource cannot be found new one will be created when this
-		 *							is true. If false and the resource doesn't exist it will be null.
-		 */
-		template<class RetType, class InType>
-		void getScriptResource(const ResourceHandle<InType>& resourceHandle, RetType** out, bool create = false);
-
-		/**
-		 * @brief	Creates a new managed instance and interop object for the specified string table.
-		 *
-		 * @param	resourceHandle	Native string table resource to wrap in a managed instance.
-		 * @param	out				Output string table interop object corresponding to the new managed instance.
-		 *
-		 * @note	Throws an exception if a managed instance for the provided resource already exists.
-		 */
-		template<>
-		void createScriptResource(const ResourceHandle<StringTable>& resourceHandle, ScriptStringTable** out);
-
-		/**
-		 * @brief	Creates a new managed instance and interop object for the specified resource.
-		 *
-		 * @param	resourceHandle	Native resource to wrap in a managed instance.
-		 * @param	out				Output interop object corresponding to the new managed instance.
-		 *
-		 * @note	Throws an exception if a managed instance for the provided resource already exists.
-		 */
-		template<>
-		void createScriptResource(const HResource& resourceHandle, ScriptResourceBase** out);
-
-		/**
-		 * @brief	Attempts to find a resource interop object for a resource with the specified UUID.
-		 *			Returns null if the object cannot be found.
-		 */
-		ScriptResourceBase* getScriptResource(const String& UUID);
-
-		/**
-		 * @brief	Deletes the provided resource interop objects. All resource interop objects
-		 *			should be deleted using this method.
-		 */
-		void destroyScriptResource(ScriptResourceBase* resource);
-
-	private:
-		/**
-		 * @brief	Triggered when the native resource has been unloaded and therefore destroyed.
-		 */
-		void onResourceDestroyed(const String& UUID);
-
-		/**
-		 * @brief	Throws an exception if the provided UUID already exists in the interop object
-		 *			lookup table.
-		 */
-		void throwExceptionIfInvalidOrDuplicate(const String& uuid) const;
-
-		UnorderedMap<String, ScriptResourceBase*> mScriptResources;
-		HEvent mResourceDestroyedConn;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsModule.h"
+#include <mono/jit/jit.h>
+
+namespace BansheeEngine
+{
+	/** @addtogroup SBansheeEngine
+	 *  @{
+	 */
+
+	/**
+	 * Handles creation and lookup of script interop objects for resources. Since resources can be created in native code
+	 * yet used by managed code this manager provides lookups to find managed equivalents of native resources.
+	 */
+	class BS_SCR_BE_EXPORT ScriptResourceManager : public Module<ScriptResourceManager>
+	{
+	public:
+		ScriptResourceManager();
+		~ScriptResourceManager();
+
+		/**
+		 * Creates a new managed instance and interop object for the specified resource.
+		 *
+		 * @param[in]	resourceHandle	Native resource to wrap in a managed instance.
+		 * @param[out]	out				Output interop object corresponding to the new managed instance.
+		 *
+		 * @note	Throws an exception if a managed instance for the provided resource already exists.
+		 */
+		template<class RetType, class InType>
+		void createScriptResource(const ResourceHandle<InType>& resourceHandle, RetType** out);
+
+		/**
+		 * Creates a new interop object for the specified resource using an existing managed instance.
+		 *
+		 * @param[in]	existingInstance	Existing managed instance. Caller must ensure the managed instance matches the
+		 *									native resource type.
+		 * @param[in]	resourceHandle		Native resource to link to the managed instance.
+		 * @param[out]	out					Output interop object corresponding to the new managed instance.
+		 *
+		 * @note	Throws an exception if a managed instance for the provided resource already exists.
+		 */
+		template<class RetType, class InType>
+		void createScriptResource(MonoObject* existingInstance, const ResourceHandle<InType>& resourceHandle, RetType** out);
+
+		/**
+		 * Attempts to find an existing interop object for the specified resource, and optionally creates a new one if one
+		 * cannot be found.
+		 * 
+		 * @param[in]	resourceHandle	Resource to search for.
+		 * @param[out]	out				Found or created interop object containing the resource.
+		 * @param[in]	create			If a resource cannot be found new one will be created when this is true. If false
+		 *								and the resource doesn't exist it will be null.
+		 */
+		template<class RetType, class InType>
+		void getScriptResource(const ResourceHandle<InType>& resourceHandle, RetType** out, bool create = false);
+
+		/**
+		 * Creates a new managed instance and interop object for the specified string table.
+		 *
+		 * @param[in]	resourceHandle	Native string table resource to wrap in a managed instance.
+		 * @param[out]	out				Output string table interop object corresponding to the new managed instance.
+		 *
+		 * @note	Throws an exception if a managed instance for the provided resource already exists.
+		 */
+		template<>
+		void createScriptResource(const ResourceHandle<StringTable>& resourceHandle, ScriptStringTable** out);
+
+		/**
+		 * Creates a new managed instance and interop object for the specified resource.
+		 *
+		 * @param[in]	resourceHandle	Native resource to wrap in a managed instance.
+		 * @param[out]	out				Output interop object corresponding to the new managed instance.
+		 *
+		 * @note	Throws an exception if a managed instance for the provided resource already exists.
+		 */
+		template<>
+		void createScriptResource(const HResource& resourceHandle, ScriptResourceBase** out);
+
+		/**
+		 * Attempts to find a resource interop object for a resource with the specified UUID. Returns null if the object
+		 * cannot be found.
+		 */
+		ScriptResourceBase* getScriptResource(const String& UUID);
+
+		/**
+		 * Deletes the provided resource interop objects. All resource interop objects should be deleted using this method.
+		 */
+		void destroyScriptResource(ScriptResourceBase* resource);
+
+	private:
+		/**	Triggered when the native resource has been unloaded and therefore destroyed. */
+		void onResourceDestroyed(const String& UUID);
+
+		/**	Throws an exception if the provided UUID already exists in the interop object lookup table. */
+		void throwExceptionIfInvalidOrDuplicate(const String& uuid) const;
+
+		UnorderedMap<String, ScriptResourceBase*> mScriptResources;
+		HEvent mResourceDestroyedConn;
+	};
+
+	/** @} */
 }

+ 67 - 65
Source/SBansheeEngine/Include/BsScriptResourceRef.h

@@ -1,66 +1,68 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsTexture.h"
-#include "BsScriptResource.h"
-#include "BsMonoClass.h"
-#include "BsRTTIType.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ResourceRef.
-	 */
-	class BS_SCR_BE_EXPORT ScriptResourceRef : public ScriptObject<ScriptResourceRef>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ResourceRef")
-
-		/**
-		 * @brief	Creates a new managed ResourceRef for the provided resource.
-		 *
-		 * @param	handle	Handle to the resource to wrap.
-		 */
-		template<class T>
-		static MonoObject* create(const WeakResourceHandle<T>& handle)
-		{
-			return createInternal(handle);
-		}
-
-		/**
-		 * @brief	Creates a new managed ResourceRef for the provided texture.
-		 *
-		 * @param	handle	Handle to the texture to wrap.
-		 */
-		static MonoObject* create(const WeakResourceHandle<Texture>& handle, TextureType type = TEX_TYPE_2D);
-
-		/**
-		 * @brief	Returns a weak handle to the resource referenced by this object.
-		 */
-		WeakResourceHandle<Resource> getHandle() const { return mResource; }
-
-	private:
-		friend class ScriptResourceRefBase;
-
-		ScriptResourceRef(MonoObject* instance, const WeakResourceHandle<Resource>& handle);
-
-		/**
-		 * @brief	Creates a new managed ResourceRef for the provided resource type.
-		 *
-		 * @param	handle			Handle to the resource to wrap.
-		 */
-		static MonoObject* createInternal(const WeakResourceHandle<Resource>& handle);
-
-		WeakResourceHandle<Resource> mResource;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static bool internal_IsLoaded(ScriptResourceRef* nativeInstance);
-		static MonoObject* internal_GetResource(ScriptResourceRef* nativeInstance);
-		static MonoString* internal_GetUUID(ScriptResourceRef* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsTexture.h"
+#include "BsScriptResource.h"
+#include "BsMonoClass.h"
+#include "BsRTTIType.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ResourceRef. */
+	class BS_SCR_BE_EXPORT ScriptResourceRef : public ScriptObject<ScriptResourceRef>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ResourceRef")
+
+		/**
+		 * Creates a new managed ResourceRef for the provided resource.
+		 *
+		 * @param[in]	handle	Handle to the resource to wrap.
+		 */
+		template<class T>
+		static MonoObject* create(const WeakResourceHandle<T>& handle)
+		{
+			return createInternal(handle);
+		}
+
+		/**
+		 * Creates a new managed ResourceRef for the provided texture.
+		 *
+		 * @param[in]	handle	Handle to the texture to wrap.
+		 */
+		static MonoObject* create(const WeakResourceHandle<Texture>& handle, TextureType type = TEX_TYPE_2D);
+
+		/**	Returns a weak handle to the resource referenced by this object. */
+		WeakResourceHandle<Resource> getHandle() const { return mResource; }
+
+	private:
+		friend class ScriptResourceRefBase;
+
+		ScriptResourceRef(MonoObject* instance, const WeakResourceHandle<Resource>& handle);
+
+		/**
+		 * Creates a new managed ResourceRef for the provided resource type.
+		 *
+		 * @param[in]	handle	Handle to the resource to wrap.
+		 */
+		static MonoObject* createInternal(const WeakResourceHandle<Resource>& handle);
+
+		WeakResourceHandle<Resource> mResource;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static bool internal_IsLoaded(ScriptResourceRef* nativeInstance);
+		static MonoObject* internal_GetResource(ScriptResourceRef* nativeInstance);
+		static MonoString* internal_GetUUID(ScriptResourceRef* thisPtr);
+	};
+
+	/** @} */
 }

+ 33 - 29
Source/SBansheeEngine/Include/BsScriptResources.h

@@ -1,30 +1,34 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Resources & GameResourceManager.
-	 */
-	class BS_SCR_BE_EXPORT ScriptResources : public ScriptObject<ScriptResources>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Resources")
-
-	private:
-		ScriptResources(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_Load(MonoString* path, bool keepLoaded);
-		static MonoObject* internal_LoadRef(MonoObject* reference, bool keepLoaded);
-		static void internal_Release(ScriptResourceBase* resource);
-		static void internal_ReleaseRef(ScriptResourceRef* resource);
-		static void internal_UnloadUnused();
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Resources & GameResourceManager. */
+	class BS_SCR_BE_EXPORT ScriptResources : public ScriptObject<ScriptResources>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Resources")
+
+	private:
+		ScriptResources(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_Load(MonoString* path, bool keepLoaded);
+		static MonoObject* internal_LoadRef(MonoObject* reference, bool keepLoaded);
+		static void internal_Release(ScriptResourceBase* resource);
+		static void internal_ReleaseRef(ScriptResourceRef* resource);
+		static void internal_UnloadUnused();
+	};
+
+	/** @} */
 }

+ 50 - 44
Source/SBansheeEngine/Include/BsScriptScene.h

@@ -1,45 +1,51 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/** Interop class between C++ & CLR for SceneManager. */
-	class BS_SCR_BE_EXPORT ScriptScene : public ScriptObject<ScriptScene>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Scene")
-
-		/** Registers internal callbacks. Must be called on scripting system load. */
-		static void startUp();
-
-		/** Unregisters internal callbacks. Must be called on scripting system shutdown. */
-		static void shutDown();
-
-	private:
-		ScriptScene(MonoObject* instance);
-
-		/** Triggered when the assembly refresh starts. */
-		static void onRefreshStarted();
-
-		/** Triggered when assembly domain is loaded during assembly refresh. */
-		static void onRefreshDomainLoaded();
-
-		static HEvent OnRefreshDomainLoadedConn;
-		static HEvent OnRefreshStartedConn;
-
-		static String ActiveSceneUUID;
-		static WString ActiveSceneName;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_LoadScene(MonoString* path);
-		static MonoObject* internal_GetRoot();
-		static void internal_ClearScene();
-		static MonoObject* internal_GetMainCameraSO();
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/** Interop class between C++ & CLR for SceneManager. */
+	class BS_SCR_BE_EXPORT ScriptScene : public ScriptObject<ScriptScene>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Scene")
+
+		/** Registers internal callbacks. Must be called on scripting system load. */
+		static void startUp();
+
+		/** Unregisters internal callbacks. Must be called on scripting system shutdown. */
+		static void shutDown();
+
+	private:
+		ScriptScene(MonoObject* instance);
+
+		/** Triggered when the assembly refresh starts. */
+		static void onRefreshStarted();
+
+		/** Triggered when assembly domain is loaded during assembly refresh. */
+		static void onRefreshDomainLoaded();
+
+		static HEvent OnRefreshDomainLoadedConn;
+		static HEvent OnRefreshStartedConn;
+
+		static String ActiveSceneUUID;
+		static WString ActiveSceneName;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_LoadScene(MonoString* path);
+		static MonoObject* internal_GetRoot();
+		static void internal_ClearScene();
+		static MonoObject* internal_GetMainCameraSO();
+	};
+
+	/** @} */
 }

+ 99 - 109
Source/SBansheeEngine/Include/BsScriptSceneObject.h

@@ -1,110 +1,100 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptGameObject.h"
-#include "BsScriptObject.h"
-#include "BsFont.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for SceneObject.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSceneObject : public ScriptObject<ScriptSceneObject, ScriptGameObjectBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SceneObject")
-
-		/**
-		 * @copydoc	ScriptGameObjectBase::getNativeHandle
-		 */
-		HGameObject getNativeHandle() const override { return mSceneObject; }
-
-		/**
-		 * @copydoc	ScriptGameObjectBase::setNativeHandle
-		 */
-		void setNativeHandle(const HGameObject& gameObject) override;
-
-		/**
-		 * @brief	Returns the native internal scene object.
-		 */
-		HSceneObject getNativeSceneObject() const { return mSceneObject; }
-
-		/**
-		 * @brief	Checks is the scene object wrapped by the provided interop object destroyed.
-		 */
-		static bool checkIfDestroyed(ScriptSceneObject* nativeInstance);
-
-	private:
-		friend class ScriptGameObjectManager;
-
-		ScriptSceneObject(MonoObject* instance, const HSceneObject& sceneObject);
-
-		/**
-		 * @copydoc	ScriptObjectBase::_onManagedInstanceDeleted
-		 */
-		void _onManagedInstanceDeleted() override;
-
-		/**
-		 * @copydoc	ScriptObjectBase::_createManagedInstance
-		 */
-		MonoObject* _createManagedInstance(bool construct) override;
-
-		/**
-		 * @brief	Triggered by the script game object manager when the handle this object is referencing is destroyed.
-		 */
-		void _notifyDestroyed();
-
-		HSceneObject mSceneObject;
-		uint32_t mManagedHandle;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoString* name, UINT32 flags);
-
-		static void internal_setName(ScriptSceneObject* nativeInstance, MonoString* name);
-		static MonoString* internal_getName(ScriptSceneObject* nativeInstance);
-		static void internal_setActive(ScriptSceneObject* nativeInstance, bool value);
-		static bool internal_getActive(ScriptSceneObject* nativeInstance);
-
-		static void internal_setParent(ScriptSceneObject* nativeInstance, MonoObject* parent);
-		static MonoObject* internal_getParent(ScriptSceneObject* nativeInstance);
-
-		static void internal_getNumChildren(ScriptSceneObject* nativeInstance, UINT32* value);
-		static MonoObject* internal_getChild(ScriptSceneObject* nativeInstance, UINT32 idx);
-		static MonoObject* internal_findChild(ScriptSceneObject* nativeInstance, MonoString* name, bool recursive);
-		static MonoArray* internal_findChildren(ScriptSceneObject* nativeInstance, MonoString* name, bool recursive);
-
-		static void internal_getPosition(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getLocalPosition(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
-		static void internal_getLocalRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
-		static void internal_getScale(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getLocalScale(ScriptSceneObject* nativeInstance, Vector3* value);
-
-		static void internal_setPosition(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_setLocalPosition(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_setRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
-		static void internal_setLocalRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
-		static void internal_setLocalScale(ScriptSceneObject* nativeInstance, Vector3* value);
-
-		static void internal_getLocalTransform(ScriptSceneObject* nativeInstance, Matrix4* value);
-		static void internal_getWorldTransform(ScriptSceneObject* nativeInstance, Matrix4* value);
-		static void internal_lookAt(ScriptSceneObject* nativeInstance, Vector3* direction, Vector3* up);
-		static void internal_move(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_moveLocal(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_rotate(ScriptSceneObject* nativeInstance, Quaternion* value);
-		static void internal_roll(ScriptSceneObject* nativeInstance, Radian* value);
-		static void internal_yaw(ScriptSceneObject* nativeInstance, Radian* value);
-		static void internal_pitch(ScriptSceneObject* nativeInstance, Radian* value);
-		static void internal_setForward(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getForward(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getUp(ScriptSceneObject* nativeInstance, Vector3* value);
-		static void internal_getRight(ScriptSceneObject* nativeInstance, Vector3* value);
-
-		static void internal_destroy(ScriptSceneObject* nativeInstance, bool immediate);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptGameObject.h"
+#include "BsScriptObject.h"
+#include "BsFont.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for SceneObject. */
+	class BS_SCR_BE_EXPORT ScriptSceneObject : public ScriptObject<ScriptSceneObject, ScriptGameObjectBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SceneObject")
+
+		/** @copydoc ScriptGameObjectBase::getNativeHandle */
+		HGameObject getNativeHandle() const override { return mSceneObject; }
+
+		/** @copydoc ScriptGameObjectBase::setNativeHandle */
+		void setNativeHandle(const HGameObject& gameObject) override;
+
+		/**	Returns the native internal scene object. */
+		HSceneObject getNativeSceneObject() const { return mSceneObject; }
+
+		/**	Checks is the scene object wrapped by the provided interop object destroyed. */
+		static bool checkIfDestroyed(ScriptSceneObject* nativeInstance);
+
+	private:
+		friend class ScriptGameObjectManager;
+
+		ScriptSceneObject(MonoObject* instance, const HSceneObject& sceneObject);
+
+		/** @copydoc ScriptObjectBase::_onManagedInstanceDeleted */
+		void _onManagedInstanceDeleted() override;
+
+		/** @copydoc ScriptObjectBase::_createManagedInstance */
+		MonoObject* _createManagedInstance(bool construct) override;
+
+		/**	Triggered by the script game object manager when the handle this object is referencing is destroyed. */
+		void _notifyDestroyed();
+
+		HSceneObject mSceneObject;
+		uint32_t mManagedHandle;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoString* name, UINT32 flags);
+
+		static void internal_setName(ScriptSceneObject* nativeInstance, MonoString* name);
+		static MonoString* internal_getName(ScriptSceneObject* nativeInstance);
+		static void internal_setActive(ScriptSceneObject* nativeInstance, bool value);
+		static bool internal_getActive(ScriptSceneObject* nativeInstance);
+
+		static void internal_setParent(ScriptSceneObject* nativeInstance, MonoObject* parent);
+		static MonoObject* internal_getParent(ScriptSceneObject* nativeInstance);
+
+		static void internal_getNumChildren(ScriptSceneObject* nativeInstance, UINT32* value);
+		static MonoObject* internal_getChild(ScriptSceneObject* nativeInstance, UINT32 idx);
+		static MonoObject* internal_findChild(ScriptSceneObject* nativeInstance, MonoString* name, bool recursive);
+		static MonoArray* internal_findChildren(ScriptSceneObject* nativeInstance, MonoString* name, bool recursive);
+
+		static void internal_getPosition(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getLocalPosition(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
+		static void internal_getLocalRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
+		static void internal_getScale(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getLocalScale(ScriptSceneObject* nativeInstance, Vector3* value);
+
+		static void internal_setPosition(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_setLocalPosition(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_setRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
+		static void internal_setLocalRotation(ScriptSceneObject* nativeInstance, Quaternion* value);
+		static void internal_setLocalScale(ScriptSceneObject* nativeInstance, Vector3* value);
+
+		static void internal_getLocalTransform(ScriptSceneObject* nativeInstance, Matrix4* value);
+		static void internal_getWorldTransform(ScriptSceneObject* nativeInstance, Matrix4* value);
+		static void internal_lookAt(ScriptSceneObject* nativeInstance, Vector3* direction, Vector3* up);
+		static void internal_move(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_moveLocal(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_rotate(ScriptSceneObject* nativeInstance, Quaternion* value);
+		static void internal_roll(ScriptSceneObject* nativeInstance, Radian* value);
+		static void internal_yaw(ScriptSceneObject* nativeInstance, Radian* value);
+		static void internal_pitch(ScriptSceneObject* nativeInstance, Radian* value);
+		static void internal_setForward(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getForward(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getUp(ScriptSceneObject* nativeInstance, Vector3* value);
+		static void internal_getRight(ScriptSceneObject* nativeInstance, Vector3* value);
+
+		static void internal_destroy(ScriptSceneObject* nativeInstance, bool immediate);
+	};
+
+	/** @} */
 }

+ 45 - 46
Source/SBansheeEngine/Include/BsScriptScriptCode.h

@@ -1,47 +1,46 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-#include "BsScriptCode.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ScriptCode.
-	 */
-	class BS_SCR_BE_EXPORT ScriptScriptCode : public TScriptResource<ScriptScriptCode, ScriptCode>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ScriptCode")
-
-	private:
-		friend class ScriptResourceManager;
-		typedef std::pair<WString, WString> FullTypeName;
-
-		ScriptScriptCode(MonoObject* instance, const HScriptCode& scriptCode);
-
-		/**
-		 * @brief	Parses the provided C# code and finds a list of all classes
-		 *			and their namespaces. Nested classes are ignored.
-		 */
-		static Vector<FullTypeName> parseTypes(const WString& code);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoString* text);
-		static MonoString* internal_getText(ScriptScriptCode* thisPtr);
-		static void internal_setText(ScriptScriptCode* thisPtr, MonoString* text);
-		static bool internal_isEditorScript(ScriptScriptCode* thisPtr);
-		static void internal_setEditorScript(ScriptScriptCode* thisPtr, bool value);
-		static MonoArray* internal_getTypes(ScriptScriptCode* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+#include "BsScriptCode.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ScriptCode. */
+	class BS_SCR_BE_EXPORT ScriptScriptCode : public TScriptResource<ScriptScriptCode, ScriptCode>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ScriptCode")
+
+	private:
+		friend class ScriptResourceManager;
+		typedef std::pair<WString, WString> FullTypeName;
+
+		ScriptScriptCode(MonoObject* instance, const HScriptCode& scriptCode);
+
+		/** Parses the provided C# code and finds a list of all classes and their namespaces. Nested classes are ignored. */
+		static Vector<FullTypeName> parseTypes(const WString& code);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoString* text);
+		static MonoString* internal_getText(ScriptScriptCode* thisPtr);
+		static void internal_setText(ScriptScriptCode* thisPtr, MonoString* text);
+		static bool internal_isEditorScript(ScriptScriptCode* thisPtr);
+		static void internal_setEditorScript(ScriptScriptCode* thisPtr, bool value);
+		static MonoArray* internal_getTypes(ScriptScriptCode* thisPtr);
+	};
+
+	/** @} */
 }

+ 37 - 33
Source/SBansheeEngine/Include/BsScriptSerializableArray.h

@@ -1,34 +1,38 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedSerializableArray.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableArray : public ScriptObject<ScriptSerializableArray>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableArray")
-
-		/**
-		 * @brief	Creates a new serializable array interop object from the data in the
-		 *			provided property. Caller must ensure the property references an array.
-		 */
-		static ScriptSerializableArray* create(const ScriptSerializableProperty* parentProperty);
-
-	private:
-		ScriptSerializableArray(MonoObject* instance, const ManagedSerializableTypeInfoArrayPtr& typeInfo);
-
-		ManagedSerializableTypeInfoArrayPtr mTypeInfo;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_createProperty(ScriptSerializableArray* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedSerializableArray. */
+	class BS_SCR_BE_EXPORT ScriptSerializableArray : public ScriptObject<ScriptSerializableArray>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableArray")
+
+		/**
+		 * Creates a new serializable array interop object from the data in the provided property. Caller must ensure the
+		 * property references an array.
+		 */
+		static ScriptSerializableArray* create(const ScriptSerializableProperty* parentProperty);
+
+	private:
+		ScriptSerializableArray(MonoObject* instance, const ManagedSerializableTypeInfoArrayPtr& typeInfo);
+
+		ManagedSerializableTypeInfoArrayPtr mTypeInfo;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_createProperty(ScriptSerializableArray* nativeInstance);
+	};
+
+	/** @} */
 }

+ 38 - 34
Source/SBansheeEngine/Include/BsScriptSerializableDictionary.h

@@ -1,35 +1,39 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedSerializableDictionary.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableDictionary : public ScriptObject<ScriptSerializableDictionary>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableDictionary")
-
-		/**
-		 * @brief	Creates a new serializable dictionary interop object from the data in the
-		 *			provided property. Caller must ensure the property references a System.Collections.Generic.Dictionary.
-		 */
-		static ScriptSerializableDictionary* create(const ScriptSerializableProperty* parentProperty);
-
-	private:
-		ScriptSerializableDictionary(MonoObject* instance, const ManagedSerializableTypeInfoDictionaryPtr& typeInfo);
-
-		ManagedSerializableTypeInfoDictionaryPtr mTypeInfo;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_createKeyProperty(ScriptSerializableDictionary* nativeInstance);
-		static MonoObject* internal_createValueProperty(ScriptSerializableDictionary* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedSerializableDictionary. */
+	class BS_SCR_BE_EXPORT ScriptSerializableDictionary : public ScriptObject<ScriptSerializableDictionary>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableDictionary")
+
+		/**
+		 * Creates a new serializable dictionary interop object from the data in the provided property. Caller must ensure
+		 * the property references a System.Collections.Generic.Dictionary.
+		 */
+		static ScriptSerializableDictionary* create(const ScriptSerializableProperty* parentProperty);
+
+	private:
+		ScriptSerializableDictionary(MonoObject* instance, const ManagedSerializableTypeInfoDictionaryPtr& typeInfo);
+
+		ManagedSerializableTypeInfoDictionaryPtr mTypeInfo;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_createKeyProperty(ScriptSerializableDictionary* nativeInstance);
+		static MonoObject* internal_createValueProperty(ScriptSerializableDictionary* nativeInstance);
+	};
+
+	/** @} */
 }

+ 42 - 39
Source/SBansheeEngine/Include/BsScriptSerializableField.h

@@ -1,40 +1,43 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedSerializableFieldInfo.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableField : public ScriptObject<ScriptSerializableField>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableField")
-
-		/**
-		 * @brief	Creates a new serializable field interop object that references a specific field on
-		 *			a specific object.
-		 *
-		 * @param	parentObject	Instance of the parent object the field belongs to.
-		 * @param	fieldInfo		Information about the field. Caller must ensure the type
-		 *							matches the type of the provided parent object.
-		 */
-		static ScriptSerializableField* create(MonoObject* parentObject, const ManagedSerializableFieldInfoPtr& fieldInfo);
-
-	private:
-		ScriptSerializableField(MonoObject* instance, const ManagedSerializableFieldInfoPtr& fieldInfo);
-
-		ManagedSerializableFieldInfoPtr mFieldInfo;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_createProperty(ScriptSerializableField* nativeInstance);
-		static MonoObject* internal_getValue(ScriptSerializableField* nativeInstance, MonoObject* instance);
-		static void internal_setValue(ScriptSerializableField* nativeInstance, MonoObject* instance, MonoObject* value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedSerializableFieldInfo. */
+	class BS_SCR_BE_EXPORT ScriptSerializableField : public ScriptObject<ScriptSerializableField>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableField")
+
+		/**
+		 * Creates a new serializable field interop object that references a specific field on a specific object.
+		 *
+		 * @param[in]	parentObject	Instance of the parent object the field belongs to.
+		 * @param[in]	fieldInfo		Information about the field. Caller must ensure the type matches the type of the
+		 *								provided parent object.
+		 */
+		static ScriptSerializableField* create(MonoObject* parentObject, const ManagedSerializableFieldInfoPtr& fieldInfo);
+
+	private:
+		ScriptSerializableField(MonoObject* instance, const ManagedSerializableFieldInfoPtr& fieldInfo);
+
+		ManagedSerializableFieldInfoPtr mFieldInfo;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_createProperty(ScriptSerializableField* nativeInstance);
+		static MonoObject* internal_getValue(ScriptSerializableField* nativeInstance, MonoObject* instance);
+		static void internal_setValue(ScriptSerializableField* nativeInstance, MonoObject* instance, MonoObject* value);
+	};
+
+	/** @} */
 }

+ 37 - 33
Source/SBansheeEngine/Include/BsScriptSerializableList.h

@@ -1,34 +1,38 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedSerializableList.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableList : public ScriptObject<ScriptSerializableList>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableList")
-
-		/**
-		 * @brief	Creates a new serializable list interop object from the data in the
-		 *			provided property. Caller must ensure the property references a System.Collections.Generic.List.
-		 */
-		static ScriptSerializableList* create(const ScriptSerializableProperty* parentProperty);
-
-	private:
-		ScriptSerializableList(MonoObject* instance, const ManagedSerializableTypeInfoListPtr& typeInfo);
-
-		ManagedSerializableTypeInfoListPtr mTypeInfo;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_createProperty(ScriptSerializableList* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedSerializableList. */
+	class BS_SCR_BE_EXPORT ScriptSerializableList : public ScriptObject<ScriptSerializableList>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableList")
+
+		/**
+		 * Creates a new serializable list interop object from the data in the provided property. Caller must ensure the
+		 * property references a System.Collections.Generic.List.
+		 */
+		static ScriptSerializableList* create(const ScriptSerializableProperty* parentProperty);
+
+	private:
+		ScriptSerializableList(MonoObject* instance, const ManagedSerializableTypeInfoListPtr& typeInfo);
+
+		ManagedSerializableTypeInfoListPtr mTypeInfo;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_createProperty(ScriptSerializableList* nativeInstance);
+	};
+
+	/** @} */
 }

+ 44 - 43
Source/SBansheeEngine/Include/BsScriptSerializableObject.h

@@ -1,44 +1,45 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ManagedSerializableObject.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableObject : public ScriptObject<ScriptSerializableObject>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableObject")
-
-		/**
-		 * @brief	Creates a new serializable object interop object from the data in the
-		 *			provided property. 
-		 */
-		static ScriptSerializableObject* create(const ScriptSerializableProperty* parentProperty);
-
-	private:
-		ScriptSerializableObject(MonoObject* instance, const ManagedSerializableTypeInfoPtr& typeInfo);
-
-		/**
-		 * @brief	Creates a new interop object for a serializable object from an existing managed instance and
-		 *			an object info structure describing the type of the managed instance.
-		 *
-		 * @param	instance	Managed instance the interop object will reference.
-		 * @param	objInfo		Data about the type of the provided managed instance.
-		 */
-		static ScriptSerializableObject* createInternal(MonoObject* instance, const ManagedSerializableObjectInfoPtr& objInfo);
-
-		ManagedSerializableTypeInfoPtr mTypeInfo;
-		static MonoField* FieldsField;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoReflectionType* type);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ManagedSerializableObject. */
+	class BS_SCR_BE_EXPORT ScriptSerializableObject : public ScriptObject<ScriptSerializableObject>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableObject")
+
+		/**	Creates a new serializable object interop object from the data in the provided property.  */
+		static ScriptSerializableObject* create(const ScriptSerializableProperty* parentProperty);
+
+	private:
+		ScriptSerializableObject(MonoObject* instance, const ManagedSerializableTypeInfoPtr& typeInfo);
+
+		/**
+		 * Creates a new interop object for a serializable object from an existing managed instance and an object info
+		 * structure describing the type of the managed instance.
+		 *
+		 * @param[in]	instance	Managed instance the interop object will reference.
+		 * @param[in]	objInfo		Data about the type of the provided managed instance.
+		 */
+		static ScriptSerializableObject* createInternal(MonoObject* instance, const ManagedSerializableObjectInfoPtr& objInfo);
+
+		ManagedSerializableTypeInfoPtr mTypeInfo;
+		static MonoField* FieldsField;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoReflectionType* type);
+	};
+
+	/** @} */
 }

+ 57 - 54
Source/SBansheeEngine/Include/BsScriptSerializableProperty.h

@@ -1,55 +1,58 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for SerializableProperty (not implemented as its
-	 *			own class, but instead implemented directly in the inerop object). Serializable property
-	 *			wraps all types of serializable entries, whether they're object fields, array entries, dictionary
-	 *			entries, etc. and offers a simple interface to access them.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableProperty : public ScriptObject<ScriptSerializableProperty>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableProperty")
-
-		/**
-		 * @brief	Creates a new managed serializable property object for the specified type.
-		 *
-		 * @param	typeInfo	Data about the type the property references.
-		 */
-		static ScriptSerializableProperty* create(const ManagedSerializableTypeInfoPtr& typeInfo);
-
-		/**
-		 * @brief	Returns the data about the type the property is referencing.
-		 */
-		ManagedSerializableTypeInfoPtr getTypeInfo() const { return mTypeInfo; }
-
-		~ScriptSerializableProperty() {}
-
-	private:
-		ScriptSerializableProperty(MonoObject* instance, const ManagedSerializableTypeInfoPtr& typeInfo);
-
-		ManagedSerializableTypeInfoPtr mTypeInfo;
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance, MonoReflectionType* reflType);
-
-		static MonoObject* internal_createObject(ScriptSerializableProperty* nativeInstance);
-		static MonoObject* internal_createArray(ScriptSerializableProperty* nativeInstance);
-		static MonoObject* internal_createList(ScriptSerializableProperty* nativeInstance);
-		static MonoObject* internal_createDictionary(ScriptSerializableProperty* nativeInstance);
-
-		static MonoObject* internal_createManagedObjectInstance(ScriptSerializableProperty* nativeInstance);
-		static MonoObject* internal_createManagedArrayInstance(ScriptSerializableProperty* nativeInstance, MonoArray* sizes);
-		static MonoObject* internal_createManagedListInstance(ScriptSerializableProperty* nativeInstance, int size);
-		static MonoObject* internal_createManagedDictionaryInstance(ScriptSerializableProperty* nativeInstance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**
+	 * Interop class between C++ & CLR for SerializableProperty (not implemented as its own class, but instead implemented
+	 * directly in the inerop object). Serializable property wraps all types of serializable entries, whether they're
+	 * object fields, array entries, dictionary entries, etc. and offers a simple interface to access them.
+	 */
+	class BS_SCR_BE_EXPORT ScriptSerializableProperty : public ScriptObject<ScriptSerializableProperty>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableProperty")
+
+		/**
+		 * Creates a new managed serializable property object for the specified type.
+		 *
+		 * @param[in]	typeInfo	Data about the type the property references.
+		 */
+		static ScriptSerializableProperty* create(const ManagedSerializableTypeInfoPtr& typeInfo);
+
+		/**	Returns the data about the type the property is referencing. */
+		ManagedSerializableTypeInfoPtr getTypeInfo() const { return mTypeInfo; }
+
+		~ScriptSerializableProperty() {}
+
+	private:
+		ScriptSerializableProperty(MonoObject* instance, const ManagedSerializableTypeInfoPtr& typeInfo);
+
+		ManagedSerializableTypeInfoPtr mTypeInfo;
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance, MonoReflectionType* reflType);
+
+		static MonoObject* internal_createObject(ScriptSerializableProperty* nativeInstance);
+		static MonoObject* internal_createArray(ScriptSerializableProperty* nativeInstance);
+		static MonoObject* internal_createList(ScriptSerializableProperty* nativeInstance);
+		static MonoObject* internal_createDictionary(ScriptSerializableProperty* nativeInstance);
+
+		static MonoObject* internal_createManagedObjectInstance(ScriptSerializableProperty* nativeInstance);
+		static MonoObject* internal_createManagedArrayInstance(ScriptSerializableProperty* nativeInstance, MonoArray* sizes);
+		static MonoObject* internal_createManagedListInstance(ScriptSerializableProperty* nativeInstance, int size);
+		static MonoObject* internal_createManagedDictionaryInstance(ScriptSerializableProperty* nativeInstance);
+	};
+
+	/** @} */
 }

+ 30 - 26
Source/SBansheeEngine/Include/BsScriptSerializableUtility.h

@@ -1,27 +1,31 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Implements external methods for the SerializableUtility managed class.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSerializableUtility : public ScriptObject<ScriptSerializableUtility>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableUtility")
-
-	private:
-		ScriptSerializableUtility(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static MonoObject* internal_Clone(MonoObject* original);
-		static MonoObject* internal_Create(MonoReflectionType* type);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Implements external methods for the SerializableUtility managed class. */
+	class BS_SCR_BE_EXPORT ScriptSerializableUtility : public ScriptObject<ScriptSerializableUtility>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SerializableUtility")
+
+	private:
+		ScriptSerializableUtility(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static MonoObject* internal_Clone(MonoObject* original);
+		static MonoObject* internal_Create(MonoReflectionType* type);
+	};
+
+	/** @} */
 }

+ 36 - 34
Source/SBansheeEngine/Include/BsScriptShader.h

@@ -1,35 +1,37 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsShader.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Shader.
-	 */
-	class BS_SCR_BE_EXPORT ScriptShader : public TScriptResource <ScriptShader, Shader>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Shader")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptShader(MonoObject* instance, const HShader& shader);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_GetShaderParameters(ScriptShader* nativeInstance, MonoArray** outNames, MonoArray** outTypes, 
-			MonoArray** outVisibility);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsShader.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Shader. */
+	class BS_SCR_BE_EXPORT ScriptShader : public TScriptResource <ScriptShader, Shader>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Shader")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptShader(MonoObject* instance, const HShader& shader);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_GetShaderParameters(ScriptShader* nativeInstance, MonoArray** outNames, MonoArray** outTypes, 
+			MonoArray** outVisibility);
+	};
+
+	/** @} */
 }

+ 30 - 28
Source/SBansheeEngine/Include/BsScriptShaderInclude.h

@@ -1,29 +1,31 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsShaderInclude.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for ShaderInclude.
-	 */
-	class BS_SCR_BE_EXPORT ScriptShaderInclude : public TScriptResource <ScriptShaderInclude, ShaderInclude>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ShaderInclude")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptShaderInclude(MonoObject* instance, const HShaderInclude& shaderInclude);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsShaderInclude.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for ShaderInclude. */
+	class BS_SCR_BE_EXPORT ScriptShaderInclude : public TScriptResource <ScriptShaderInclude, ShaderInclude>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ShaderInclude")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptShaderInclude(MonoObject* instance, const HShaderInclude& shaderInclude);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+	};
+
+	/** @} */
 }

+ 46 - 46
Source/SBansheeEngine/Include/BsScriptSpriteTexture.h

@@ -1,47 +1,47 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for SpriteTexture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptSpriteTexture : public TScriptResource<ScriptSpriteTexture, SpriteTexture>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SpriteTexture")
-
-		/**
-		 * @brief	Returns the native internal sprite texture resource.
-		 */
-		static MonoObject* toManaged(const HSpriteTexture& texture);
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptSpriteTexture(MonoObject* instance, const HSpriteTexture& texture);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, MonoObject* texture, Vector2* offset, Vector2* scale);
-		static MonoObject* internal_GetTexture(ScriptSpriteTexture* thisPtr);
-		static void internal_SetTexture(ScriptSpriteTexture* thisPtr, ScriptTexture2D* value);
-		static void internal_GetOffset(ScriptSpriteTexture* thisPtr, Vector2* value);
-		static void internal_SetOffset(ScriptSpriteTexture* thisPtr, Vector2* value);
-		static void internal_GetScale(ScriptSpriteTexture* thisPtr, Vector2* value);
-		static void internal_SetScale(ScriptSpriteTexture* thisPtr, Vector2* value);
-		static UINT32 internal_GetWidth(ScriptSpriteTexture* thisPtr);
-		static UINT32 internal_GetHeight(ScriptSpriteTexture* thisPtr);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for SpriteTexture. */
+	class BS_SCR_BE_EXPORT ScriptSpriteTexture : public TScriptResource<ScriptSpriteTexture, SpriteTexture>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "SpriteTexture")
+
+		/**	Returns the native internal sprite texture resource. */
+		static MonoObject* toManaged(const HSpriteTexture& texture);
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptSpriteTexture(MonoObject* instance, const HSpriteTexture& texture);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, MonoObject* texture, Vector2* offset, Vector2* scale);
+		static MonoObject* internal_GetTexture(ScriptSpriteTexture* thisPtr);
+		static void internal_SetTexture(ScriptSpriteTexture* thisPtr, ScriptTexture2D* value);
+		static void internal_GetOffset(ScriptSpriteTexture* thisPtr, Vector2* value);
+		static void internal_SetOffset(ScriptSpriteTexture* thisPtr, Vector2* value);
+		static void internal_GetScale(ScriptSpriteTexture* thisPtr, Vector2* value);
+		static void internal_SetScale(ScriptSpriteTexture* thisPtr, Vector2* value);
+		static UINT32 internal_GetWidth(ScriptSpriteTexture* thisPtr);
+		static UINT32 internal_GetHeight(ScriptSpriteTexture* thisPtr);
+	};
+
+	/** @} */
 }

+ 50 - 50
Source/SBansheeEngine/Include/BsScriptStringTable.h

@@ -1,51 +1,51 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsStringTable.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for StringTable.
-	 */
-	class BS_SCR_BE_EXPORT ScriptStringTable : public TScriptResource <ScriptStringTable, StringTable>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "StringTable")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptStringTable(MonoObject* instance, const HStringTable& table);
-
-		/**
-		 * @copydoc	ScriptObjectBase::_createManagedInstance
-		 */
-		MonoObject* _createManagedInstance(bool construct) override;
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_CreateInstance(MonoObject* instance);
-		static bool internal_Contains(ScriptStringTable* thisPtr, MonoString* identifier);
-
-		static UINT32 internal_GetNumStrings(ScriptStringTable* thisPtr);
-		static MonoArray* internal_GetIdentifiers(ScriptStringTable* thisPtr);
-
-		static void internal_SetString(ScriptStringTable* thisPtr, MonoString* identifier, Language language, MonoString* value);
-		static void internal_SetStringDefault(ScriptStringTable* thisPtr, MonoString* identifier, MonoString* value);
-
-		static void internal_RemoveString(ScriptStringTable* thisPtr, MonoString* identifier);
-
-		static void internal_GetString(ScriptStringTable* thisPtr, MonoString* identifier, Language language, MonoString** value);
-		static void internal_GetStringDefault(ScriptStringTable* thisPtr, MonoString* identifier, MonoString** value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsStringTable.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for StringTable. */
+	class BS_SCR_BE_EXPORT ScriptStringTable : public TScriptResource <ScriptStringTable, StringTable>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "StringTable")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptStringTable(MonoObject* instance, const HStringTable& table);
+
+		/** @copydoc ScriptObjectBase::_createManagedInstance */
+		MonoObject* _createManagedInstance(bool construct) override;
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_CreateInstance(MonoObject* instance);
+		static bool internal_Contains(ScriptStringTable* thisPtr, MonoString* identifier);
+
+		static UINT32 internal_GetNumStrings(ScriptStringTable* thisPtr);
+		static MonoArray* internal_GetIdentifiers(ScriptStringTable* thisPtr);
+
+		static void internal_SetString(ScriptStringTable* thisPtr, MonoString* identifier, Language language, MonoString* value);
+		static void internal_SetStringDefault(ScriptStringTable* thisPtr, MonoString* identifier, MonoString* value);
+
+		static void internal_RemoveString(ScriptStringTable* thisPtr, MonoString* identifier);
+
+		static void internal_GetString(ScriptStringTable* thisPtr, MonoString* identifier, Language language, MonoString** value);
+		static void internal_GetStringDefault(ScriptStringTable* thisPtr, MonoString* identifier, MonoString** value);
+	};
+
+	/** @} */
 }

+ 36 - 32
Source/SBansheeEngine/Include/BsScriptStringTableManager.h

@@ -1,33 +1,37 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsStringTable.h"
-#include "BsStringTableManager.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for StringTableManager.
-	 */
-	class BS_SCR_BE_EXPORT ScriptStringTableManager : public ScriptObject <ScriptStringTableManager>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "StringTables")
-
-	private:
-		ScriptStringTableManager(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_GetActiveLanguage(Language* value);
-		static void internal_SetActiveLanguage(Language value);
-
-		static MonoObject* internal_GetTable(UINT32 id);
-		static void internal_SetTable(UINT32 id, MonoObject* table);
-		static void internal_RemoveTable(UINT32 id);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsStringTable.h"
+#include "BsStringTableManager.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for StringTableManager. */
+	class BS_SCR_BE_EXPORT ScriptStringTableManager : public ScriptObject <ScriptStringTableManager>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "StringTables")
+
+	private:
+		ScriptStringTableManager(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_GetActiveLanguage(Language* value);
+		static void internal_SetActiveLanguage(Language value);
+
+		static MonoObject* internal_GetTable(UINT32 id);
+		static void internal_SetTable(UINT32 id, MonoObject* table);
+		static void internal_RemoveTable(UINT32 id);
+	};
+
+	/** @} */
 }

+ 50 - 48
Source/SBansheeEngine/Include/BsScriptTexture.h

@@ -1,49 +1,51 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptResource.h"
-#include "BsPixelData.h"
-#include "BsTexture.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Base class for all interop objects referencing textures.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTextureBase : public ScriptResourceBase
-	{
-	protected:
-		friend class ScriptResourceManager;
-
-		ScriptTextureBase(MonoObject* instance)
-			:ScriptResourceBase(instance)
-		{ }
-
-		virtual ~ScriptTextureBase() {}
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for Texture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTexture : public ScriptObject <ScriptTexture, ScriptTextureBase>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture")
-
-	private:
-		ScriptTexture(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_getPixelFormat(ScriptTexture* thisPtr, PixelFormat* value);
-		static void internal_getUsage(ScriptTexture* thisPtr, TextureUsage* value);
-		static void internal_getWidth(ScriptTexture* thisPtr, int* value);
-		static void internal_getHeight(ScriptTexture* thisPtr, int* value);
-		static void internal_getGammaCorrection(ScriptTexture* thisPtr, bool* value);
-		static void internal_getSampleCount(ScriptTexture* thisPtr, int* value);
-		static void internal_getMipmapCount(ScriptTexture* thisPtr, int* value);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptResource.h"
+#include "BsPixelData.h"
+#include "BsTexture.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Base class for all interop objects referencing textures. */
+	class BS_SCR_BE_EXPORT ScriptTextureBase : public ScriptResourceBase
+	{
+	protected:
+		friend class ScriptResourceManager;
+
+		ScriptTextureBase(MonoObject* instance)
+			:ScriptResourceBase(instance)
+		{ }
+
+		virtual ~ScriptTextureBase() {}
+	};
+
+	/**	Interop class between C++ & CLR for Texture. */
+	class BS_SCR_BE_EXPORT ScriptTexture : public ScriptObject <ScriptTexture, ScriptTextureBase>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture")
+
+	private:
+		ScriptTexture(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_getPixelFormat(ScriptTexture* thisPtr, PixelFormat* value);
+		static void internal_getUsage(ScriptTexture* thisPtr, TextureUsage* value);
+		static void internal_getWidth(ScriptTexture* thisPtr, int* value);
+		static void internal_getHeight(ScriptTexture* thisPtr, int* value);
+		static void internal_getGammaCorrection(ScriptTexture* thisPtr, bool* value);
+		static void internal_getSampleCount(ScriptTexture* thisPtr, int* value);
+		static void internal_getMipmapCount(ScriptTexture* thisPtr, int* value);
+	};
+
+	/** @} */
 }

+ 41 - 39
Source/SBansheeEngine/Include/BsScriptTexture2D.h

@@ -1,40 +1,42 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptTexture.h"
-#include "BsScriptObject.h"
-#include "BsTexture.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for a 2D Texture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTexture2D : public TScriptResource<ScriptTexture2D, Texture>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture2D")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptTexture2D(MonoObject* instance, const HTexture& texture);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
-			UINT32 height, TextureUsage usage, UINT32 numSamples, bool hasMipmaps, bool gammaCorrection);
-		static MonoObject* internal_getPixels(ScriptTexture2D* thisPtr, UINT32 mipLevel);
-		static MonoObject* internal_getGPUPixels(ScriptTexture2D* thisPtr, UINT32 mipLevel);
-		static void internal_setPixels(ScriptTexture2D* thisPtr, MonoObject* data, UINT32 mipLevel);
-		static void internal_setPixelsArray(ScriptTexture2D* thisPtr, MonoArray* colors, UINT32 mipLevel);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptTexture.h"
+#include "BsScriptObject.h"
+#include "BsTexture.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for a 2D Texture. */
+	class BS_SCR_BE_EXPORT ScriptTexture2D : public TScriptResource<ScriptTexture2D, Texture>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture2D")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptTexture2D(MonoObject* instance, const HTexture& texture);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
+			UINT32 height, TextureUsage usage, UINT32 numSamples, bool hasMipmaps, bool gammaCorrection);
+		static MonoObject* internal_getPixels(ScriptTexture2D* thisPtr, UINT32 mipLevel);
+		static MonoObject* internal_getGPUPixels(ScriptTexture2D* thisPtr, UINT32 mipLevel);
+		static void internal_setPixels(ScriptTexture2D* thisPtr, MonoObject* data, UINT32 mipLevel);
+		static void internal_setPixelsArray(ScriptTexture2D* thisPtr, MonoArray* colors, UINT32 mipLevel);
+	};
+
+	/** @} */
 }

+ 42 - 38
Source/SBansheeEngine/Include/BsScriptTexture3D.h

@@ -1,39 +1,43 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptTexture.h"
-#include "BsScriptObject.h"
-#include "BsTexture.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for 3D Texture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTexture3D : public TScriptResource <ScriptTexture3D, Texture>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture3D")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptTexture3D(MonoObject* instance, const HTexture& texture);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
-			UINT32 height, UINT32 depth, TextureUsage usage, bool hasMipmaps, bool gammaCorrection);
-		static MonoObject* internal_getPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
-		static MonoObject* internal_getGPUPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
-		static void internal_setPixels(ScriptTexture3D* thisPtr, MonoObject* data, UINT32 mipLevel);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptTexture.h"
+#include "BsScriptObject.h"
+#include "BsTexture.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for 3D Texture. */
+	class BS_SCR_BE_EXPORT ScriptTexture3D : public TScriptResource <ScriptTexture3D, Texture>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture3D")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptTexture3D(MonoObject* instance, const HTexture& texture);
+
+		/**
+		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
+		 */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
+			UINT32 height, UINT32 depth, TextureUsage usage, bool hasMipmaps, bool gammaCorrection);
+		static MonoObject* internal_getPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
+		static MonoObject* internal_getGPUPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
+		static void internal_setPixels(ScriptTexture3D* thisPtr, MonoObject* data, UINT32 mipLevel);
+	};
+
+	/** @} */
 }

+ 40 - 38
Source/SBansheeEngine/Include/BsScriptTextureCube.h

@@ -1,39 +1,41 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptTexture.h"
-#include "BsScriptObject.h"
-#include "BsTexture.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for a cube Texture.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTextureCube : public TScriptResource <ScriptTextureCube, Texture>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "TextureCube")
-
-	private:
-		friend class ScriptResourceManager;
-
-		ScriptTextureCube(MonoObject* instance, const HTexture& texture);
-
-		/**
-		 * @brief	Creates an empty, uninitialized managed instance of the resource interop object.
-		 */
-		static MonoObject* createInstance();
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
-			UINT32 height, TextureUsage usage, UINT32 numSamples, bool hasMipmaps, bool gammaCorrection);
-		static MonoObject* internal_getPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
-		static MonoObject* internal_getGPUPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
-		static void internal_setPixels(ScriptTextureCube* thisPtr, MonoObject* data, UINT32 face, UINT32 mipLevel);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptTexture.h"
+#include "BsScriptObject.h"
+#include "BsTexture.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for a cube Texture. */
+	class BS_SCR_BE_EXPORT ScriptTextureCube : public TScriptResource <ScriptTextureCube, Texture>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "TextureCube")
+
+	private:
+		friend class ScriptResourceManager;
+
+		ScriptTextureCube(MonoObject* instance, const HTexture& texture);
+
+		/**	Creates an empty, uninitialized managed instance of the resource interop object. */
+		static MonoObject* createInstance();
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
+			UINT32 height, TextureUsage usage, UINT32 numSamples, bool hasMipmaps, bool gammaCorrection);
+		static MonoObject* internal_getPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
+		static MonoObject* internal_getGPUPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
+		static void internal_setPixels(ScriptTextureCube* thisPtr, MonoObject* data, UINT32 face, UINT32 mipLevel);
+	};
+
+	/** @} */
 }

+ 33 - 29
Source/SBansheeEngine/Include/BsScriptTime.h

@@ -1,30 +1,34 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Time.
-	 */
-	class BS_SCR_BE_EXPORT ScriptTime : public ScriptObject <ScriptTime>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Time")
-
-	private:
-		ScriptTime(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static float internal_getRealElapsed();
-		static float internal_getElapsed();
-		static float internal_getFrameDelta();
-		static UINT64 internal_getFrameNumber();
-		static UINT64 internal_getPrecise();
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Time. */
+	class BS_SCR_BE_EXPORT ScriptTime : public ScriptObject <ScriptTime>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Time")
+
+	private:
+		ScriptTime(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static float internal_getRealElapsed();
+		static float internal_getElapsed();
+		static float internal_getFrameDelta();
+		static UINT64 internal_getFrameNumber();
+		static UINT64 internal_getPrecise();
+	};
+
+	/** @} */
 }

+ 65 - 83
Source/SBansheeEngine/Include/BsScriptVector.h

@@ -1,84 +1,66 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsVector2.h"
-#include "BsVector3.h"
-#include "BsVector4.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Vector2.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVector2 : public ScriptObject <ScriptVector2>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector2")
-
-		/**
-		 * @brief	Unboxes a boxed managed Vector2 struct and returns
-		 *			the native version of the structure.
-		 */
-		static Vector2 unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native Vector2 struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const Vector2& value);
-
-	private:
-		ScriptVector2(MonoObject* instance);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for Vector3.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVector3 : public ScriptObject <ScriptVector3>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector3")
-
-		/**
-		 * @brief	Unboxes a boxed managed Vector3 struct and returns
-		 *			the native version of the structure.
-		 */
-		static Vector3 unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native Vector3 struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const Vector3& value);
-
-	private:
-		ScriptVector3(MonoObject* instance);
-	};
-
-	/**
-	 * @brief	Interop class between C++ & CLR for Vector4.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVector4 : public ScriptObject <ScriptVector4>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector4")
-
-		/**
-		 * @brief	Unboxes a boxed managed Vector4 struct and returns
-		 *			the native version of the structure.
-		 */
-		static Vector4 unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native Vector4 struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const Vector4& value);
-
-	private:
-		ScriptVector4(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsVector2.h"
+#include "BsVector3.h"
+#include "BsVector4.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Vector2. */
+	class BS_SCR_BE_EXPORT ScriptVector2 : public ScriptObject <ScriptVector2>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector2")
+
+		/** Unboxes a boxed managed Vector2 struct and returns the native version of the structure. */
+		static Vector2 unbox(MonoObject* obj);
+
+		/**	Boxes a native Vector2 struct and returns a managed object containing it. */
+		static MonoObject* box(const Vector2& value);
+
+	private:
+		ScriptVector2(MonoObject* instance);
+	};
+
+	/**	Interop class between C++ & CLR for Vector3. */
+	class BS_SCR_BE_EXPORT ScriptVector3 : public ScriptObject <ScriptVector3>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector3")
+
+		/**	Unboxes a boxed managed Vector3 struct and returns the native version of the structure. */
+		static Vector3 unbox(MonoObject* obj);
+
+		/**	Boxes a native Vector3 struct and returns a managed object containing it. */
+		static MonoObject* box(const Vector3& value);
+
+	private:
+		ScriptVector3(MonoObject* instance);
+	};
+
+	/**	Interop class between C++ & CLR for Vector4. */
+	class BS_SCR_BE_EXPORT ScriptVector4 : public ScriptObject <ScriptVector4>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector4")
+
+		/**	Unboxes a boxed managed Vector4 struct and returns the native version of the structure. */
+		static Vector4 unbox(MonoObject* obj);
+
+		/**	Boxes a native Vector4 struct and returns a managed object containing it. */
+		static MonoObject* box(const Vector4& value);
+
+	private:
+		ScriptVector4(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 31 - 33
Source/SBansheeEngine/Include/BsScriptVector2I.h

@@ -1,34 +1,32 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsVector2I.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for Vector2I.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVector2I : public ScriptObject<ScriptVector2I>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector2I")
-
-		/**
-		 * @brief	Unboxes a boxed managed Vector2I struct and returns
-		 *			the native version of the structure.
-		 */
-		static Vector2I unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native Vector2I struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const Vector2I& value);
-
-	private:
-		ScriptVector2I(MonoObject* instance);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsVector2I.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for Vector2I. */
+	class BS_SCR_BE_EXPORT ScriptVector2I : public ScriptObject<ScriptVector2I>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector2I")
+
+		/**	Unboxes a boxed managed Vector2I struct and returns the native version of the structure. */
+		static Vector2I unbox(MonoObject* obj);
+
+		/**	Boxes a native Vector2I struct and returns a managed object containing it. */
+		static MonoObject* box(const Vector2I& value);
+
+	private:
+		ScriptVector2I(MonoObject* instance);
+	};
+
+	/** @} */
 }

+ 36 - 38
Source/SBansheeEngine/Include/BsScriptVirtualButton.h

@@ -1,39 +1,37 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsInputConfiguration.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for VirtualButton.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVirtualButton : public ScriptObject <ScriptVirtualButton>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualButton")
-
-		/**
-		 * @brief	Unboxes a boxed managed VirtualButton struct and returns
-		 *			the native version of the structure.
-		 */
-		static VirtualButton unbox(MonoObject* obj);
-
-		/**
-		 * @brief	Boxes a native VirtualButton struct and returns
-		 *			a managed object containing it.
-		 */
-		static MonoObject* box(const VirtualButton& value);
-
-	private:
-		ScriptVirtualButton(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-		static UINT32 internal_InitVirtualButton(MonoString* name);
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsInputConfiguration.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for VirtualButton. */
+	class BS_SCR_BE_EXPORT ScriptVirtualButton : public ScriptObject <ScriptVirtualButton>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualButton")
+
+		/**	Unboxes a boxed managed VirtualButton struct and returns the native version of the structure. */
+		static VirtualButton unbox(MonoObject* obj);
+
+		/**	Boxes a native VirtualButton struct and returns a managed object containing it. */
+		static MonoObject* box(const VirtualButton& value);
+
+	private:
+		ScriptVirtualButton(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+		static UINT32 internal_InitVirtualButton(MonoString* name);
+	};
+
+	/** @} */
 }

+ 75 - 75
Source/SBansheeEngine/Include/BsScriptVirtualInput.h

@@ -1,76 +1,76 @@
-//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
-//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#pragma once
-
-#include "BsScriptEnginePrerequisites.h"
-#include "BsScriptObject.h"
-#include "BsInputConfiguration.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Interop class between C++ & CLR for VirtualInput.
-	 */
-	class BS_SCR_BE_EXPORT ScriptVirtualInput : public ScriptObject<ScriptVirtualInput>
-	{
-	public:
-		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualInput")
-
-		/**
-		 * @brief	Must be called on library load. Hooks up necessary callbacks.
-		 */
-		static void startUp();
-
-		/**
-		 * @brief	Must be called before library shutdown. Releases previously hooked callbacks.
-		 */
-		static void shutDown();
-	private:
-		/**
-		 * @brief	Triggered whenever a virtual button is pressed.
-		 *
-		 * @param	btn			Virtual button that was pressed.
-		 * @param	deviceIdx	Index of the device the button was pressed on.
-		 */
-		static void onButtonDown(const VirtualButton& btn, UINT32 deviceIdx);
-
-		/**
-		 * @brief	Triggered whenever a virtual button is released.
-		 *
-		 * @param	btn			Virtual button that was released.
-		 * @param	deviceIdx	Index of the device the button was released on.
-		 */
-		static void onButtonUp(const VirtualButton& btn, UINT32 deviceIdx);
-
-		/**
-		 * @brief	Triggered every frame while a virtual button is held down.
-		 *
-		 * @param	btn			Virtual button that is being held.
-		 * @param	deviceIdx	Index of the device the button is held.
-		 */
-		static void onButtonHeld(const VirtualButton& btn, UINT32 deviceIdx);
-
-		static HEvent OnButtonPressedConn;
-		static HEvent OnButtonReleasedConn;
-		static HEvent OnButtonHeldConn;
-
-		ScriptVirtualInput(MonoObject* instance);
-
-		/************************************************************************/
-		/* 								CLR HOOKS						   		*/
-		/************************************************************************/
-
-		static MonoObject* internal_getKeyConfig();
-		static void internal_setKeyConfig(MonoObject* keyConfig);
-		static bool internal_isButtonHeld(VirtualButton* btn, UINT32 deviceIdx);
-		static bool internal_isButtonDown(VirtualButton* btn, UINT32 deviceIdx);
-		static bool internal_isButtonUp(VirtualButton* btn, UINT32 deviceIdx);
-		static float internal_getAxisValue(VirtualAxis* axis, UINT32 deviceIdx);
-
-		typedef void(__stdcall *OnButtonEventThunkDef) (MonoObject*, UINT32, MonoException**);
-
-		static OnButtonEventThunkDef OnButtonUpThunk;
-		static OnButtonEventThunkDef OnButtonDownThunk;
-		static OnButtonEventThunkDef OnButtonHeldThunk;
-	};
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsInputConfiguration.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup ScriptInteropEngine
+	 *  @{
+	 */
+
+	/**	Interop class between C++ & CLR for VirtualInput. */
+	class BS_SCR_BE_EXPORT ScriptVirtualInput : public ScriptObject<ScriptVirtualInput>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "VirtualInput")
+
+		/**	Must be called on library load. Hooks up necessary callbacks. */
+		static void startUp();
+
+		/**	Must be called before library shutdown. Releases previously hooked callbacks. */
+		static void shutDown();
+	private:
+		/**
+		 * Triggered whenever a virtual button is pressed.
+		 *
+		 * @param[in]	btn			Virtual button that was pressed.
+		 * @param[in]	deviceIdx	Index of the device the button was pressed on.
+		 */
+		static void onButtonDown(const VirtualButton& btn, UINT32 deviceIdx);
+
+		/**
+		 * Triggered whenever a virtual button is released.
+		 *
+		 * @param[in]	btn			Virtual button that was released.
+		 * @param[in]	deviceIdx	Index of the device the button was released on.
+		 */
+		static void onButtonUp(const VirtualButton& btn, UINT32 deviceIdx);
+
+		/**
+		 * Triggered every frame while a virtual button is held down.
+		 *
+		 * @param[in]	btn			Virtual button that is being held.
+		 * @param[in]	deviceIdx	Index of the device the button is held.
+		 */
+		static void onButtonHeld(const VirtualButton& btn, UINT32 deviceIdx);
+
+		static HEvent OnButtonPressedConn;
+		static HEvent OnButtonReleasedConn;
+		static HEvent OnButtonHeldConn;
+
+		ScriptVirtualInput(MonoObject* instance);
+
+		/************************************************************************/
+		/* 								CLR HOOKS						   		*/
+		/************************************************************************/
+
+		static MonoObject* internal_getKeyConfig();
+		static void internal_setKeyConfig(MonoObject* keyConfig);
+		static bool internal_isButtonHeld(VirtualButton* btn, UINT32 deviceIdx);
+		static bool internal_isButtonDown(VirtualButton* btn, UINT32 deviceIdx);
+		static bool internal_isButtonUp(VirtualButton* btn, UINT32 deviceIdx);
+		static float internal_getAxisValue(VirtualAxis* axis, UINT32 deviceIdx);
+
+		typedef void(__stdcall *OnButtonEventThunkDef) (MonoObject*, UINT32, MonoException**);
+
+		static OnButtonEventThunkDef OnButtonUpThunk;
+		static OnButtonEventThunkDef OnButtonDownThunk;
+		static OnButtonEventThunkDef OnButtonHeldThunk;
+	};
+
+	/** @} */
 }