Browse Source

Feature: Exposed particle system distributions and Random class to script code
- Also updated to most recent 'bsf' version

BearishSun 7 years ago
parent
commit
08e2812a09

+ 1 - 2
Source/EditorCore/GUI/BsGUIColorGradient.cpp

@@ -174,8 +174,7 @@ namespace bs
 		{
 			const float t = i / (float)width + halfPixel;
 
-			Color value;
-			value.setAsRGBA(gradient.evaluate(t));
+			Color value = Color::fromRGBA(gradient.evaluate(t));
 
 			if (alpha)
 				value = Color::lerp(value.a, Color::Black, Color::White);

+ 144 - 0
Source/Scripting/MBansheeEngine/Generated/ColorDistribution.generated.cs

@@ -0,0 +1,144 @@
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace BansheeEngine
+{
+	/** @addtogroup Particles
+	 *  @{
+	 */
+
+	/// <summary>
+	/// Specifies a color as a distribution, which can include a constant color, random color range or a color gradient.
+	/// </summary>
+	public partial class ColorDistribution : ScriptObject
+	{
+		private ColorDistribution(bool __dummy0) { }
+
+		/// <summary>Creates a new empty distribution.</summary>
+		public ColorDistribution()
+		{
+			Internal_ColorDistribution(this);
+		}
+
+		/// <summary>Creates a new distribution that returns a constant color.</summary>
+		public ColorDistribution(Color color)
+		{
+			Internal_ColorDistribution0(this, ref color);
+		}
+
+		/// <summary>Creates a new distribution that returns a random color in the specified range.</summary>
+		public ColorDistribution(Color minColor, Color maxColor)
+		{
+			Internal_ColorDistribution1(this, ref minColor, ref maxColor);
+		}
+
+		/// <summary>Creates a new distribution that evaluates a color gradient.</summary>
+		public ColorDistribution(ColorGradient gradient)
+		{
+			Internal_ColorDistribution2(this, gradient);
+		}
+
+		/// <summary>Creates a new distribution that returns a random color in a range determined by two gradients.</summary>
+		public ColorDistribution(ColorGradient minGradient, ColorGradient maxGradient)
+		{
+			Internal_ColorDistribution3(this, minGradient, maxGradient);
+		}
+
+		/// <summary>Returns the type of the represented distribution.</summary>
+		public PropertyDistributionType GetType()
+		{
+			return Internal_getType(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if  the 
+		/// distribution is represented by a gradient.
+		/// </summary>
+		public Color GetMinConstant()
+		{
+			Color temp;
+			Internal_getMinConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the maximum value of a constant range. Only defined if the distribution represents a non-gradient range.
+		/// </summary>
+		public Color GetMaxConstant()
+		{
+			Color temp;
+			Internal_getMaxConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the gradient representing the distribution, or the first gradient representing a gradient range.  Undefined 
+		/// if the distribution is represented by a constant or a non-gradient range.
+		/// </summary>
+		public ColorGradient GetMinCurve()
+		{
+			return Internal_getMinCurve(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve 
+		/// range.
+		/// </summary>
+		public ColorGradient GetMaxCurve()
+		{
+			return Internal_getMaxCurve(mCachedPtr);
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
+		/// </param>
+		/// <param name="factor">
+		/// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a 
+		/// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the 
+		/// values in-between.
+		/// </param>
+		/// <returns>Evaluated color.</returns>
+		public Color Evaluate(float t, float factor)
+		{
+			Color temp;
+			Internal_evaluate(mCachedPtr, t, factor, out temp);
+			return temp;
+		}
+
+		public Color Evaluate(float t, out Random factor)
+		{
+			Color temp;
+			Internal_evaluate0(mCachedPtr, t, out factor, out temp);
+			return temp;
+		}
+
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_ColorDistribution(ColorDistribution managedInstance);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_ColorDistribution0(ColorDistribution managedInstance, ref Color color);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_ColorDistribution1(ColorDistribution managedInstance, ref Color minColor, ref Color maxColor);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_ColorDistribution2(ColorDistribution managedInstance, ColorGradient gradient);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_ColorDistribution3(ColorDistribution managedInstance, ColorGradient minGradient, ColorGradient maxGradient);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMinConstant(IntPtr thisPtr, out Color __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Color __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern ColorGradient Internal_getMinCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern ColorGradient Internal_getMaxCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Color __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate0(IntPtr thisPtr, float t, out Random factor, out Color __output);
+	}
+
+	/** @} */
+}

+ 25 - 0
Source/Scripting/MBansheeEngine/Generated/PropertyDistributionType.generated.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace BansheeEngine
+{
+	/** @addtogroup Particles
+	 *  @{
+	 */
+
+	/// <summary>Determines type of distribution used by distribution properties.</summary>
+	public enum PropertyDistributionType
+	{
+		/// <summary>The distribution is a costant value.</summary>
+		Constant = 0,
+		/// <summary>The distribution is a random value in a specified constant range.</summary>
+		RandomRange = 1,
+		/// <summary>The distribution is a time-varying value.</summary>
+		Curve = 2,
+		/// <summary>The distribution is a random value in a specified time-varying range.</summary>
+		RandomCurveRange = 3
+	}
+
+	/** @} */
+}

+ 179 - 0
Source/Scripting/MBansheeEngine/Generated/Random.generated.cs

@@ -0,0 +1,179 @@
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace BansheeEngine
+{
+	/** @addtogroup Math
+	 *  @{
+	 */
+
+	/// <summary>
+	/// Generates pseudo random numbers using the Xorshift128 algorithm. Suitable for high performance requirements.
+	/// </summary>
+	public partial class Random : ScriptObject
+	{
+		private Random(bool __dummy0) { }
+		protected Random() { }
+
+		/// <summary>Initializes a new generator using the specified seed.</summary>
+		public Random(uint seed = 0)
+		{
+			Internal_Random(this, seed);
+		}
+
+		/// <summary>Changes the seed of the generator to the specified value.</summary>
+		public void SetSeed(uint seed)
+		{
+			Internal_setSeed(mCachedPtr, seed);
+		}
+
+		/// <summary>Returns a random value in range [0, std::numeric_limits<uint32_t>::max()].</summary>
+		public uint Get()
+		{
+			return Internal_get(mCachedPtr);
+		}
+
+		/// <summary>Returns a random value in range [min, max].</summary>
+		public int GetRange(int min, int max)
+		{
+			return Internal_getRange(mCachedPtr, min, max);
+		}
+
+		/// <summary>Returns a random value in range [0, 1].</summary>
+		public float GetUNorm()
+		{
+			return Internal_getUNorm(mCachedPtr);
+		}
+
+		/// <summary>Returns a random value in range [-1, 1].</summary>
+		public float GetSNorm()
+		{
+			return Internal_getSNorm(mCachedPtr);
+		}
+
+		/// <summary>Returns a random unit vector in three dimensions.</summary>
+		public Vector3 GetUnitVector()
+		{
+			Vector3 temp;
+			Internal_getUnitVector(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>Returns a random unit vector in two dimensions.</summary>
+		public Vector2 GetUnitVector2D()
+		{
+			Vector2 temp;
+			Internal_getUnitVector2D(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>Returns a random point inside a unit sphere.</summary>
+		public Vector3 GetPointInSphere()
+		{
+			Vector3 temp;
+			Internal_getPointInSphere(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns a random point inside the specified range in a sphere shell of unit radius, with the specified thickness, in 
+		/// range [0, 1]. Thickness of 0 will generate points on the sphere surface, while thickness of 1 will generate points 
+		/// within the entire sphere volume. Intermediate values represent the shell, which is a volume between two concentric 
+		/// spheres.
+		/// </summary>
+		public Vector3 GetPointInSphereShell(float thickness)
+		{
+			Vector3 temp;
+			Internal_getPointInSphereShell(mCachedPtr, thickness, out temp);
+			return temp;
+		}
+
+		/// <summary>Returns a random point inside a unit circle.</summary>
+		public Vector2 GetPointInCircle()
+		{
+			Vector2 temp;
+			Internal_getPointInCircle(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns a random point inside the specified range in a circle shell of unit radius, with the specified thickness, in 
+		/// range [0, 1]. Thickness of 0 will generate points on the circle edge, while thickness of 1 will generate points 
+		/// within the entire circle surface. Intermediate values represent the shell, which is the surface between two 
+		/// concentric circles.
+		/// </summary>
+		public Vector2 GetPointInCircleShell(float thickness)
+		{
+			Vector2 temp;
+			Internal_getPointInCircleShell(mCachedPtr, thickness, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns a random point on a unit arc with the specified length (angle). Angle of 360 represents a circle.
+		/// </summary>
+		public Vector2 GetPointInArc(Degree angle)
+		{
+			Vector2 temp;
+			Internal_getPointInArc(mCachedPtr, ref angle, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns a random point inside the specified range in an arc shell of unit radius, with the specified  length (angle) 
+		/// and thickness in range [0, 1]. Angle of 360 represents a circle shell. Thickness of 0 will generate points on the arc 
+		/// edge, while thickness of 1 will generate points on the entire arc 'slice'.  Intermediate vlaues represent the shell, 
+		/// which is the surface between two concentric circles.
+		/// </summary>
+		public Vector2 GetPointInArcShell(Degree angle, float thickness)
+		{
+			Vector2 temp;
+			Internal_getPointInArcShell(mCachedPtr, ref angle, thickness, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns a random set of Barycentric coordinates that may be used for generating random points on a triangle.
+		/// </summary>
+		public Vector3 GetBarycentric()
+		{
+			Vector3 temp;
+			Internal_getBarycentric(mCachedPtr, out temp);
+			return temp;
+		}
+
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_Random(Random managedInstance, uint seed);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_setSeed(IntPtr thisPtr, uint seed);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern uint Internal_get(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern int Internal_getRange(IntPtr thisPtr, int min, int max);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_getUNorm(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_getSNorm(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getUnitVector(IntPtr thisPtr, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getUnitVector2D(IntPtr thisPtr, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInSphere(IntPtr thisPtr, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInSphereShell(IntPtr thisPtr, float thickness, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInCircle(IntPtr thisPtr, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInCircleShell(IntPtr thisPtr, float thickness, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInArc(IntPtr thisPtr, ref Degree angle, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getPointInArcShell(IntPtr thisPtr, ref Degree angle, float thickness, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getBarycentric(IntPtr thisPtr, out Vector3 __output);
+	}
+
+	/** @} */
+}

+ 433 - 0
Source/Scripting/MBansheeEngine/Generated/TDistribution.generated.cs

@@ -0,0 +1,433 @@
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace BansheeEngine
+{
+	/** @addtogroup Particles
+	 *  @{
+	 */
+
+	/// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
+	public partial class FloatDistribution : ScriptObject
+	{
+		private FloatDistribution(bool __dummy0) { }
+
+		/// <summary>Creates a new empty distribution.</summary>
+		public FloatDistribution()
+		{
+			Internal_TDistribution(this);
+		}
+
+		/// <summary>Creates a new distribution that returns a constant value.</summary>
+		public FloatDistribution(float value)
+		{
+			Internal_TDistribution0(this, value);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
+		public FloatDistribution(float minValue, float maxValue)
+		{
+			Internal_TDistribution1(this, minValue, maxValue);
+		}
+
+		/// <summary>Creates a new distribution that evaluates a curve.</summary>
+		public FloatDistribution(AnimationCurve curve)
+		{
+			Internal_TDistribution2(this, curve);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
+		public FloatDistribution(AnimationCurve minCurve, AnimationCurve maxCurve)
+		{
+			Internal_TDistribution3(this, minCurve, maxCurve);
+		}
+
+		/// <summary>Returns the type of the represented distribution.</summary>
+		public PropertyDistributionType GetType()
+		{
+			return Internal_getType(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if  the 
+		/// distribution is represented by a curve.
+		/// </summary>
+		public float GetMinConstant()
+		{
+			return Internal_getMinConstant(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
+		/// </summary>
+		public float GetMaxConstant()
+		{
+			return Internal_getMaxConstant(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the 
+		/// distribution is represented by a constant or a non-curve range.
+		/// </summary>
+		public AnimationCurve GetMinCurve()
+		{
+			return Internal_getMinCurve(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve 
+		/// range.
+		/// </summary>
+		public AnimationCurve GetMaxCurve()
+		{
+			return Internal_getMaxCurve(mCachedPtr);
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a 
+		/// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the 
+		/// values in-between.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public float Evaluate(float t, float factor)
+		{
+			return Internal_evaluate(mCachedPtr, t, factor);
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if 
+		/// the distribution represents a range.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public float Evaluate(float t, Random factor)
+		{
+			return Internal_evaluate0(mCachedPtr, t, factor);
+		}
+
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution(FloatDistribution managedInstance);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution0(FloatDistribution managedInstance, float value);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution1(FloatDistribution managedInstance, float minValue, float maxValue);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution2(FloatDistribution managedInstance, AnimationCurve curve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution3(FloatDistribution managedInstance, AnimationCurve minCurve, AnimationCurve maxCurve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_getMinConstant(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_getMaxConstant(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern AnimationCurve Internal_getMinCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern AnimationCurve Internal_getMaxCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_evaluate(IntPtr thisPtr, float t, float factor);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern float Internal_evaluate0(IntPtr thisPtr, float t, Random factor);
+	}
+
+	/** @} */
+
+	/** @addtogroup Particles
+	 *  @{
+	 */
+
+	/// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
+	public partial class Vector3Distribution : ScriptObject
+	{
+		private Vector3Distribution(bool __dummy0) { }
+
+		/// <summary>Creates a new empty distribution.</summary>
+		public Vector3Distribution()
+		{
+			Internal_TDistribution(this);
+		}
+
+		/// <summary>Creates a new distribution that returns a constant value.</summary>
+		public Vector3Distribution(Vector3 value)
+		{
+			Internal_TDistribution0(this, ref value);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
+		public Vector3Distribution(Vector3 minValue, Vector3 maxValue)
+		{
+			Internal_TDistribution1(this, ref minValue, ref maxValue);
+		}
+
+		/// <summary>Creates a new distribution that evaluates a curve.</summary>
+		public Vector3Distribution(Vector3Curve curve)
+		{
+			Internal_TDistribution2(this, curve);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
+		public Vector3Distribution(Vector3Curve minCurve, Vector3Curve maxCurve)
+		{
+			Internal_TDistribution3(this, minCurve, maxCurve);
+		}
+
+		/// <summary>Returns the type of the represented distribution.</summary>
+		public PropertyDistributionType GetType()
+		{
+			return Internal_getType(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if  the 
+		/// distribution is represented by a curve.
+		/// </summary>
+		public Vector3 GetMinConstant()
+		{
+			Vector3 temp;
+			Internal_getMinConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
+		/// </summary>
+		public Vector3 GetMaxConstant()
+		{
+			Vector3 temp;
+			Internal_getMaxConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the 
+		/// distribution is represented by a constant or a non-curve range.
+		/// </summary>
+		public Vector3Curve GetMinCurve()
+		{
+			return Internal_getMinCurve(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve 
+		/// range.
+		/// </summary>
+		public Vector3Curve GetMaxCurve()
+		{
+			return Internal_getMaxCurve(mCachedPtr);
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a 
+		/// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the 
+		/// values in-between.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public Vector3 Evaluate(float t, float factor)
+		{
+			Vector3 temp;
+			Internal_evaluate(mCachedPtr, t, factor, out temp);
+			return temp;
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if 
+		/// the distribution represents a range.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public Vector3 Evaluate(float t, Random factor)
+		{
+			Vector3 temp;
+			Internal_evaluate0(mCachedPtr, t, factor, out temp);
+			return temp;
+		}
+
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution(Vector3Distribution managedInstance);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution0(Vector3Distribution managedInstance, ref Vector3 value);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution1(Vector3Distribution managedInstance, ref Vector3 minValue, ref Vector3 maxValue);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution2(Vector3Distribution managedInstance, Vector3Curve curve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution3(Vector3Distribution managedInstance, Vector3Curve minCurve, Vector3Curve maxCurve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern Vector3Curve Internal_getMinCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern Vector3Curve Internal_getMaxCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector3 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector3 __output);
+	}
+
+	/** @} */
+
+	/** @addtogroup Particles
+	 *  @{
+	 */
+
+	/// <summary>Specifies a value as a distribution, which can include a constant value, random range or a curve.</summary>
+	public partial class Vector2Distribution : ScriptObject
+	{
+		private Vector2Distribution(bool __dummy0) { }
+
+		/// <summary>Creates a new empty distribution.</summary>
+		public Vector2Distribution()
+		{
+			Internal_TDistribution(this);
+		}
+
+		/// <summary>Creates a new distribution that returns a constant value.</summary>
+		public Vector2Distribution(Vector2 value)
+		{
+			Internal_TDistribution0(this, ref value);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in the specified range.</summary>
+		public Vector2Distribution(Vector2 minValue, Vector2 maxValue)
+		{
+			Internal_TDistribution1(this, ref minValue, ref maxValue);
+		}
+
+		/// <summary>Creates a new distribution that evaluates a curve.</summary>
+		public Vector2Distribution(Vector2Curve curve)
+		{
+			Internal_TDistribution2(this, curve);
+		}
+
+		/// <summary>Creates a new distribution that returns a random value in a range determined by two curves.</summary>
+		public Vector2Distribution(Vector2Curve minCurve, Vector2Curve maxCurve)
+		{
+			Internal_TDistribution3(this, minCurve, maxCurve);
+		}
+
+		/// <summary>Returns the type of the represented distribution.</summary>
+		public PropertyDistributionType GetType()
+		{
+			return Internal_getType(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the constant value of the distribution, or the minimal value of a constant range. Undefined if  the 
+		/// distribution is represented by a curve.
+		/// </summary>
+		public Vector2 GetMinConstant()
+		{
+			Vector2 temp;
+			Internal_getMinConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the maximum value of a constant range. Only defined if the distribution represents a non-curve range.
+		/// </summary>
+		public Vector2 GetMaxConstant()
+		{
+			Vector2 temp;
+			Internal_getMaxConstant(mCachedPtr, out temp);
+			return temp;
+		}
+
+		/// <summary>
+		/// Returns the curve representing the distribution, or the first curve representing a curve range. Undefined if the 
+		/// distribution is represented by a constant or a non-curve range.
+		/// </summary>
+		public Vector2Curve GetMinCurve()
+		{
+			return Internal_getMinCurve(mCachedPtr);
+		}
+
+		/// <summary>
+		/// Returns the curve representing the second curve of a curve range. Only defined if the distribution represents a curve 
+		/// range.
+		/// </summary>
+		public Vector2Curve GetMaxCurve()
+		{
+			return Internal_getMaxCurve(mCachedPtr);
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a 
+		/// range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the 
+		/// values in-between.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public Vector2 Evaluate(float t, float factor)
+		{
+			Vector2 temp;
+			Internal_evaluate(mCachedPtr, t, factor, out temp);
+			return temp;
+		}
+
+		/// <summary>Evaluates the value of the distribution.</summary>
+		/// <param name="t">
+		/// Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
+		/// </param>
+		/// <param name="factor">
+		/// Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if 
+		/// the distribution represents a range.
+		/// </param>
+		/// <returns>Evaluated value.</returns>
+		public Vector2 Evaluate(float t, Random factor)
+		{
+			Vector2 temp;
+			Internal_evaluate0(mCachedPtr, t, factor, out temp);
+			return temp;
+		}
+
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution(Vector2Distribution managedInstance);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution0(Vector2Distribution managedInstance, ref Vector2 value);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution1(Vector2Distribution managedInstance, ref Vector2 minValue, ref Vector2 maxValue);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution2(Vector2Distribution managedInstance, Vector2Curve curve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_TDistribution3(Vector2Distribution managedInstance, Vector2Curve minCurve, Vector2Curve maxCurve);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern PropertyDistributionType Internal_getType(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMinConstant(IntPtr thisPtr, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_getMaxConstant(IntPtr thisPtr, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern Vector2Curve Internal_getMinCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern Vector2Curve Internal_getMaxCurve(IntPtr thisPtr);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate(IntPtr thisPtr, float t, float factor, out Vector2 __output);
+		[MethodImpl(MethodImplOptions.InternalCall)]
+		private static extern void Internal_evaluate0(IntPtr thisPtr, float t, Random factor, out Vector2 __output);
+	}
+
+	/** @} */
+}

+ 2 - 0
Source/Scripting/SBansheeEngine/CMakeSources.cmake

@@ -215,6 +215,7 @@ set(BS_SBANSHEEENGINE_INC_EXTENSIONS
 	"Extensions/BsMaterialEx.h"
 	"Extensions/BsRenderTargetEx.h"
 	"Extensions/BsColorGradientEx.h"
+	"Extensions/BsParticleDistributionEx.h"
 )
 
 set(BS_SBANSHEEENGINE_SRC_EXTENSIONS
@@ -230,6 +231,7 @@ set(BS_SBANSHEEENGINE_SRC_EXTENSIONS
 	"Extensions/BsMaterialEx.cpp"
 	"Extensions/BsRenderTargetEx.cpp"
 	"Extensions/BsColorGradientEx.cpp"
+	"Extensions/BsParticleDistributionEx.cpp"
 )
 
 source_group("Header Files" FILES ${BS_SBANSHEEENGINE_INC_NOFILTER})

+ 1 - 4
Source/Scripting/SBansheeEngine/Extensions/BsColorGradientEx.cpp

@@ -6,9 +6,6 @@ namespace bs
 {
 	Color ColorGradientEx::evaluate(const SPtr<ColorGradient>& thisPtr, float t)
 	{
-		Color output;
-		output.setAsRGBA(thisPtr->evaluate(t));
-
-		return output;
+		return Color::fromRGBA(thisPtr->evaluate(t));
 	}
 }

+ 16 - 0
Source/Scripting/SBansheeEngine/Extensions/BsParticleDistributionEx.cpp

@@ -0,0 +1,16 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+#include "BsParticleDistributionEx.h"
+
+namespace bs
+{
+	Color ColorDistributionEx::evaluate(const SPtr<ColorDistribution>& thisPtr, float t, float factor)
+	{
+		return Color::fromRGBA(thisPtr->evaluate(t, factor));
+	}
+
+	class Color ColorDistributionEx::evaluate(const SPtr<ColorDistribution>& thisPtr, float t, Random& factor)
+	{
+		return Color::fromRGBA(thisPtr->evaluate(t, factor));
+	}
+}

+ 31 - 0
Source/Scripting/SBansheeEngine/Extensions/BsParticleDistributionEx.h

@@ -0,0 +1,31 @@
+//********************************** Banshee Engine (www.banshee4d.com) **************************************************//
+//**************** Copyright (c) 2018 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "Particles/BsParticleDistribution.h"
+
+namespace bs
+{
+	/** @addtogroup ScriptInteropEngine
+	*  @{
+	*/
+	/** @cond SCRIPT_EXTENSIONS */
+
+	/** Extension class for ColorDistribution, for adding additional functionality for the script interface. */
+	class BS_SCRIPT_EXPORT(e:ColorDistribution) ColorDistributionEx
+	{
+	public:
+		/** @copydoc ColorDistribution::evaluate(float, float) */
+		BS_SCRIPT_EXPORT(e:ColorDistribution)
+		static Color evaluate(const SPtr<ColorDistribution>& thisPtr, float t, float factor);
+
+		/** @copydoc ColorDistribution::evaluate(float, Random&) */
+		BS_SCRIPT_EXPORT(e:ColorDistribution)
+		static Color evaluate(const SPtr<ColorDistribution>& thisPtr, float t, Random& factor);
+	}; 
+
+	/** @endcond */
+	/** @} */
+}

+ 154 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptColorDistribution.generated.cpp

@@ -0,0 +1,154 @@
+#include "BsScriptColorDistribution.generated.h"
+#include "BsMonoMethod.h"
+#include "BsMonoClass.h"
+#include "BsMonoUtil.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "BsScriptColorGradient.generated.h"
+#include "Wrappers/BsScriptColor.h"
+#include "BsScriptRandom.generated.h"
+#include "../../SBansheeEngine/Extensions/BsParticleDistributionEx.h"
+
+namespace bs
+{
+	ScriptColorDistribution::ScriptColorDistribution(MonoObject* managedInstance, const SPtr<ColorDistribution>& value)
+		:ScriptObject(managedInstance), mInternal(value)
+	{
+	}
+
+	void ScriptColorDistribution::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_ColorDistribution", (void*)&ScriptColorDistribution::Internal_ColorDistribution);
+		metaData.scriptClass->addInternalCall("Internal_ColorDistribution0", (void*)&ScriptColorDistribution::Internal_ColorDistribution0);
+		metaData.scriptClass->addInternalCall("Internal_ColorDistribution1", (void*)&ScriptColorDistribution::Internal_ColorDistribution1);
+		metaData.scriptClass->addInternalCall("Internal_ColorDistribution2", (void*)&ScriptColorDistribution::Internal_ColorDistribution2);
+		metaData.scriptClass->addInternalCall("Internal_ColorDistribution3", (void*)&ScriptColorDistribution::Internal_ColorDistribution3);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptColorDistribution::Internal_getType);
+		metaData.scriptClass->addInternalCall("Internal_getMinConstant", (void*)&ScriptColorDistribution::Internal_getMinConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMaxConstant", (void*)&ScriptColorDistribution::Internal_getMaxConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMinCurve", (void*)&ScriptColorDistribution::Internal_getMinCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMaxCurve", (void*)&ScriptColorDistribution::Internal_getMaxCurve);
+		metaData.scriptClass->addInternalCall("Internal_evaluate", (void*)&ScriptColorDistribution::Internal_evaluate);
+		metaData.scriptClass->addInternalCall("Internal_evaluate0", (void*)&ScriptColorDistribution::Internal_evaluate0);
+
+	}
+
+	MonoObject* ScriptColorDistribution::create(const SPtr<ColorDistribution>& value)
+	{
+		if(value == nullptr) return nullptr; 
+
+		bool dummy = false;
+		void* ctorParams[1] = { &dummy };
+
+		MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
+		new (bs_alloc<ScriptColorDistribution>()) ScriptColorDistribution(managedInstance, value);
+		return managedInstance;
+	}
+	void ScriptColorDistribution::Internal_ColorDistribution(MonoObject* managedInstance)
+	{
+		SPtr<ColorDistribution> instance = bs_shared_ptr_new<ColorDistribution>();
+		new (bs_alloc<ScriptColorDistribution>())ScriptColorDistribution(managedInstance, instance);
+	}
+
+	void ScriptColorDistribution::Internal_ColorDistribution0(MonoObject* managedInstance, Color* color)
+	{
+		SPtr<ColorDistribution> instance = bs_shared_ptr_new<ColorDistribution>(*color);
+		new (bs_alloc<ScriptColorDistribution>())ScriptColorDistribution(managedInstance, instance);
+	}
+
+	void ScriptColorDistribution::Internal_ColorDistribution1(MonoObject* managedInstance, Color* minColor, Color* maxColor)
+	{
+		SPtr<ColorDistribution> instance = bs_shared_ptr_new<ColorDistribution>(*minColor, *maxColor);
+		new (bs_alloc<ScriptColorDistribution>())ScriptColorDistribution(managedInstance, instance);
+	}
+
+	void ScriptColorDistribution::Internal_ColorDistribution2(MonoObject* managedInstance, MonoObject* gradient)
+	{
+		SPtr<ColorGradient> tmpgradient;
+		ScriptColorGradient* scriptgradient;
+		scriptgradient = ScriptColorGradient::toNative(gradient);
+		tmpgradient = scriptgradient->getInternal();
+		SPtr<ColorDistribution> instance = bs_shared_ptr_new<ColorDistribution>(*tmpgradient);
+		new (bs_alloc<ScriptColorDistribution>())ScriptColorDistribution(managedInstance, instance);
+	}
+
+	void ScriptColorDistribution::Internal_ColorDistribution3(MonoObject* managedInstance, MonoObject* minGradient, MonoObject* maxGradient)
+	{
+		SPtr<ColorGradient> tmpminGradient;
+		ScriptColorGradient* scriptminGradient;
+		scriptminGradient = ScriptColorGradient::toNative(minGradient);
+		tmpminGradient = scriptminGradient->getInternal();
+		SPtr<ColorGradient> tmpmaxGradient;
+		ScriptColorGradient* scriptmaxGradient;
+		scriptmaxGradient = ScriptColorGradient::toNative(maxGradient);
+		tmpmaxGradient = scriptmaxGradient->getInternal();
+		SPtr<ColorDistribution> instance = bs_shared_ptr_new<ColorDistribution>(*tmpminGradient, *tmpmaxGradient);
+		new (bs_alloc<ScriptColorDistribution>())ScriptColorDistribution(managedInstance, instance);
+	}
+
+	PropertyDistributionType ScriptColorDistribution::Internal_getType(ScriptColorDistribution* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = thisPtr->getInternal()->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	void ScriptColorDistribution::Internal_getMinConstant(ScriptColorDistribution* thisPtr, Color* __output)
+	{
+		Color tmp__output;
+		tmp__output = thisPtr->getInternal()->getMinConstant();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptColorDistribution::Internal_getMaxConstant(ScriptColorDistribution* thisPtr, Color* __output)
+	{
+		Color tmp__output;
+		tmp__output = thisPtr->getInternal()->getMaxConstant();
+
+		*__output = tmp__output;
+	}
+
+	MonoObject* ScriptColorDistribution::Internal_getMinCurve(ScriptColorDistribution* thisPtr)
+	{
+		SPtr<ColorGradient> tmp__output = bs_shared_ptr_new<ColorGradient>();
+		*tmp__output = thisPtr->getInternal()->getMinCurve();
+
+		MonoObject* __output;
+		__output = ScriptColorGradient::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptColorDistribution::Internal_getMaxCurve(ScriptColorDistribution* thisPtr)
+	{
+		SPtr<ColorGradient> tmp__output = bs_shared_ptr_new<ColorGradient>();
+		*tmp__output = thisPtr->getInternal()->getMaxCurve();
+
+		MonoObject* __output;
+		__output = ScriptColorGradient::create(tmp__output);
+
+		return __output;
+	}
+
+	void ScriptColorDistribution::Internal_evaluate(ScriptColorDistribution* thisPtr, float t, float factor, Color* __output)
+	{
+		Color tmp__output;
+		tmp__output = ColorDistributionEx::evaluate(thisPtr->getInternal(), t, factor);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptColorDistribution::Internal_evaluate0(ScriptColorDistribution* thisPtr, float t, MonoObject** factor, Color* __output)
+	{
+		SPtr<Random> tmpfactor = bs_shared_ptr_new<Random>();
+		Color tmp__output;
+		tmp__output = ColorDistributionEx::evaluate(thisPtr->getInternal(), t, *tmpfactor);
+
+		MonoUtil::referenceCopy(factor, ScriptRandom::create(tmpfactor));
+		*__output = tmp__output;
+	}
+}

+ 40 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptColorDistribution.generated.h

@@ -0,0 +1,40 @@
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "../../../bsf/Source/Foundation/bsfUtility/Image/BsColorGradient.h"
+#include "../../../bsf/Source/Foundation/bsfUtility/Math/BsRandom.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+
+namespace bs
+{
+	struct ColorDistribution;
+	class ColorDistributionEx;
+
+	class BS_SCR_BE_EXPORT ScriptColorDistribution : public ScriptObject<ScriptColorDistribution>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "ColorDistribution")
+
+		ScriptColorDistribution(MonoObject* managedInstance, const SPtr<ColorDistribution>& value);
+
+		SPtr<ColorDistribution> getInternal() const { return mInternal; }
+		static MonoObject* create(const SPtr<ColorDistribution>& value);
+
+	private:
+		SPtr<ColorDistribution> mInternal;
+
+		static void Internal_ColorDistribution(MonoObject* managedInstance);
+		static void Internal_ColorDistribution0(MonoObject* managedInstance, Color* color);
+		static void Internal_ColorDistribution1(MonoObject* managedInstance, Color* minColor, Color* maxColor);
+		static void Internal_ColorDistribution2(MonoObject* managedInstance, MonoObject* gradient);
+		static void Internal_ColorDistribution3(MonoObject* managedInstance, MonoObject* minGradient, MonoObject* maxGradient);
+		static PropertyDistributionType Internal_getType(ScriptColorDistribution* thisPtr);
+		static void Internal_getMinConstant(ScriptColorDistribution* thisPtr, Color* __output);
+		static void Internal_getMaxConstant(ScriptColorDistribution* thisPtr, Color* __output);
+		static MonoObject* Internal_getMinCurve(ScriptColorDistribution* thisPtr);
+		static MonoObject* Internal_getMaxCurve(ScriptColorDistribution* thisPtr);
+		static void Internal_evaluate(ScriptColorDistribution* thisPtr, float t, float factor, Color* __output);
+		static void Internal_evaluate0(ScriptColorDistribution* thisPtr, float t, MonoObject** factor, Color* __output);
+	};
+}

+ 173 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptRandom.generated.cpp

@@ -0,0 +1,173 @@
+#include "BsScriptRandom.generated.h"
+#include "BsMonoMethod.h"
+#include "BsMonoClass.h"
+#include "BsMonoUtil.h"
+#include "../../../bsf/Source/Foundation/bsfUtility/Math/BsRandom.h"
+#include "Wrappers/BsScriptVector.h"
+#include "Wrappers/BsScriptVector.h"
+
+namespace bs
+{
+	ScriptRandom::ScriptRandom(MonoObject* managedInstance, const SPtr<Random>& value)
+		:ScriptObject(managedInstance), mInternal(value)
+	{
+	}
+
+	void ScriptRandom::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_Random", (void*)&ScriptRandom::Internal_Random);
+		metaData.scriptClass->addInternalCall("Internal_setSeed", (void*)&ScriptRandom::Internal_setSeed);
+		metaData.scriptClass->addInternalCall("Internal_get", (void*)&ScriptRandom::Internal_get);
+		metaData.scriptClass->addInternalCall("Internal_getRange", (void*)&ScriptRandom::Internal_getRange);
+		metaData.scriptClass->addInternalCall("Internal_getUNorm", (void*)&ScriptRandom::Internal_getUNorm);
+		metaData.scriptClass->addInternalCall("Internal_getSNorm", (void*)&ScriptRandom::Internal_getSNorm);
+		metaData.scriptClass->addInternalCall("Internal_getUnitVector", (void*)&ScriptRandom::Internal_getUnitVector);
+		metaData.scriptClass->addInternalCall("Internal_getUnitVector2D", (void*)&ScriptRandom::Internal_getUnitVector2D);
+		metaData.scriptClass->addInternalCall("Internal_getPointInSphere", (void*)&ScriptRandom::Internal_getPointInSphere);
+		metaData.scriptClass->addInternalCall("Internal_getPointInSphereShell", (void*)&ScriptRandom::Internal_getPointInSphereShell);
+		metaData.scriptClass->addInternalCall("Internal_getPointInCircle", (void*)&ScriptRandom::Internal_getPointInCircle);
+		metaData.scriptClass->addInternalCall("Internal_getPointInCircleShell", (void*)&ScriptRandom::Internal_getPointInCircleShell);
+		metaData.scriptClass->addInternalCall("Internal_getPointInArc", (void*)&ScriptRandom::Internal_getPointInArc);
+		metaData.scriptClass->addInternalCall("Internal_getPointInArcShell", (void*)&ScriptRandom::Internal_getPointInArcShell);
+		metaData.scriptClass->addInternalCall("Internal_getBarycentric", (void*)&ScriptRandom::Internal_getBarycentric);
+
+	}
+
+	MonoObject* ScriptRandom::create(const SPtr<Random>& value)
+	{
+		if(value == nullptr) return nullptr; 
+
+		bool dummy = false;
+		void* ctorParams[1] = { &dummy };
+
+		MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
+		new (bs_alloc<ScriptRandom>()) ScriptRandom(managedInstance, value);
+		return managedInstance;
+	}
+	void ScriptRandom::Internal_Random(MonoObject* managedInstance, uint32_t seed)
+	{
+		SPtr<Random> instance = bs_shared_ptr_new<Random>(seed);
+		new (bs_alloc<ScriptRandom>())ScriptRandom(managedInstance, instance);
+	}
+
+	void ScriptRandom::Internal_setSeed(ScriptRandom* thisPtr, uint32_t seed)
+	{
+		thisPtr->getInternal()->setSeed(seed);
+	}
+
+	uint32_t ScriptRandom::Internal_get(ScriptRandom* thisPtr)
+	{
+		uint32_t tmp__output;
+		tmp__output = thisPtr->getInternal()->get();
+
+		uint32_t __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	int32_t ScriptRandom::Internal_getRange(ScriptRandom* thisPtr, int32_t min, int32_t max)
+	{
+		int32_t tmp__output;
+		tmp__output = thisPtr->getInternal()->getRange(min, max);
+
+		int32_t __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	float ScriptRandom::Internal_getUNorm(ScriptRandom* thisPtr)
+	{
+		float tmp__output;
+		tmp__output = thisPtr->getInternal()->getUNorm();
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	float ScriptRandom::Internal_getSNorm(ScriptRandom* thisPtr)
+	{
+		float tmp__output;
+		tmp__output = thisPtr->getInternal()->getSNorm();
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	void ScriptRandom::Internal_getUnitVector(ScriptRandom* thisPtr, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getUnitVector();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getUnitVector2D(ScriptRandom* thisPtr, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getUnitVector2D();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInSphere(ScriptRandom* thisPtr, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInSphere();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInSphereShell(ScriptRandom* thisPtr, float thickness, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInSphereShell(thickness);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInCircle(ScriptRandom* thisPtr, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInCircle();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInCircleShell(ScriptRandom* thisPtr, float thickness, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInCircleShell(thickness);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInArc(ScriptRandom* thisPtr, Degree* angle, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInArc(*angle);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getPointInArcShell(ScriptRandom* thisPtr, Degree* angle, float thickness, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getPointInArcShell(*angle, thickness);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptRandom::Internal_getBarycentric(ScriptRandom* thisPtr, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getBarycentric();
+
+		*__output = tmp__output;
+	}
+}

+ 42 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptRandom.generated.h

@@ -0,0 +1,42 @@
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "Math/BsVector3.h"
+#include "Math/BsVector2.h"
+#include "Math/BsDegree.h"
+
+namespace bs
+{
+	class Random;
+
+	class BS_SCR_BE_EXPORT ScriptRandom : public ScriptObject<ScriptRandom>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Random")
+
+		ScriptRandom(MonoObject* managedInstance, const SPtr<Random>& value);
+
+		SPtr<Random> getInternal() const { return mInternal; }
+		static MonoObject* create(const SPtr<Random>& value);
+
+	private:
+		SPtr<Random> mInternal;
+
+		static void Internal_Random(MonoObject* managedInstance, uint32_t seed);
+		static void Internal_setSeed(ScriptRandom* thisPtr, uint32_t seed);
+		static uint32_t Internal_get(ScriptRandom* thisPtr);
+		static int32_t Internal_getRange(ScriptRandom* thisPtr, int32_t min, int32_t max);
+		static float Internal_getUNorm(ScriptRandom* thisPtr);
+		static float Internal_getSNorm(ScriptRandom* thisPtr);
+		static void Internal_getUnitVector(ScriptRandom* thisPtr, Vector3* __output);
+		static void Internal_getUnitVector2D(ScriptRandom* thisPtr, Vector2* __output);
+		static void Internal_getPointInSphere(ScriptRandom* thisPtr, Vector3* __output);
+		static void Internal_getPointInSphereShell(ScriptRandom* thisPtr, float thickness, Vector3* __output);
+		static void Internal_getPointInCircle(ScriptRandom* thisPtr, Vector2* __output);
+		static void Internal_getPointInCircleShell(ScriptRandom* thisPtr, float thickness, Vector2* __output);
+		static void Internal_getPointInArc(ScriptRandom* thisPtr, Degree* angle, Vector2* __output);
+		static void Internal_getPointInArcShell(ScriptRandom* thisPtr, Degree* angle, float thickness, Vector2* __output);
+		static void Internal_getBarycentric(ScriptRandom* thisPtr, Vector3* __output);
+	};
+}

+ 457 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptTDistribution.generated.cpp

@@ -0,0 +1,457 @@
+#include "BsScriptTDistribution.generated.h"
+#include "BsMonoMethod.h"
+#include "BsMonoClass.h"
+#include "BsMonoUtil.h"
+#include "BsScriptRandom.generated.h"
+#include "BsScriptTAnimationCurve.generated.h"
+#include "Wrappers/BsScriptVector.h"
+#include "Wrappers/BsScriptVector.h"
+#include "BsScriptTAnimationCurve.generated.h"
+#include "BsScriptTAnimationCurve.generated.h"
+
+namespace bs
+{
+	ScriptTDistributionfloat::ScriptTDistributionfloat(MonoObject* managedInstance, const SPtr<TDistribution<float>>& value)
+		:ScriptObject(managedInstance), mInternal(value)
+	{
+	}
+
+	void ScriptTDistributionfloat::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_TDistribution", (void*)&ScriptTDistributionfloat::Internal_TDistribution);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution0", (void*)&ScriptTDistributionfloat::Internal_TDistribution0);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution1", (void*)&ScriptTDistributionfloat::Internal_TDistribution1);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution2", (void*)&ScriptTDistributionfloat::Internal_TDistribution2);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution3", (void*)&ScriptTDistributionfloat::Internal_TDistribution3);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptTDistributionfloat::Internal_getType);
+		metaData.scriptClass->addInternalCall("Internal_getMinConstant", (void*)&ScriptTDistributionfloat::Internal_getMinConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMaxConstant", (void*)&ScriptTDistributionfloat::Internal_getMaxConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMinCurve", (void*)&ScriptTDistributionfloat::Internal_getMinCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMaxCurve", (void*)&ScriptTDistributionfloat::Internal_getMaxCurve);
+		metaData.scriptClass->addInternalCall("Internal_evaluate", (void*)&ScriptTDistributionfloat::Internal_evaluate);
+		metaData.scriptClass->addInternalCall("Internal_evaluate0", (void*)&ScriptTDistributionfloat::Internal_evaluate0);
+
+	}
+
+	MonoObject* ScriptTDistributionfloat::create(const SPtr<TDistribution<float>>& value)
+	{
+		if(value == nullptr) return nullptr; 
+
+		bool dummy = false;
+		void* ctorParams[1] = { &dummy };
+
+		MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
+		new (bs_alloc<ScriptTDistributionfloat>()) ScriptTDistributionfloat(managedInstance, value);
+		return managedInstance;
+	}
+	void ScriptTDistributionfloat::Internal_TDistribution(MonoObject* managedInstance)
+	{
+		SPtr<TDistribution<float>> instance = bs_shared_ptr_new<TDistribution<float>>();
+		new (bs_alloc<ScriptTDistributionfloat>())ScriptTDistributionfloat(managedInstance, instance);
+	}
+
+	void ScriptTDistributionfloat::Internal_TDistribution0(MonoObject* managedInstance, float value)
+	{
+		SPtr<TDistribution<float>> instance = bs_shared_ptr_new<TDistribution<float>>(value);
+		new (bs_alloc<ScriptTDistributionfloat>())ScriptTDistributionfloat(managedInstance, instance);
+	}
+
+	void ScriptTDistributionfloat::Internal_TDistribution1(MonoObject* managedInstance, float minValue, float maxValue)
+	{
+		SPtr<TDistribution<float>> instance = bs_shared_ptr_new<TDistribution<float>>(minValue, maxValue);
+		new (bs_alloc<ScriptTDistributionfloat>())ScriptTDistributionfloat(managedInstance, instance);
+	}
+
+	void ScriptTDistributionfloat::Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve)
+	{
+		SPtr<TAnimationCurve<float>> tmpcurve;
+		ScriptTAnimationCurvefloat* scriptcurve;
+		scriptcurve = ScriptTAnimationCurvefloat::toNative(curve);
+		tmpcurve = scriptcurve->getInternal();
+		SPtr<TDistribution<float>> instance = bs_shared_ptr_new<TDistribution<float>>(*tmpcurve);
+		new (bs_alloc<ScriptTDistributionfloat>())ScriptTDistributionfloat(managedInstance, instance);
+	}
+
+	void ScriptTDistributionfloat::Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve)
+	{
+		SPtr<TAnimationCurve<float>> tmpminCurve;
+		ScriptTAnimationCurvefloat* scriptminCurve;
+		scriptminCurve = ScriptTAnimationCurvefloat::toNative(minCurve);
+		tmpminCurve = scriptminCurve->getInternal();
+		SPtr<TAnimationCurve<float>> tmpmaxCurve;
+		ScriptTAnimationCurvefloat* scriptmaxCurve;
+		scriptmaxCurve = ScriptTAnimationCurvefloat::toNative(maxCurve);
+		tmpmaxCurve = scriptmaxCurve->getInternal();
+		SPtr<TDistribution<float>> instance = bs_shared_ptr_new<TDistribution<float>>(*tmpminCurve, *tmpmaxCurve);
+		new (bs_alloc<ScriptTDistributionfloat>())ScriptTDistributionfloat(managedInstance, instance);
+	}
+
+	PropertyDistributionType ScriptTDistributionfloat::Internal_getType(ScriptTDistributionfloat* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = thisPtr->getInternal()->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	float ScriptTDistributionfloat::Internal_getMinConstant(ScriptTDistributionfloat* thisPtr)
+	{
+		float tmp__output;
+		tmp__output = thisPtr->getInternal()->getMinConstant();
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	float ScriptTDistributionfloat::Internal_getMaxConstant(ScriptTDistributionfloat* thisPtr)
+	{
+		float tmp__output;
+		tmp__output = thisPtr->getInternal()->getMaxConstant();
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	MonoObject* ScriptTDistributionfloat::Internal_getMinCurve(ScriptTDistributionfloat* thisPtr)
+	{
+		SPtr<TAnimationCurve<float>> tmp__output = bs_shared_ptr_new<TAnimationCurve<float>>();
+		*tmp__output = thisPtr->getInternal()->getMinCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurvefloat::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptTDistributionfloat::Internal_getMaxCurve(ScriptTDistributionfloat* thisPtr)
+	{
+		SPtr<TAnimationCurve<float>> tmp__output = bs_shared_ptr_new<TAnimationCurve<float>>();
+		*tmp__output = thisPtr->getInternal()->getMaxCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurvefloat::create(tmp__output);
+
+		return __output;
+	}
+
+	float ScriptTDistributionfloat::Internal_evaluate(ScriptTDistributionfloat* thisPtr, float t, float factor)
+	{
+		float tmp__output;
+		tmp__output = thisPtr->getInternal()->evaluate(t, factor);
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	float ScriptTDistributionfloat::Internal_evaluate0(ScriptTDistributionfloat* thisPtr, float t, MonoObject* factor)
+	{
+		float tmp__output;
+		SPtr<Random> tmpfactor;
+		ScriptRandom* scriptfactor;
+		scriptfactor = ScriptRandom::toNative(factor);
+		tmpfactor = scriptfactor->getInternal();
+		tmp__output = thisPtr->getInternal()->evaluate(t, *tmpfactor);
+
+		float __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	ScriptTDistributionVector3::ScriptTDistributionVector3(MonoObject* managedInstance, const SPtr<TDistribution<Vector3>>& value)
+		:ScriptObject(managedInstance), mInternal(value)
+	{
+	}
+
+	void ScriptTDistributionVector3::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_TDistribution", (void*)&ScriptTDistributionVector3::Internal_TDistribution);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution0", (void*)&ScriptTDistributionVector3::Internal_TDistribution0);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution1", (void*)&ScriptTDistributionVector3::Internal_TDistribution1);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution2", (void*)&ScriptTDistributionVector3::Internal_TDistribution2);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution3", (void*)&ScriptTDistributionVector3::Internal_TDistribution3);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptTDistributionVector3::Internal_getType);
+		metaData.scriptClass->addInternalCall("Internal_getMinConstant", (void*)&ScriptTDistributionVector3::Internal_getMinConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMaxConstant", (void*)&ScriptTDistributionVector3::Internal_getMaxConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMinCurve", (void*)&ScriptTDistributionVector3::Internal_getMinCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMaxCurve", (void*)&ScriptTDistributionVector3::Internal_getMaxCurve);
+		metaData.scriptClass->addInternalCall("Internal_evaluate", (void*)&ScriptTDistributionVector3::Internal_evaluate);
+		metaData.scriptClass->addInternalCall("Internal_evaluate0", (void*)&ScriptTDistributionVector3::Internal_evaluate0);
+
+	}
+
+	MonoObject* ScriptTDistributionVector3::create(const SPtr<TDistribution<Vector3>>& value)
+	{
+		if(value == nullptr) return nullptr; 
+
+		bool dummy = false;
+		void* ctorParams[1] = { &dummy };
+
+		MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
+		new (bs_alloc<ScriptTDistributionVector3>()) ScriptTDistributionVector3(managedInstance, value);
+		return managedInstance;
+	}
+	void ScriptTDistributionVector3::Internal_TDistribution(MonoObject* managedInstance)
+	{
+		SPtr<TDistribution<Vector3>> instance = bs_shared_ptr_new<TDistribution<Vector3>>();
+		new (bs_alloc<ScriptTDistributionVector3>())ScriptTDistributionVector3(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector3::Internal_TDistribution0(MonoObject* managedInstance, Vector3* value)
+	{
+		SPtr<TDistribution<Vector3>> instance = bs_shared_ptr_new<TDistribution<Vector3>>(*value);
+		new (bs_alloc<ScriptTDistributionVector3>())ScriptTDistributionVector3(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector3::Internal_TDistribution1(MonoObject* managedInstance, Vector3* minValue, Vector3* maxValue)
+	{
+		SPtr<TDistribution<Vector3>> instance = bs_shared_ptr_new<TDistribution<Vector3>>(*minValue, *maxValue);
+		new (bs_alloc<ScriptTDistributionVector3>())ScriptTDistributionVector3(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector3::Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve)
+	{
+		SPtr<TAnimationCurve<Vector3>> tmpcurve;
+		ScriptTAnimationCurveVector3* scriptcurve;
+		scriptcurve = ScriptTAnimationCurveVector3::toNative(curve);
+		tmpcurve = scriptcurve->getInternal();
+		SPtr<TDistribution<Vector3>> instance = bs_shared_ptr_new<TDistribution<Vector3>>(*tmpcurve);
+		new (bs_alloc<ScriptTDistributionVector3>())ScriptTDistributionVector3(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector3::Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve)
+	{
+		SPtr<TAnimationCurve<Vector3>> tmpminCurve;
+		ScriptTAnimationCurveVector3* scriptminCurve;
+		scriptminCurve = ScriptTAnimationCurveVector3::toNative(minCurve);
+		tmpminCurve = scriptminCurve->getInternal();
+		SPtr<TAnimationCurve<Vector3>> tmpmaxCurve;
+		ScriptTAnimationCurveVector3* scriptmaxCurve;
+		scriptmaxCurve = ScriptTAnimationCurveVector3::toNative(maxCurve);
+		tmpmaxCurve = scriptmaxCurve->getInternal();
+		SPtr<TDistribution<Vector3>> instance = bs_shared_ptr_new<TDistribution<Vector3>>(*tmpminCurve, *tmpmaxCurve);
+		new (bs_alloc<ScriptTDistributionVector3>())ScriptTDistributionVector3(managedInstance, instance);
+	}
+
+	PropertyDistributionType ScriptTDistributionVector3::Internal_getType(ScriptTDistributionVector3* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = thisPtr->getInternal()->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	void ScriptTDistributionVector3::Internal_getMinConstant(ScriptTDistributionVector3* thisPtr, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getMinConstant();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptTDistributionVector3::Internal_getMaxConstant(ScriptTDistributionVector3* thisPtr, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->getMaxConstant();
+
+		*__output = tmp__output;
+	}
+
+	MonoObject* ScriptTDistributionVector3::Internal_getMinCurve(ScriptTDistributionVector3* thisPtr)
+	{
+		SPtr<TAnimationCurve<Vector3>> tmp__output = bs_shared_ptr_new<TAnimationCurve<Vector3>>();
+		*tmp__output = thisPtr->getInternal()->getMinCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurveVector3::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptTDistributionVector3::Internal_getMaxCurve(ScriptTDistributionVector3* thisPtr)
+	{
+		SPtr<TAnimationCurve<Vector3>> tmp__output = bs_shared_ptr_new<TAnimationCurve<Vector3>>();
+		*tmp__output = thisPtr->getInternal()->getMaxCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurveVector3::create(tmp__output);
+
+		return __output;
+	}
+
+	void ScriptTDistributionVector3::Internal_evaluate(ScriptTDistributionVector3* thisPtr, float t, float factor, Vector3* __output)
+	{
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->evaluate(t, factor);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptTDistributionVector3::Internal_evaluate0(ScriptTDistributionVector3* thisPtr, float t, MonoObject* factor, Vector3* __output)
+	{
+		SPtr<Random> tmpfactor;
+		ScriptRandom* scriptfactor;
+		scriptfactor = ScriptRandom::toNative(factor);
+		tmpfactor = scriptfactor->getInternal();
+		Vector3 tmp__output;
+		tmp__output = thisPtr->getInternal()->evaluate(t, *tmpfactor);
+
+		*__output = tmp__output;
+	}
+
+	ScriptTDistributionVector2::ScriptTDistributionVector2(MonoObject* managedInstance, const SPtr<TDistribution<Vector2>>& value)
+		:ScriptObject(managedInstance), mInternal(value)
+	{
+	}
+
+	void ScriptTDistributionVector2::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_TDistribution", (void*)&ScriptTDistributionVector2::Internal_TDistribution);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution0", (void*)&ScriptTDistributionVector2::Internal_TDistribution0);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution1", (void*)&ScriptTDistributionVector2::Internal_TDistribution1);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution2", (void*)&ScriptTDistributionVector2::Internal_TDistribution2);
+		metaData.scriptClass->addInternalCall("Internal_TDistribution3", (void*)&ScriptTDistributionVector2::Internal_TDistribution3);
+		metaData.scriptClass->addInternalCall("Internal_getType", (void*)&ScriptTDistributionVector2::Internal_getType);
+		metaData.scriptClass->addInternalCall("Internal_getMinConstant", (void*)&ScriptTDistributionVector2::Internal_getMinConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMaxConstant", (void*)&ScriptTDistributionVector2::Internal_getMaxConstant);
+		metaData.scriptClass->addInternalCall("Internal_getMinCurve", (void*)&ScriptTDistributionVector2::Internal_getMinCurve);
+		metaData.scriptClass->addInternalCall("Internal_getMaxCurve", (void*)&ScriptTDistributionVector2::Internal_getMaxCurve);
+		metaData.scriptClass->addInternalCall("Internal_evaluate", (void*)&ScriptTDistributionVector2::Internal_evaluate);
+		metaData.scriptClass->addInternalCall("Internal_evaluate0", (void*)&ScriptTDistributionVector2::Internal_evaluate0);
+
+	}
+
+	MonoObject* ScriptTDistributionVector2::create(const SPtr<TDistribution<Vector2>>& value)
+	{
+		if(value == nullptr) return nullptr; 
+
+		bool dummy = false;
+		void* ctorParams[1] = { &dummy };
+
+		MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
+		new (bs_alloc<ScriptTDistributionVector2>()) ScriptTDistributionVector2(managedInstance, value);
+		return managedInstance;
+	}
+	void ScriptTDistributionVector2::Internal_TDistribution(MonoObject* managedInstance)
+	{
+		SPtr<TDistribution<Vector2>> instance = bs_shared_ptr_new<TDistribution<Vector2>>();
+		new (bs_alloc<ScriptTDistributionVector2>())ScriptTDistributionVector2(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector2::Internal_TDistribution0(MonoObject* managedInstance, Vector2* value)
+	{
+		SPtr<TDistribution<Vector2>> instance = bs_shared_ptr_new<TDistribution<Vector2>>(*value);
+		new (bs_alloc<ScriptTDistributionVector2>())ScriptTDistributionVector2(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector2::Internal_TDistribution1(MonoObject* managedInstance, Vector2* minValue, Vector2* maxValue)
+	{
+		SPtr<TDistribution<Vector2>> instance = bs_shared_ptr_new<TDistribution<Vector2>>(*minValue, *maxValue);
+		new (bs_alloc<ScriptTDistributionVector2>())ScriptTDistributionVector2(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector2::Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve)
+	{
+		SPtr<TAnimationCurve<Vector2>> tmpcurve;
+		ScriptTAnimationCurveVector2* scriptcurve;
+		scriptcurve = ScriptTAnimationCurveVector2::toNative(curve);
+		tmpcurve = scriptcurve->getInternal();
+		SPtr<TDistribution<Vector2>> instance = bs_shared_ptr_new<TDistribution<Vector2>>(*tmpcurve);
+		new (bs_alloc<ScriptTDistributionVector2>())ScriptTDistributionVector2(managedInstance, instance);
+	}
+
+	void ScriptTDistributionVector2::Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve)
+	{
+		SPtr<TAnimationCurve<Vector2>> tmpminCurve;
+		ScriptTAnimationCurveVector2* scriptminCurve;
+		scriptminCurve = ScriptTAnimationCurveVector2::toNative(minCurve);
+		tmpminCurve = scriptminCurve->getInternal();
+		SPtr<TAnimationCurve<Vector2>> tmpmaxCurve;
+		ScriptTAnimationCurveVector2* scriptmaxCurve;
+		scriptmaxCurve = ScriptTAnimationCurveVector2::toNative(maxCurve);
+		tmpmaxCurve = scriptmaxCurve->getInternal();
+		SPtr<TDistribution<Vector2>> instance = bs_shared_ptr_new<TDistribution<Vector2>>(*tmpminCurve, *tmpmaxCurve);
+		new (bs_alloc<ScriptTDistributionVector2>())ScriptTDistributionVector2(managedInstance, instance);
+	}
+
+	PropertyDistributionType ScriptTDistributionVector2::Internal_getType(ScriptTDistributionVector2* thisPtr)
+	{
+		PropertyDistributionType tmp__output;
+		tmp__output = thisPtr->getInternal()->getType();
+
+		PropertyDistributionType __output;
+		__output = tmp__output;
+
+		return __output;
+	}
+
+	void ScriptTDistributionVector2::Internal_getMinConstant(ScriptTDistributionVector2* thisPtr, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getMinConstant();
+
+		*__output = tmp__output;
+	}
+
+	void ScriptTDistributionVector2::Internal_getMaxConstant(ScriptTDistributionVector2* thisPtr, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->getMaxConstant();
+
+		*__output = tmp__output;
+	}
+
+	MonoObject* ScriptTDistributionVector2::Internal_getMinCurve(ScriptTDistributionVector2* thisPtr)
+	{
+		SPtr<TAnimationCurve<Vector2>> tmp__output = bs_shared_ptr_new<TAnimationCurve<Vector2>>();
+		*tmp__output = thisPtr->getInternal()->getMinCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurveVector2::create(tmp__output);
+
+		return __output;
+	}
+
+	MonoObject* ScriptTDistributionVector2::Internal_getMaxCurve(ScriptTDistributionVector2* thisPtr)
+	{
+		SPtr<TAnimationCurve<Vector2>> tmp__output = bs_shared_ptr_new<TAnimationCurve<Vector2>>();
+		*tmp__output = thisPtr->getInternal()->getMaxCurve();
+
+		MonoObject* __output;
+		__output = ScriptTAnimationCurveVector2::create(tmp__output);
+
+		return __output;
+	}
+
+	void ScriptTDistributionVector2::Internal_evaluate(ScriptTDistributionVector2* thisPtr, float t, float factor, Vector2* __output)
+	{
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->evaluate(t, factor);
+
+		*__output = tmp__output;
+	}
+
+	void ScriptTDistributionVector2::Internal_evaluate0(ScriptTDistributionVector2* thisPtr, float t, MonoObject* factor, Vector2* __output)
+	{
+		SPtr<Random> tmpfactor;
+		ScriptRandom* scriptfactor;
+		scriptfactor = ScriptRandom::toNative(factor);
+		tmpfactor = scriptfactor->getInternal();
+		Vector2 tmp__output;
+		tmp__output = thisPtr->getInternal()->evaluate(t, *tmpfactor);
+
+		*__output = tmp__output;
+	}
+}

+ 102 - 0
Source/Scripting/SBansheeEngine/Generated/BsScriptTDistribution.generated.h

@@ -0,0 +1,102 @@
+#pragma once
+
+#include "BsScriptEnginePrerequisites.h"
+#include "BsScriptObject.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "BsScriptObject.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "BsScriptObject.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "../../../bsf/Source/Foundation/bsfUtility/Math/BsRandom.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Animation/BsAnimationCurve.h"
+#include "Math/BsVector3.h"
+#include "Math/BsVector2.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Animation/BsAnimationCurve.h"
+#include "../../../bsf/Source/Foundation/bsfCore/Animation/BsAnimationCurve.h"
+
+namespace bs
+{
+	template<class T0> struct TDistribution;
+
+	class BS_SCR_BE_EXPORT ScriptTDistributionfloat : public ScriptObject<ScriptTDistributionfloat>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "FloatDistribution")
+
+		ScriptTDistributionfloat(MonoObject* managedInstance, const SPtr<TDistribution<float>>& value);
+
+		SPtr<TDistribution<float>> getInternal() const { return mInternal; }
+		static MonoObject* create(const SPtr<TDistribution<float>>& value);
+
+	private:
+		SPtr<TDistribution<float>> mInternal;
+
+		static void Internal_TDistribution(MonoObject* managedInstance);
+		static void Internal_TDistribution0(MonoObject* managedInstance, float value);
+		static void Internal_TDistribution1(MonoObject* managedInstance, float minValue, float maxValue);
+		static void Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve);
+		static void Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve);
+		static PropertyDistributionType Internal_getType(ScriptTDistributionfloat* thisPtr);
+		static float Internal_getMinConstant(ScriptTDistributionfloat* thisPtr);
+		static float Internal_getMaxConstant(ScriptTDistributionfloat* thisPtr);
+		static MonoObject* Internal_getMinCurve(ScriptTDistributionfloat* thisPtr);
+		static MonoObject* Internal_getMaxCurve(ScriptTDistributionfloat* thisPtr);
+		static float Internal_evaluate(ScriptTDistributionfloat* thisPtr, float t, float factor);
+		static float Internal_evaluate0(ScriptTDistributionfloat* thisPtr, float t, MonoObject* factor);
+	};
+
+	class BS_SCR_BE_EXPORT ScriptTDistributionVector3 : public ScriptObject<ScriptTDistributionVector3>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector3Distribution")
+
+		ScriptTDistributionVector3(MonoObject* managedInstance, const SPtr<TDistribution<Vector3>>& value);
+
+		SPtr<TDistribution<Vector3>> getInternal() const { return mInternal; }
+		static MonoObject* create(const SPtr<TDistribution<Vector3>>& value);
+
+	private:
+		SPtr<TDistribution<Vector3>> mInternal;
+
+		static void Internal_TDistribution(MonoObject* managedInstance);
+		static void Internal_TDistribution0(MonoObject* managedInstance, Vector3* value);
+		static void Internal_TDistribution1(MonoObject* managedInstance, Vector3* minValue, Vector3* maxValue);
+		static void Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve);
+		static void Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve);
+		static PropertyDistributionType Internal_getType(ScriptTDistributionVector3* thisPtr);
+		static void Internal_getMinConstant(ScriptTDistributionVector3* thisPtr, Vector3* __output);
+		static void Internal_getMaxConstant(ScriptTDistributionVector3* thisPtr, Vector3* __output);
+		static MonoObject* Internal_getMinCurve(ScriptTDistributionVector3* thisPtr);
+		static MonoObject* Internal_getMaxCurve(ScriptTDistributionVector3* thisPtr);
+		static void Internal_evaluate(ScriptTDistributionVector3* thisPtr, float t, float factor, Vector3* __output);
+		static void Internal_evaluate0(ScriptTDistributionVector3* thisPtr, float t, MonoObject* factor, Vector3* __output);
+	};
+
+	class BS_SCR_BE_EXPORT ScriptTDistributionVector2 : public ScriptObject<ScriptTDistributionVector2>
+	{
+	public:
+		SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Vector2Distribution")
+
+		ScriptTDistributionVector2(MonoObject* managedInstance, const SPtr<TDistribution<Vector2>>& value);
+
+		SPtr<TDistribution<Vector2>> getInternal() const { return mInternal; }
+		static MonoObject* create(const SPtr<TDistribution<Vector2>>& value);
+
+	private:
+		SPtr<TDistribution<Vector2>> mInternal;
+
+		static void Internal_TDistribution(MonoObject* managedInstance);
+		static void Internal_TDistribution0(MonoObject* managedInstance, Vector2* value);
+		static void Internal_TDistribution1(MonoObject* managedInstance, Vector2* minValue, Vector2* maxValue);
+		static void Internal_TDistribution2(MonoObject* managedInstance, MonoObject* curve);
+		static void Internal_TDistribution3(MonoObject* managedInstance, MonoObject* minCurve, MonoObject* maxCurve);
+		static PropertyDistributionType Internal_getType(ScriptTDistributionVector2* thisPtr);
+		static void Internal_getMinConstant(ScriptTDistributionVector2* thisPtr, Vector2* __output);
+		static void Internal_getMaxConstant(ScriptTDistributionVector2* thisPtr, Vector2* __output);
+		static MonoObject* Internal_getMinCurve(ScriptTDistributionVector2* thisPtr);
+		static MonoObject* Internal_getMaxCurve(ScriptTDistributionVector2* thisPtr);
+		static void Internal_evaluate(ScriptTDistributionVector2* thisPtr, float t, float factor, Vector2* __output);
+		static void Internal_evaluate0(ScriptTDistributionVector2* thisPtr, float t, MonoObject* factor, Vector2* __output);
+	};
+}

+ 1 - 1
Source/bsf

@@ -1 +1 @@
-Subproject commit c9f025f143bd08837f49ba662d10215732664451
+Subproject commit b8a844284129d13c5dc2f0d97987e6674662e135