BearishSun před 10 roky
rodič
revize
1f31bf9385

+ 17 - 17
BansheeCore/Include/BsPixelData.h

@@ -8,7 +8,7 @@
 namespace BansheeEngine
 {
 	/**
-	 * @brief	The pixel format usable by images, textures and render surfaces.
+	 * @brief	Pixel formats usable by images, textures and render surfaces.
 	 */
     enum PixelFormat
     {
@@ -66,35 +66,35 @@ namespace BansheeEngine
 		PF_BC6H = 19,
 		// Format storing RGB with optional alpha channel. Similar to BC1/BC2/BC3 formats but with higher quality and higher decompress overhead. 8 bits per pixel.
 		PF_BC7 = 20,
-		// 16-bit pixel format, 16 bits (float) for red
+		// 16-bit pixel format, 16 bits (float) for red.
         PF_FLOAT16_R = 21,
-		// 32-bit, 2-channel s10e5 floating point pixel format, 16-bit red, 16-bit green
+		// 32-bit, 2-channel s10e5 floating point pixel format, 16-bit red, 16-bit green.
 		PF_FLOAT16_RG = 22,
-        // 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue
+        // 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue.
         PF_FLOAT16_RGB = 23,
-        // 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha
+        // 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha.
         PF_FLOAT16_RGBA = 24,
-		// 32-bit pixel format, 32 bits (float) for red
+		// 32-bit pixel format, 32 bits (float) for red.
         PF_FLOAT32_R = 25,
-		// 64-bit, 2-channel floating point pixel format, 32-bit red, 32-bit green
+		// 64-bit, 2-channel floating point pixel format, 32-bit red, 32-bit green.
 		PF_FLOAT32_RG = 26,
-        // 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue
+        // 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue.
         PF_FLOAT32_RGB = 27,
-        // 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha
+        // 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha.
         PF_FLOAT32_RGBA = 28,
-		// Depth stencil format, 32bit depth, 8bit stencil + 24 unused
+		// Depth stencil format, 32bit depth, 8bit stencil + 24 unused.
 		PF_D32_S8X24 = 29,
-		// Depth stencil fomrat, 24bit depth + 8bit stencil
+		// Depth stencil fomrat, 24bit depth + 8bit stencil.
 		PF_D24S8 = 30,
-		// Depth format, 32bits
+		// Depth format, 32bits.
 		PF_D32 = 31,
-		// Depth format, 16bits
+		// Depth format, 16bits.
 		PF_D16 = 32,
 		// 32-bit float format, 11 bits (float) for red, 11 bits (float) for green, 10 bits (float) for blue. Framebuffer only format, not for CPU use.
 		PF_FLOAT_R11G11B10 = 33,
 		// 32-bit unsigned normalized format, 10 bits (float) for red, 10 bits (float) for green, 10 bits (float) for blue, and two bits for alpha. Framebuffer only format, not for CPU use.
 		PF_UNORM_R10G10B10A2 = 34,
-		// Number of pixel formats currently defined
+		// Number of pixel formats currently defined.
         PF_COUNT = 35
     };
 	typedef Vector<PixelFormat> PixelFormatList;
@@ -156,7 +156,7 @@ namespace BansheeEngine
 		 *			where each pixel is of the specified pixel format. Extent offsets are also stored, but are not used
 		 *			internally.
 		 */
-		PixelData(const PixelVolume &extents, PixelFormat pixelFormat)
+		PixelData(const PixelVolume& extents, PixelFormat pixelFormat)
 			:mExtents(extents), mFormat(pixelFormat)
 		{
 			setConsecutive();
@@ -366,7 +366,7 @@ namespace BansheeEngine
 		/**
 		 * @brief	Returns the needed size of the internal buffer, in bytes.
 		 */
-		UINT32 getInternalBufferSize() const;
+		UINT32 getInternalBufferSize() const override;
 
 	private:
 		PixelVolume mExtents;
@@ -380,6 +380,6 @@ namespace BansheeEngine
 	public:
 		friend class PixelDataRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
     };
 }

+ 18 - 18
BansheeCore/Include/BsPixelUtil.h

@@ -6,7 +6,7 @@
 namespace BansheeEngine 
 {
 	/**
-	 * @brief	Available types of texture compression quality.
+	 * @brief	Types of texture compression quality.
 	 */
 	enum class CompressionQuality
 	{
@@ -17,13 +17,13 @@ namespace BansheeEngine
 	};
 
 	/**
-	 * @brief	Specifies what is alpha channel used for in the texture.
+	 * @brief	Mode of the alpha channel in a texture.
 	 */
 	enum class AlphaMode
 	{
-		None,
-		Transparency,
-		Premultiplied
+		None, /*< Texture has no alpha values. */
+		Transparency, /*< Alpha is in the separate transparency channel. */
+		Premultiplied /*< Alpha values have been pre-multiplied with the color values. */
 	};
 
 	/**
@@ -51,11 +51,11 @@ namespace BansheeEngine
 	 */
 	struct CompressionOptions
 	{
-		PixelFormat format = PF_BC1;
-		AlphaMode alphaMode = AlphaMode::None;
-		bool isNormalMap = false;
-		bool isSRGB = false;
-		CompressionQuality quality = CompressionQuality::Normal;
+		PixelFormat format = PF_BC1; /*< Format to compress to. Must be a format containing compressed data. */
+		AlphaMode alphaMode = AlphaMode::None; /*< Controls how to (and if) to compress the alpha channel. */
+		bool isNormalMap = false; /*< Determines does the input data represent a normal map. */
+		bool isSRGB = false; /*< Determines has the input data been gamma corrected. */
+		CompressionQuality quality = CompressionQuality::Normal; /*< Compressed image quality. Better compression might take longer to execute but will generate better results. */
 	};
 
 	/**
@@ -63,10 +63,10 @@ namespace BansheeEngine
 	 */
 	struct MipMapGenOptions
 	{
-		MipMapFilter filter = MipMapFilter::Box;
-		MipMapWrapMode wrapMode = MipMapWrapMode::Mirror;
-		bool isNormalMap = false;
-		bool normalizeMipmaps = false;
+		MipMapFilter filter = MipMapFilter::Box; /*< Filter to use when downsamping input data. */
+		MipMapWrapMode wrapMode = MipMapWrapMode::Mirror; /*< Determines how to downsample pixels on borders. */
+		bool isNormalMap = false; /*< Determines does the input data represent a normal map. */
+		bool normalizeMipmaps = false; /*< Should the downsampled values be re-normalized. Only relevant for mip-maps representing normal maps. */
 	};
 
 	/**
@@ -76,12 +76,12 @@ namespace BansheeEngine
 	{
     public:
 		/**
-		 * @brief	A list of filtering types to use when scaling images.
+		 * @brief	Filtering types to use when scaling images.
 		 */
 		enum Filter
 		{
-			FILTER_NEAREST,
-			FILTER_LINEAR
+			FILTER_NEAREST, /*< No filtering is performed and nearest existing value is used. */
+			FILTER_LINEAR /*< Box filter is applied, averaging nearby pixels. */
 		};
 
 		/**
@@ -97,7 +97,7 @@ namespace BansheeEngine
         static UINT32 getNumElemBits( PixelFormat format );
 
 		/**
-		 * @brief	Returns the size of the memory region of the provided size and the pixel format.
+		 * @brief	Returns the size of the memory region required to hold pixels of the provided size ana format.
 		 */
 		static UINT32 getMemorySize(UINT32 width, UINT32 height, UINT32 depth, PixelFormat format);
 		

+ 1 - 2
BansheeCore/Include/BsPixelVolume.h

@@ -5,8 +5,7 @@
 namespace BansheeEngine
 {
 	/**
-	 * @brief	Volume of pixels used for referencing a part of
-	 * 			a texture.
+	 * @brief	Represents a 3D region of pixels used for referencing pixel data.
 	 */
 	struct BS_CORE_EXPORT PixelVolume
 	{

+ 7 - 4
BansheeCore/Include/BsPrefab.h

@@ -17,8 +17,8 @@ namespace BansheeEngine
 		Prefab();
 
 		/**
-		 * @brief	Creates a new prefab from the provided scene object. The scene object
-		 *			must not have a prefab link already. After the prefab is created the
+		 * @brief	Creates a new prefab from the provided scene object. If the scene object
+		 *			has an existing prefab link it will be broken. After the prefab is created the
 		 *			scene object will be automatically linked to it.
 		 */
 		static HPrefab create(const HSceneObject& sceneObject);
@@ -37,9 +37,12 @@ namespace BansheeEngine
 		void update(const HSceneObject& sceneObject);
 
 		/**
-		 * @brief	Returns a reference to the internal prefab hierarchy.
+		 * @brief	Returns a reference to the internal prefab hierarchy. Returned hierarchy is not instantiated and cannot
+		 *			be interacted with in a manner you would with normal scene objects.
+		 *
+		 * @note	Internal method.
 		 */
-		HSceneObject getRoot() const { return mRoot; }
+		HSceneObject _getRoot() const { return mRoot; }
 
 		/**
 		 * @brief	Returns a hash value that can be used for determining if a prefab changed

+ 4 - 4
BansheeCore/Include/BsRenderTarget.h

@@ -55,7 +55,7 @@ namespace BansheeEngine
 
 		/**
 		 * @brief	Gets the number of samples used for multisampling.
-		 *			(0 if multisampling is not used).
+		 *			(0 or 1 if multisampling is not used).
 		 */
 		UINT32 getMultisampleCount() const { return mMultisampleCount; }
 
@@ -88,8 +88,8 @@ namespace BansheeEngine
 		bool isActive() const { return mActive; }
 
 		/**
-		 * @brief	Returns render target priority. Targets with higher priority will be 
-		 *			rendered before ones with lower priority.
+		 * @brief	Controls in what order is the render target rendered to compared to other render targets.
+		 *			Targets with higher priority will be rendered before ones with lower priority.
 		 */
 		INT32 getPriority() const { return mPriority; }
 
@@ -179,7 +179,7 @@ namespace BansheeEngine
 
 	/**
 	 * @brief	Render target is a frame buffer or a texture that the render
-	 *			system renders to.
+	 *			system renders the scene to.
 	 *
 	 * @note	Sim thread unless noted otherwise. Retrieve core implementation from getCore() 
 	 *			for core thread only functionality.

+ 1 - 1
BansheeCore/Source/BsPrefabUtility.cpp

@@ -203,7 +203,7 @@ namespace BansheeEngine
 
 				HPrefab prefabLink = static_resource_cast<Prefab>(gResources().loadFromUUID(current->getPrefabLink(), false, false));
 				if (prefabLink != nullptr)
-					current->mPrefabDiff = PrefabDiff::create(prefabLink->getRoot(), current->getHandle());
+					current->mPrefabDiff = PrefabDiff::create(prefabLink->_getRoot(), current->getHandle());
 			}
 
 			UINT32 childCount = current->getNumChildren();

+ 1 - 1
BansheeEditor/Source/BsEditorTestSuite.cpp

@@ -663,7 +663,7 @@ namespace BansheeEngine
 			cmp3 = so3->addComponent<TestComponentD>();
 		}
 
-		SPtr<PrefabDiff> prefabDiff = PrefabDiff::create(prefab->getRoot(), root);
+		SPtr<PrefabDiff> prefabDiff = PrefabDiff::create(prefab->_getRoot(), root);
 
 		prefab = gResources().load<Prefab>(prefabPath);
 		HSceneObject newRoot = prefab->instantiate();

+ 1 - 1
BansheeEngine/Include/BsPlainText.h

@@ -6,7 +6,7 @@
 namespace BansheeEngine
 {
 	/**
-	* @brief	Raw text resource.
+	* @brief	A resource containing plain text data.
 	*/
 	class BS_EXPORT PlainText : public Resource
 	{

+ 1 - 1
BansheeEngine/Include/BsProfilerOverlay.h

@@ -11,7 +11,7 @@ namespace BansheeEngine
 	class ProfilerOverlayInternal;
 
 	/**
-	 * @brief	Types of profiler overlay.
+	 * @brief	Determines type of data to display on the profiler overlay.
 	 */
 	enum class ProfilerOverlayType
 	{

+ 5 - 3
BansheeEngine/Include/BsRenderable.h

@@ -21,7 +21,7 @@ namespace BansheeEngine
 	/**
 	 * @brief	Renderable represents any visible object in the scene. It has a mesh,
 	 *			bounds and a set of materials. Renderer will render any Renderable objects
-	 *			visible by the camera.
+	 *			visible by a camera.
 	 */
 	template<bool Core>
 	class BS_EXPORT TRenderable
@@ -63,7 +63,8 @@ namespace BansheeEngine
 		void setMaterial(const MaterialType& material);
 
 		/**
-		 * @brief	Sets the layer bitfield. Renderable layer must match camera layer
+		 * @brief	Sets the layer bitfield that controls whether a renderable is considered 
+		 *			visible in a specific camera. Renderable layer must match camera layer
 		 *			in order for the camera to render the component.
 		 */
 		void setLayer(UINT64 layer);
@@ -85,7 +86,8 @@ namespace BansheeEngine
 		void setIsActive(bool active);
 
 		/**
-		 * @brief	Gets the layer bitfield. Renderable layer must match camera layer
+		 * @brief	Gets the layer bitfield that controls whether a renderable is considered 
+		 *			visible in a specific camera. Renderable layer must match camera layer
 		 *			in order for the camera to render the component.
 		 */
 		UINT64 getLayer() const { return mLayer; }

+ 32 - 0
MBansheeEngine/PathEx.cs

@@ -2,18 +2,39 @@
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Contains helper methods dealing with file and directory paths, extending the functionality provided by 
+    // System.IO.Path.
+    /// </summary>
     public static class PathEx
     {
+        /// <summary>
+        /// Checks if two paths are equal.
+        /// </summary>
+        /// <param name="a">First path.</param>
+        /// <param name="b">Second path.</param>
+        /// <returns>True if both paths point to the same place.</returns>
         public static bool Compare(string a, string b)
         {
             return Path.GetFullPath(a) == Path.GetFullPath(b);
         }
 
+        /// <summary>
+        /// Checks if one path is part of an another path.
+        /// </summary>
+        /// <param name="path">Path to check if it's part of <paramref name="parent"/>.</param>
+        /// <param name="parent">Parent that might contain <paramref name="path"/>.</param>
+        /// <returns>True if <paramref name="parent"/> contains <paramref name="path"/>.</returns>
         public static bool IsPartOf(string path, string parent)
         {
             return Path.GetFullPath(path).StartsWith(Path.GetFullPath(parent));
         }
 
+        /// <summary>
+        /// Returns the last entry in the path, regardless if that is a directory or a filename.
+        /// </summary>
+        /// <param name="path">Path to get the tail of.</param>
+        /// <returns>Tail of the path. This might be a directory or a filename.</returns>
         public static string GetTail(string path)
         {
             if (string.IsNullOrEmpty(path))
@@ -28,6 +49,12 @@ namespace BansheeEngine
             return Path.GetFileName(path);
         }
 
+        /// <summary>
+        /// Returns the parent of the provided path.
+        /// </summary>
+        /// <param name="path">Path to return the parent of.</param>
+        /// <returns>Parent of the path. This usually means the folder containing the file or folder in the current path.
+        /// </returns>
         public static string GetParent(string path)
         {
             string tail = GetTail(path);
@@ -35,6 +62,11 @@ namespace BansheeEngine
             return path.Remove(path.Length - tail.Length);
         }
 
+        /// <summary>
+        /// Checks if the provided name can be used as a file name.
+        /// </summary>
+        /// <param name="name">Name to check.</param>
+        /// <returns>True if the name can be used as a file name.</returns>
         public static bool IsValidFileName(string name)
         {
             return !string.IsNullOrWhiteSpace(name) &&

+ 212 - 28
MBansheeEngine/PixelData.cs

@@ -7,61 +7,121 @@ using System.Text;
 
 namespace BansheeEngine
 {
-    // Do not modify, IDs must match C++ enum PixelFormat
-    public enum PixelFormat
+    /// <summary>
+    /// Pixel formats usable by images, textures and render surfaces.
+    /// </summary>
+    public enum PixelFormat // Note: Must match C++ enum PixelFormat
     {
-        // 8-bit pixel format, all bits red.
+        /// <summary>
+        /// 8-bit pixel format, all bits red.
+        /// </summary>
         R8 = 1,
-        // 2 byte pixel format, 1 byte red, 1 byte green.
+        /// <summary>
+        /// 2 byte pixel format, 1 byte red, 1 byte green.
+        /// </summary>
         R8G8 = 2,
-        // 24-bit pixel format, 8 bits for red, green and blue.
+        /// <summary>
+        /// 24-bit pixel format, 8 bits for red, green and blue.
+        /// </summary>
         R8G8B8 = 3,
-        // 32-bit pixel format, 8 bits for red, green, blue and alpha.
+        /// <summary>
+        /// 32-bit pixel format, 8 bits for red, green, blue and alpha.
+        /// </summary>
         R8G8B8A8 = 8,
-        // DXT1/BC1 format containing opaque RGB or 1-bit alpha RGB. 4 bits per pixel.
+        /// <summary>
+        /// DXT1/BC1 format containing opaque RGB or 1-bit alpha RGB. 4 bits per pixel.
+        /// </summary>
         BC1 = 13,
-        // DXT3/BC2 format containing RGB with premultiplied alpha. 4 bits per pixel.
+        /// <summary>
+        /// DXT3/BC2 format containing RGB with premultiplied alpha. 4 bits per pixel.
+        /// </summary>
         BC1a = 14,
-        // DXT3/BC2 format containing RGB with explicit alpha. 8 bits per pixel.
+        /// <summary>
+        /// DXT3/BC2 format containing RGB with explicit alpha. 8 bits per pixel.
+        /// </summary>
         BC2 = 15,
-        // DXT5/BC2 format containing RGB with explicit alpha. 8 bits per pixel. Better alpha gradients than BC2.
+        /// <summary>
+        /// DXT5/BC2 format containing RGB with explicit alpha. 8 bits per pixel. Better alpha gradients than BC2.
+        /// </summary>
         BC3 = 16,
-        // One channel compressed format. 4 bits per pixel.
+        /// <summary>
+        /// One channel compressed format. 4 bits per pixel.
+        /// </summary>
         BC4 = 17,
-        // Two channel compressed format. 8 bits per pixel.
+        /// <summary>
+        /// Two channel compressed format. 8 bits per pixel.
+        /// </summary>
         BC5 = 18,
-        // Format storing RGB in half (16-bit) floating point format usable for HDR. 8 bits per pixel.
+        /// <summary>
+        /// Format storing RGB in half (16-bit) floating point format usable for HDR. 8 bits per pixel.
+        /// </summary>
         BC6H = 19,
-        // Format storing RGB with optional alpha channel. Similar to BC1/BC2/BC3 formats but with higher quality and higher decompress overhead. 8 bits per pixel.
+        /// <summary>
+        /// Format storing RGB with optional alpha channel. Similar to BC1/BC2/BC3 formats but with higher quality and 
+        /// higher decompress overhead. 8 bits per pixel.
+        /// </summary>
         BC7 = 20,
-        // 16-bit pixel format, 16 bits (float) for red
+        /// <summary>
+        /// 16-bit pixel format, 16 bits (float) for red.
+        /// </summary>
         Float16_R = 21,
-        // 32-bit, 2-channel s10e5 floating point pixel format, 16-bit red, 16-bit green
+        /// <summary>
+        /// 32-bit, 2-channel s10e5 floating point pixel format, 16-bit red, 16-bit green.
+        /// </summary>
         Float16_RG = 22,
-        // 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue
+        /// <summary>
+        /// 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue.
+        /// </summary>
         Float16_RGB = 23,
-        // 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha
+        /// <summary>
+        /// 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits 
+        /// (float) for alpha.
+        /// </summary>
         Float16_RGBA = 24,
-        // 32-bit pixel format, 32 bits (float) for red
+        /// <summary>
+        /// 32-bit pixel format, 32 bits (float) for red.
+        /// </summary>
         Float32_R = 25,
-        // 64-bit, 2-channel floating point pixel format, 32-bit red, 32-bit green
+        /// <summary>
+        /// 64-bit, 2-channel floating point pixel format, 32-bit red, 32-bit green.
+        /// </summary>
         Float32_RG = 26,
-        // 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue
+        /// <summary>
+        /// 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue.
+        /// </summary>
         Float32_RGB = 27,
-        // 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha
+        /// <summary>
+        /// 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 
+        /// 32 bits (float) for alpha.
+        /// </summary>
         Float32_RGBA = 28,
-        // Depth stencil format, 32bit depth, 8bit stencil + 24 unused
+        /// <summary>
+        /// Depth stencil format, 32bit depth, 8bit stencil + 24 unused.
+        /// </summary>
         D32_S8X24 = 29,
-        // Depth stencil fomrat, 24bit depth + 8bit stencil
+        /// <summary>
+        /// Depth stencil fomrat, 24bit depth + 8bit stencil.
+        /// </summary>
         D24S8 = 30,
-        // Depth format, 32bits
+        /// <summary>
+        /// Depth format, 32bits.
+        /// </summary>
         D32 = 31,
-        // Depth format, 16bits
+        /// <summary>
+        /// Depth format, 16bits.
+        /// </summary>
         D16 = 32
     };
 
+    /// <summary>
+    /// A buffer describing a volume (3D), image (2D) or line (1D) of pixels in memory. Pixels are stored as a succession 
+    /// of "depth" slices, each containing "height" rows of "width" pixels.
+    /// </summary>
     public sealed class PixelData : ScriptObject
     {
+        /// <summary>
+        /// Width, height and depth of the pixels this object is capable of holding.
+        /// </summary>
         public PixelVolume Extents
         {
             get
@@ -72,6 +132,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Format of the pixels in the buffer.
+        /// </summary>
         public PixelFormat Format
         {
             get
@@ -82,6 +145,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Returns number of bytes per a row of pixels.
+        /// </summary>
         public int RawRowPitch
         {
             get
@@ -92,6 +158,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Returns number of bytes per a 2D slice/plane of pixels.
+        /// </summary>
         public int RawSlicePitch
         {
             get
@@ -102,6 +171,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Returns total number of bytes used by all the pixels.
+        /// </summary>
         public int RawSize
         {
             get
@@ -112,6 +184,10 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Checks are the pixels in the buffer consecutive. If this is false then the buffer has padding and you should
+        /// check <see cref="RawRowPitch"/> and <see cref="RawSlicePitch"/> when accessing it directly.
+        /// </summary>
         public bool RawIsConsecutive
         {
             get
@@ -122,25 +198,52 @@ namespace BansheeEngine
             }
         }
 
-        // Only for use by native code
+        /// <summary>
+        /// Constructor for internal use by the runtime.
+        /// </summary>
         private PixelData()
         { }
 
+        /// <summary>
+        /// Creates a new pixel data buffer capable of storing the specified amount of pixels.
+        /// </summary>
+        /// <param name="volume">Width, height and depth determining number of pixels to store.</param>
+        /// <param name="format">Format of individual pixels.</param>
         public PixelData(PixelVolume volume, PixelFormat format = PixelFormat.R8G8B8A8)
         {
             Internal_CreateInstance(this, volume, format);
         }
 
+        /// <summary>
+        /// Creates a new 2D pixel data buffer capable of storing the specified amount of pixels.
+        /// </summary>
+        /// <param name="width">Number of pixels in each row.</param>
+        /// <param name="height">Number of pixels in each column.</param>
+        /// <param name="format">Format of individual pixels.</param>
         public PixelData(int width, int height, PixelFormat format = PixelFormat.R8G8B8A8)
         {
             Internal_CreateInstance(this, new PixelVolume(0, 0, width, height), format);
         }
 
+        /// <summary>
+        /// Creates a new 3D pixel data buffer capable of storing the specified amount of pixels.
+        /// </summary>
+        /// <param name="width">Number of pixels in each row.</param>
+        /// <param name="height">Number of pixels in each column.</param>
+        /// <param name="depth">Number of 2D slices.</param>
+        /// <param name="format">Format of individual pixels.</param>
         public PixelData(int width, int height, int depth, PixelFormat format = PixelFormat.R8G8B8A8)
         {
             Internal_CreateInstance(this, new PixelVolume(0, 0, 0, width, height, depth), format);
         }
 
+        /// <summary>
+        /// Returns a pixel at the specified location in the buffer.
+        /// </summary>
+        /// <param name="x">X coordinate of the pixel.</param>
+        /// <param name="y">Y coordinate of the pixel.</param>
+        /// <param name="z">Z coordinate of the pixel.</param>
+        /// <returns>Value of the pixel, or undefined value if coordinates are out of range.</returns>
         public Color GetPixel(int x, int y, int z = 0)
         {
             Color pixel;
@@ -148,11 +251,23 @@ namespace BansheeEngine
             return pixel;
         }
 
+        /// <summary>
+        /// Sets a pixel at the specified location in the buffer.
+        /// </summary>
+        /// <param name="color">Color of the pixel to set.</param>
+        /// <param name="x">X coordinate of the pixel.</param>
+        /// <param name="y">Y coordinate of the pixel.</param>
+        /// <param name="z">Z coordinate of the pixel.</param>
         public void SetPixel(Color color, int x, int y, int z = 0)
         {
             Internal_SetPixel(mCachedPtr, x, y, z, color);
         }
 
+        /// <summary>
+        /// Returns values of all pixels. 
+        /// </summary>
+        /// <returns>All pixels in the buffer ordered consecutively. Pixels are stored as a succession of "depth" slices, 
+        ///          each containing "height" rows of "width" pixels.</returns>
         public Color[] GetPixels()
         {
             Color[] pixels;
@@ -160,11 +275,21 @@ namespace BansheeEngine
             return pixels;
         }
 
+        /// <summary>
+        /// Sets all pixels in the buffer. Caller must ensure that number of pixels match the extends of the buffer.
+        /// </summary>
+        /// <param name="pixels">All pixels to set ordered consecutively. Pixels are stored as a succession of "depth" 
+        ///                      slices, each containing "height" rows of "width" pixels.</param>
         public void SetPixels(Color[] pixels)
         {
             Internal_SetPixels(mCachedPtr, pixels);
         }
 
+        /// <summary>
+        /// Returns all pixels in the buffer as raw bytes.
+        /// </summary>
+        /// <returns>Raw pixel bytes. It is up to the caller to interpret the pixel format and account for potential 
+        ///          row and slice pitch values.</returns>
         public byte[] GetRawPixels()
         {
             byte[] pixels;
@@ -172,6 +297,11 @@ namespace BansheeEngine
             return pixels;
         }
 
+        /// <summary>
+        /// Sets all pixels in the buffer as raw bytes.
+        /// </summary>
+        /// <param name="pixels">Raw pixel bytes. It is up to the caller to set the proper pixel format and account for 
+        ///                      potential row and slice pitch values.</param>
         public void SetRawPixels(byte[] pixels)
         {
             Internal_SetRawPixels(mCachedPtr, pixels);
@@ -217,21 +347,66 @@ namespace BansheeEngine
         private static extern void Internal_GetIsConsecutive(IntPtr thisPtr, out bool value);
     }
 
+    /// <summary>
+    /// Represents a 3D region of pixels used for referencing pixel data.
+    /// </summary>
     [StructLayout(LayoutKind.Sequential)]
-    public struct PixelVolume
+    public struct PixelVolume // Note: Must match C++ class PixelVolume
     {
         private int left, top, right, bottom, front, back;
 
+        /// <summary>
+        /// Returns the left border of the pixel region (minimal X).
+        /// </summary>
         public int Left { get { return left; } }
+
+        /// <summary>
+        /// Returns the right border of the pixel region (maximal X).
+        /// </summary>
         public int Right { get { return right; } }
+
+        /// <summary>
+        /// Returns the top border of the pixel region (minimal Y).
+        /// </summary>
         public int Top { get { return top; } }
+
+        /// <summary>
+        /// Returns the bottom border of the pixel region (maximal Y).
+        /// </summary>
         public int Bottom { get { return bottom; } }
+
+        /// <summary>
+        /// Returns the front border of the pixel region (minimal Z).
+        /// </summary>
         public int Front { get { return front; } }
+
+        /// <summary>
+        /// Returns the back border of the pixel region (maximal Z).
+        /// </summary>
         public int Back { get { return back; } }
+
+        /// <summary>
+        /// Returns the number of pixels between right and left borders of the volume.
+        /// </summary>
         public int Width { get { return right - left; } }
+
+        /// <summary>
+        /// Returns the number of pixels between bottom and top borders of the volume.
+        /// </summary>
         public int Height { get { return bottom - top; } }
+
+        /// <summary>
+        /// Returns the number of pixels between back and front borders of the volume.
+        /// </summary>
         public int Depth { get { return back - front; } }
 
+        /// <summary>
+        /// Creates a new 2D region.
+        /// </summary>
+        /// <param name="left">Left border of the region.</param>
+        /// <param name="top">Top border of the region.</param>
+        /// <param name="right">Right border of the region. Must be larger than left border.</param>
+        /// <param name="bottom">Bottom border of the region. Must be larger than top border.</param>
         public PixelVolume(int left, int top, int right, int bottom)
         {
             this.left = left;
@@ -242,6 +417,15 @@ namespace BansheeEngine
             this.back = 1;
         }
 
+        /// <summary>
+        /// Creates a new 3D region.
+        /// </summary>
+        /// <param name="left">Left border of the region.</param>
+        /// <param name="top">Top border of the region.</param>
+        /// <param name="front">Front border of the region.</param>
+        /// <param name="right">Right border of the region. Must be larger than left border.</param>
+        /// <param name="bottom">Bottom border of the region. Must be larger than top border.</param>
+        /// <param name="back">Back border of the region. Must be larger than back border.</param>
         public PixelVolume(int left, int top, int front, int right, int bottom, int back)
         {
             this.left = left;

+ 150 - 14
MBansheeEngine/PixelUtility.cs

@@ -7,8 +7,19 @@ using System.Text;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Utility methods for converting and managing pixel data and formats.
+    /// </summary>
     public static class PixelUtility
     {
+        /// <summary>
+        /// Returns the size of the memory region required to hold pixels of the provided size ana format.
+        /// </summary>
+        /// <param name="width">Number of pixels in each row.</param>
+        /// <param name="height">Number of pixels in each column.</param>
+        /// <param name="depth">Number of 2D slices.</param>
+        /// <param name="format">Format of individual pixels.</param>
+        /// <returns>Size of the memory region in bytes.</returns>
         public static int GetMemorySize(int width, int height, int depth, PixelFormat format)
         {
             int value;
@@ -16,6 +27,11 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Checks if the provided pixel format has an alpha channel.
+        /// </summary>
+        /// <param name="format">Format to check.</param>
+        /// <returns>True if the format contains an alpha channel.</returns>
         public static bool HasAlpha(PixelFormat format)
         {
             bool value;
@@ -23,6 +39,11 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Checks is the provided pixel format a floating point format.
+        /// </summary>
+        /// <param name="format">Format to check.</param>
+        /// <returns>True if the format contains floating point values.</returns>
         public static bool IsFloatingPoint(PixelFormat format)
         {
             bool value;
@@ -30,6 +51,11 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Checks is the provided pixel format contains compressed data.
+        /// </summary>
+        /// <param name="format">Format to check.</param>
+        /// <returns>True if the format contains compressed data.</returns>
         public static bool IsCompressed(PixelFormat format)
         {
             bool value;
@@ -37,6 +63,11 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Checks is the provided pixel format a depth/stencil buffer format.
+        /// </summary>
+        /// <param name="format">Format to check.</param>
+        /// <returns>True if the format is a depth/stencil buffer format.</returns>
         public static bool IsDepth(PixelFormat format)
         {
             bool value;
@@ -44,6 +75,15 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Returns the maximum number of mip maps that can be generated until we reachthe minimum size possible. This does 
+        /// not count the base level.
+        /// </summary>
+        /// <param name="width">Number of pixels in each row.</param>
+        /// <param name="height">Number of pixels in each column.</param>
+        /// <param name="depth">Number of 2D slices.</param>
+        /// <param name="format">Format of individual pixels.</param>
+        /// <returns>Possible number of mip-maps not counting the base level.</returns>
         public static int GetMaxMipmaps(int width, int height, int depth, PixelFormat format)
         {
             int value;
@@ -51,26 +91,59 @@ namespace BansheeEngine
             return value;
         }
 
+        /// <summary>
+        /// Converts a set of pixels from one format to another.
+        /// </summary>
+        /// <param name="source">Pixels to convert.</param>
+        /// <param name="newFormat">New pixel format.</param>
+        /// <returns>New pixel data object containing the converted pixels.</returns>
         public static PixelData ConvertFormat(PixelData source, PixelFormat newFormat)
         {
             return Internal_ConvertFormat(source, newFormat);
         }
 
+        /// <summary>
+        /// Compresses the provided pixels using the specified compression options.
+        /// </summary>
+        /// <param name="source">Pixels to compress.</param>
+        /// <param name="options">Options to control the compression. Make sure the format contained within is a
+        ///                       compressed format.</param>
+        /// <returns>New pixel data object containing the compressed pixels.</returns>
         public static PixelData Compress(PixelData source, CompressionOptions options)
         {
             return Internal_Compress(source, options);
         }
 
+        /// <summary>
+        /// Generates mip-maps from the provided source data using the specified compression options. Returned list includes 
+        /// the base level.
+        /// </summary>
+        /// <param name="source">Pixels to generate mip-maps for.</param>
+        /// <param name="options">Options controlling mip-map generation.</param>
+        /// <returns>A list of calculated mip-map data. First entry is the largest mip and other follow in order from 
+        ///          largest to smallest.</returns>
 		public static PixelData[] GenerateMipmaps(PixelData source, MipMapGenOptions options)
         {
             return Internal_GenerateMipmaps(source, options);
         }
 
+        /// <summary>
+        /// Scales pixel data in the source buffer and stores the scaled data in the destination buffer.
+        /// </summary>
+        /// <param name="source">Source pixels to scale.</param>
+        /// <param name="newSize">New dimensions to scale to.</param>
+        /// <param name="filter">Filter to use when scaling.</param>
+        /// <returns>New pixel data object containing the scaled pixels.</returns>
         public static PixelData Scale(PixelData source, PixelVolume newSize, ScaleFilter filter = ScaleFilter.Linear)
         {
             return Internal_Scale(source, newSize, filter);
         }
 
+        /// <summary>
+        /// Applies gamma correction to the pixels in the provided buffer.
+        /// </summary>
+        /// <param name="source">Source pixels to gamma correct.</param>
+        /// <param name="gamma">Gamma value to apply.</param>
         public static void ApplyGamma(PixelData source, float gamma)
         {
             Internal_ApplyGamma(source, gamma);
@@ -110,15 +183,25 @@ namespace BansheeEngine
         private static extern void Internal_ApplyGamma(PixelData source, float gamma);
     }
 
-    // Note: IDs must match C++ enum PixelUtil::Filter
-    public enum ScaleFilter
+    /// <summary>
+    /// Filtering types to use when scaling images.
+    /// </summary>
+    public enum ScaleFilter // Note: Must match the C++ enum PixelUtil::Filter
     {
+        /// <summary>
+        /// No filtering is performed and nearest existing value is used.
+        /// </summary>
         Nearest,
+        /// <summary>
+        /// Box filter is applied, averaging nearby pixels.
+        /// </summary>
         Linear
     };
 
-    // Note: IDs must match C++ enum CompressionQuality
-	public enum CompressionQuality
+    /// <summary>
+    /// Types of texture compression quality.
+    /// </summary>
+    public enum CompressionQuality // Note: Must match the C++ enum CompressionQuality
 	{
 		Fastest,
 		Normal,
@@ -126,48 +209,101 @@ namespace BansheeEngine
 		Highest
 	};
 
-    // Note: IDs must match C++ enum AlphaMode
-	public enum AlphaMode
+    /// <summary>
+    /// Mode of the alpha channel in a texture.
+    /// </summary>
+    public enum AlphaMode // Note: Must match the C++ enum AlphaMode
 	{
+        /// <summary>
+        /// Texture has no alpha values.
+        /// </summary>
 		None,
+        /// <summary>
+        /// Alpha is in the separate transparency channel.
+        /// </summary>
 		Transparency,
+        /// <summary>
+        /// Alpha values have been pre-multiplied with the color values.
+        /// </summary>
 		Premultiplied
 	};
 
-    // Note: IDs must match C++ enum MipMapWrapMode
-	public enum MipMapWrapMode
+    /// <summary>
+    /// Wrap mode to use when generating mip maps.
+    /// </summary>
+    public enum MipMapWrapMode // Note: Must match the C++ enum MipMapWrapMode
 	{
 		Mirror,
 		Repeat,
 		Clamp
 	};
 
-	// Note: IDs must match C++ enum MipMapFilter
-	public enum MipMapFilter
+    /// <summary>
+    /// Filter to use when generating mip maps.
+    /// </summary>
+    public enum MipMapFilter // Note: Must match the C++ enum MipMapFilter
 	{
 		Box,
 		Triangle,
 		Kaiser
 	};
 
-    // Note: Layout must match C++ struct CompressionOptions
+    /// <summary>
+    /// Options used to control texture compression.
+    /// </summary>
     [StructLayout(LayoutKind.Sequential)]
-	public struct CompressionOptions
+    public struct CompressionOptions // Note: Must match the C++ struct CompressionOptions
 	{
+        /// <summary>
+        /// Format to compress to. Must be a format containing compressed data.
+        /// </summary>
 		public PixelFormat format;
+
+        /// <summary>
+        /// Controls how to (and if) to compress the alpha channel.
+        /// </summary>
 	    public AlphaMode alphaMode;
+
+        /// <summary>
+        /// Determines does the input data represent a normal map.
+        /// </summary>
 		public bool isNormalMap;
+
+        /// <summary>
+        /// Determines has the input data been gamma corrected.
+        /// </summary>
 		public bool isSRGB;
+
+        /// <summary>
+        /// Compressed image quality. Better compression might take longer to execute but will generate better results.
+        /// </summary>
 		public CompressionQuality quality;
 	};
 
-    // Note: Layout must match C++ struct MipMapGenOptions
+    /// <summary>
+    /// Options used to control texture mip map generation.
+    /// </summary>
     [StructLayout(LayoutKind.Sequential)]
-	public struct MipMapGenOptions
+    public struct MipMapGenOptions // Note: Must match the C++ struct MipMapGenOptions
 	{
+        /// <summary>
+        /// Filter to use when downsamping input data.
+        /// </summary>
 		public MipMapFilter filter;
+
+        /// <summary>
+        /// Determines how to downsample pixels on borders.
+        /// </summary>
 		public MipMapWrapMode wrapMode;
+
+        /// <summary>
+        /// Determines does the input data represent a normal map.
+        /// </summary>
 		public bool isNormalMap;
+
+        /// <summary>
+        /// Should the downsampled values be re-normalized. Only relevant for mip-maps representing normal maps.
+        /// </summary>
 		public bool normalizeMipmaps;
 	};
 }

+ 13 - 1
MBansheeEngine/PlainText.cs

@@ -3,17 +3,29 @@ using System.Runtime.CompilerServices;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// A resource containing plain text data.
+    /// </summary>
     public class PlainText : Resource
     {
-        // For internal use by the runtime
+        /// <summary>
+        /// Constructor used internally by the runtime.
+        /// </summary>
         private PlainText()
         { }
 
+        /// <summary>
+        /// Creates a new plain text resource.
+        /// </summary>
+        /// <param name="text">Textual data to store.</param>
         public PlainText(string text)
         {
             Internal_CreateInstance(this, text);
         }
 
+        /// <summary>
+        /// Textual data contained in the resource.
+        /// </summary>
         public string Text
         {
             get { return Internal_GetText(mCachedPtr); }

+ 17 - 9
MBansheeEngine/Prefab.cs

@@ -4,23 +4,34 @@ using System.Runtime.InteropServices;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Prefab is a saveable hierarchy of scene objects. In general it can serve as any grouping of scene objects 
+    /// (e.g. a level) or be used as a form of a template instantiated and reused throughout the scene.
+    /// </summary>
     public class Prefab : Resource
     {
-        // For internal use by the runtime
+        /// <summary>
+        /// Constructor for internal use by the runtime.
+        /// </summary>
         private Prefab()
         { }
 
+        /// <summary>
+        /// Creates a new prefab from the provided scene object. If the scene object has an existing prefab link it will 
+        /// be broken. After the prefab is created the scene object will be automatically linked to it.
+        /// </summary>
+        /// <param name="so">Scene object to generate the prefab for.</param>
         public Prefab(SceneObject so)
         {
             IntPtr soPtr = so.GetCachedPtr();
             Internal_CreateInstance(this, soPtr);
         }
 
-        public SceneObject Root
-        {
-            get { return Internal_GetRoot(mCachedPtr); }
-        }
-
+        /// <summary>
+        /// Instantiates a prefab by creating an instance of the prefab's scene object hierarchy. The returned hierarchy 
+        /// will be parented to world root by default.
+        /// </summary>
+        /// <returns>New scene object instance containing a copy of the prefab's hierarchy.</returns>
         public SceneObject Instantiate()
         {
             return Internal_Instantiate(mCachedPtr);
@@ -29,9 +40,6 @@ namespace BansheeEngine
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern void Internal_CreateInstance(Prefab instance, IntPtr so);
 
-        [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern SceneObject Internal_GetRoot(IntPtr thisPtr);
-
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern SceneObject Internal_Instantiate(IntPtr thisPtr);
     }

+ 14 - 2
MBansheeEngine/ProfilerOverlay.cs

@@ -5,19 +5,31 @@ using System.Text;
 
 namespace BansheeEngine
 {
-    // Note: Must be the same as C++ enum ProfilerOverlayType
-	public enum ProfilerOverlayType
+    /// <summary>
+    /// Determines type of data to display on the profiler overlay.
+    /// </summary>
+    public enum ProfilerOverlayType // Note: Must match the C++ enum ProfilerOverlayType
 	{
 		CPUSamples,
 		GPUSamples
 	};
 
+    /// <summary>
+    /// Component that displays a profiler overlay on the main game window.
+    /// </summary>
     public class ProfilerOverlay : Component
     {
         private ProfilerOverlayInternal impl;
 
+        /// <summary>
+        /// Controls whether the overlay is getting updated or not.
+        /// </summary>
         public bool Paused { get; set; }
 
+        /// <summary>
+        /// Changes the type of data displayed by the overlay.
+        /// </summary>
+        /// <param name="type">Type that determines the type of data to display.</param>
         public void SetType(ProfilerOverlayType type)
         {
             impl.SetType(type);   

+ 4 - 0
MBansheeEngine/ProfilerOverlayInternal.cs

@@ -6,6 +6,10 @@ using System.Text;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Wrapper around the native ProfilerOverlay class.
+    /// <see cref="ProfilerOverlay"/>
+    /// </summary>
     internal class ProfilerOverlayInternal : ScriptObject
     {
         internal ProfilerOverlayInternal(Camera camera)

+ 6 - 0
MBansheeEngine/Program.cs

@@ -8,8 +8,14 @@ using System.Diagnostics;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Contains the primary entry point for the program.
+    /// </summary>
     class Program
     {
+        /// <summary>
+        /// Assembly entry point. Unused.
+        /// </summary>
         static void Start()
         {
 

+ 19 - 0
MBansheeEngine/RenderTarget.cs

@@ -6,8 +6,14 @@ using System.Text;
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Render target is a frame buffer or a texture that the render system renders the scene to.
+    /// </summary>
     public class RenderTarget : ScriptObject
     {
+        /// <summary>
+        /// Returns the width of the render target, in pixels.
+        /// </summary>
         public int Width
         {
             get
@@ -18,6 +24,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Returns the height of the render target, in pixels.
+        /// </summary>
         public int Height
         {
             get
@@ -28,6 +37,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Returns true if pixels written to the render target will be gamma corrected.
+        /// </summary>
         public bool GammaCorrection
         {
             get
@@ -38,6 +50,9 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Gets the number of samples used for multisampling (0 or 1 if multisampling is not used).
+        /// </summary>
         public int SampleCount
         {
             get
@@ -48,6 +63,10 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Controls in what order is the render target rendered to compared to other render targets. Targets with higher 
+        /// priority will be rendered before ones with lower priority.
+        /// </summary>
         public int Priority
         {
             get

+ 34 - 0
MBansheeEngine/Renderable.cs

@@ -2,6 +2,10 @@
 
 namespace BansheeEngine
 {
+    /// <summary>
+    /// Renderable represents any visible object in the scene. It has a mesh, bounds and a set of materials. Renderer will 
+    /// render any Renderable objects visible by a camera.
+    /// </summary>
     public class Renderable : Component
     {
         private NativeRenderable _native;
@@ -9,11 +13,17 @@ namespace BansheeEngine
         [SerializeField]
         private SerializableData serializableData = new SerializableData();
 
+        /// <summary>
+        /// Returns the non-component version of Renderable that is wrapped by this component. 
+        /// </summary>
         internal NativeRenderable Native
         {
             get { return _native; }
         }
 
+        /// <summary>
+        /// Mesh to render. 
+        /// </summary>
         public Mesh Mesh
         {
             get { return _native.Mesh; }
@@ -33,6 +43,10 @@ namespace BansheeEngine
             }
         }
 
+        /// <summary>
+        /// Material to use when rendering the mesh. If the mesh contains multiple sub-meshes then you may set individual
+        /// materials for each sub-mesh.
+        /// </summary>
         public Material Material
         {
             get { return _native.GetMaterial(0); }
@@ -40,23 +54,40 @@ namespace BansheeEngine
             { _native.SetMaterial(value); serializableData.materials[0] = value; }
         }
 
+        /// <summary>
+        /// Returns a material for a specific sub-mesh.
+        /// </summary>
+        /// <param name="index">Index of the sub-mesh.</param>
+        /// <returns>Material used for rendering the sub-mesh at the specified index.</returns>
         public Material GetMaterial(int index = 0)
         {
             return _native.GetMaterial(index);
         }
 
+        /// <summary>
+        /// Sets a material for a specific sub-mesh.
+        /// </summary>
+        /// <param name="material">Material to use for rendering the sub-mesh at the specified index.</param>
+        /// <param name="index">Index of the sub-mesh.</param>
         public void SetMaterial(Material material, int index = 0)
         {
             _native.SetMaterial(material, index);
             serializableData.materials[index] = material;
         }
 
+        /// <summary>
+        /// Layer bitfield that controls whether a renderable is considered visible in a specific camera. Renderable layer 
+        /// must match camera layer in order for the camera to render the component.
+        /// </summary>
         public UInt64 Layers
         {
             get { return _native.Layers; }
             set { _native.Layers = value; serializableData.layers = value; }
         }
 
+        /// <summary>
+        /// Gets world bounds of the mesh rendered by this object.
+        /// </summary>
         public Bounds Bounds
         {
             get { return _native.GetBounds(SceneObject); }
@@ -97,6 +128,9 @@ namespace BansheeEngine
             _native.OnDestroy();
         }
 
+        /// <summary>
+        /// Holds all data the renderable component needs to persist through serialization.
+        /// </summary>
         [SerializeObject]
         private struct SerializableData
         {

+ 0 - 1
SBansheeEngine/Include/BsScriptPrefab.h

@@ -44,7 +44,6 @@ namespace BansheeEngine
 		/* 								CLR HOOKS						   		*/
 		/************************************************************************/
 		static void internal_CreateInstance(MonoObject* instance, ScriptSceneObject* so);
-		static MonoObject* internal_GetRoot(ScriptPrefab* instance);
 		static MonoObject* internal_Instantiate(ScriptPrefab* instance);
 	};
 }

+ 0 - 11
SBansheeEngine/Source/BsScriptPrefab.cpp

@@ -19,7 +19,6 @@ namespace BansheeEngine
 	void ScriptPrefab::initRuntimeData()
 	{
 		metaData.scriptClass->addInternalCall("Internal_CreateInstance", &ScriptPrefab::internal_CreateInstance);
-		metaData.scriptClass->addInternalCall("Internal_GetRoot", &ScriptPrefab::internal_GetRoot);
 		metaData.scriptClass->addInternalCall("Internal_Instantiate", &ScriptPrefab::internal_Instantiate);
 	}
 
@@ -31,16 +30,6 @@ namespace BansheeEngine
 		ScriptResourceManager::instance().createScriptResource(instance, prefab, &scriptInstance);
 	}
 
-	MonoObject* ScriptPrefab::internal_GetRoot(ScriptPrefab* thisPtr)
-	{
-		HPrefab prefab = thisPtr->getPrefabHandle();
-
-		HSceneObject instance = prefab->getRoot();
-		ScriptSceneObject* scriptInstance = ScriptGameObjectManager::instance().getOrCreateScriptSceneObject(instance);
-
-		return scriptInstance->getManagedInstance();
-	}
-
 	MonoObject* ScriptPrefab::internal_Instantiate(ScriptPrefab* thisPtr)
 	{
 		HPrefab prefab = thisPtr->getPrefabHandle();