Selaa lähdekoodia

Feature: Added settings for controlling scene view icons
- Also better icon fading so they don't take up as much of the screen

BearishSun 6 vuotta sitten
vanhempi
sitoutus
f52fa5793e

+ 29 - 20
Source/EditorCore/Scene/BsGizmoManager.cpp

@@ -25,14 +25,10 @@ namespace bs
 {
 	const UINT32 GizmoManager::SPHERE_QUALITY = 1;
 	const UINT32 GizmoManager::WIRE_SPHERE_QUALITY = 10;
-	const float GizmoManager::MAX_ICON_RANGE = 500.0f;
 	const UINT32 GizmoManager::OPTIMAL_ICON_SIZE = 64;
 	const float GizmoManager::ICON_TEXEL_WORLD_SIZE = 0.015f;
 
 	GizmoManager::GizmoManager()
-		: mPickable(false), mCurrentIdx(0), mTransformDirty(false), mColorDirty(false), mDrawHelper(nullptr)
-		, mPickingDrawHelper(nullptr)
-		
 	{
 		mTransform = Matrix4::IDENTITY;
 		mDrawHelper = bs_new<DrawHelper>();
@@ -457,14 +453,14 @@ namespace bs
 		return proxyData;
 	}
 
-	void GizmoManager::update(const SPtr<Camera>& camera)
+	void GizmoManager::update(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings)
 	{
 		mActiveMeshes.clear();
 		mActiveMeshes = mDrawHelper->buildMeshes(DrawHelper::SortType::BackToFront, camera.get());
 
 		Vector<MeshRenderData> proxyData = createMeshProxyData(mActiveMeshes);
 		IconRenderDataVecPtr iconRenderData;
-		mIconMesh = buildIconMesh(camera, mIconData, false, iconRenderData);
+		mIconMesh = buildIconMesh(camera, drawSettings, mIconData, false, iconRenderData);
 
 		SPtr<ct::MeshBase> iconMesh;
 		if(mIconMesh != nullptr)
@@ -476,7 +472,8 @@ namespace bs
 			proxyData, iconMesh, iconRenderData));
 	}
 
-	void GizmoManager::renderForPicking(const SPtr<Camera>& camera, std::function<Color(UINT32)> idxToColorCallback)
+	void GizmoManager::renderForPicking(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings, 
+		std::function<Color(UINT32)> idxToColorCallback)
 	{
 		Vector<IconData> iconData;
 		IconRenderDataVecPtr iconRenderData;
@@ -665,7 +662,7 @@ namespace bs
 		const Vector<DrawHelper::ShapeMeshData>& meshes = 
 			mPickingDrawHelper->buildMeshes(DrawHelper::SortType::BackToFront, camera.get());
 
-		SPtr<Mesh> iconMesh = buildIconMesh(camera, iconData, true, iconRenderData);
+		SPtr<Mesh> iconMesh = buildIconMesh(camera, drawSettings, iconData, true, iconRenderData);
 		
 		SPtr<ct::Mesh> iconMeshCore;
 		if (iconMesh != nullptr)
@@ -716,8 +713,8 @@ namespace bs
 			nullptr, Vector<MeshRenderData>(), nullptr, iconRenderData));
 	}
 
-	SPtr<Mesh> GizmoManager::buildIconMesh(const SPtr<Camera>& camera, const Vector<IconData>& iconData,
-		bool forPicking, GizmoManager::IconRenderDataVecPtr& iconRenderData)
+	SPtr<Mesh> GizmoManager::buildIconMesh(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings, 
+		const Vector<IconData>& iconData, bool forPicking, IconRenderDataVecPtr& iconRenderData)
 	{
 		mSortedIconData.clear();
 		
@@ -733,7 +730,7 @@ namespace bs
 			if (distance < camera->getNearClipDistance()) // Ignore behind clip plane
 				continue;
 
-			if (distance > MAX_ICON_RANGE) // Ignore too far away
+			if (distance > drawSettings.iconRange) // Ignore too far away
 				continue;
 
 			if (!iconEntry.texture.isLoaded()) // Ignore missing texture
@@ -832,12 +829,14 @@ namespace bs
 				else
 					iconScale = (cameraScale * ICON_TEXEL_WORLD_SIZE) / sortedIconData.distance;
 
+				iconScale *= std::max(drawSettings.iconScale, 0.0f);
 				halfWidth *= iconScale;
 				halfHeight *= iconScale;
 			}
 
 			Color normalColor, fadedColor;
-			calculateIconColors(curIconData.color, camera, (UINT32)(halfHeight * 2.0f), curIconData.fixedScale, normalColor, fadedColor);
+			calculateIconColors(curIconData.color, camera, drawSettings, (UINT32)(halfHeight * 2.0f), 
+				curIconData.fixedScale, normalColor, fadedColor);
 
 			if (forPicking)
 			{
@@ -897,24 +896,34 @@ namespace bs
 		height = Math::roundToInt(height * scale);
 	}
 
-	void GizmoManager::calculateIconColors(const Color& tint, const SPtr<Camera>& camera,
-		UINT32 iconHeight, bool fixedScale, Color& normalColor, Color& fadedColor)
+	void GizmoManager::calculateIconColors(const Color& tint, const SPtr<Camera>& camera, 
+		const GizmoDrawSettings& drawSettings, UINT32 iconHeight, bool fixedScale, Color& normalColor, Color& fadedColor)
 	{
 		normalColor = tint;
 
+		float iconSizeMin = drawSettings.iconSizeMin;
+		float iconSizeMax = drawSettings.iconSizeMax;
+		float iconSizeCull = drawSettings.iconSizeCull;
+
+		if(iconSizeMax < iconSizeMin)
+			iconSizeMax = iconSizeMin;
+
+		if(iconSizeCull < iconSizeMax)
+			iconSizeCull = iconSizeMax;
+
 		if (!fixedScale)
 		{
 			float iconToScreenRatio = iconHeight / (float)camera->getViewport()->getPixelArea().height;
 
-			if (iconToScreenRatio > 0.3f)
+			if (iconToScreenRatio > iconSizeMax)
 			{
-				float alpha = 1.0f - Math::invLerp(iconToScreenRatio, 0.3f, 1.0f);
-				normalColor.a *= alpha;
+				float alpha = 1.0f - Math::invLerp(iconToScreenRatio, iconSizeMax, iconSizeCull);
+				normalColor.a *= alpha * alpha;
 			}
-			else if (iconToScreenRatio < 0.1f)
+			else if (iconToScreenRatio < 0.05f)
 			{
-				float alpha = Math::invLerp(iconToScreenRatio, 0.0f, 0.1f);
-				normalColor.a *= alpha;
+				float alpha = Math::invLerp(iconToScreenRatio, 0.0f, iconSizeMin);
+				normalColor.a *= alpha * alpha;
 			}
 		}
 

+ 60 - 24
Source/EditorCore/Scene/BsGizmoManager.h

@@ -26,6 +26,38 @@ namespace bs
 		Solid, Line, Wire, Text, Count
 	};
 
+	/** Settings that control gizmo drawing. */
+	struct BS_SCRIPT_EXPORT(api:bed,pl:true) GizmoDrawSettings
+	{
+		/** Scale to apply to gizmo icons, controlling their size. */
+		float iconScale = 1.0f;
+
+		/** Maximum range at which gizmo icons will be rendered, in world units. */
+		float iconRange = 500.0f;
+
+		/** 
+		 * Icons smaller than this size will be faded out. The value represents the size of the icon relative to viewport 
+		 * size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be smaller than maximum size
+		 * value.
+		 */
+		float iconSizeMin = 0.05f;
+
+		/** 
+		 * Icons larger than this size will be faded out. The value represents the size of the icon relative to viewport 
+		 * size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than minimum size
+		 * value.
+		 */
+		float iconSizeMax = 0.15f;
+
+		/**
+		 * Icons larger than this size will not be shown.  The value represents the size of the icon relative to viewport 
+		 * size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than maximum size
+		 * value.
+
+		 */
+		float iconSizeCull = 0.25f;
+	};
+
 	/**
 	 * Handles the rendering and picking of gizmo elements. Gizmos are icons and 3D objects usually rendered in scene view
 	 * for various visualization purposes (for example a Camera component will have a gizmo that draws a Camera icon since
@@ -256,18 +288,20 @@ namespace bs
 		 *
 		 * @note	Internal method.
 		 */
-		void update(const SPtr<Camera>& camera);
+		void update(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings);
 
 		/**
 		 * Queues all gizmos to be rendered for picking. Each gizmo is draw with a separate color so we can identify them
 		 * later.
 		 *
 		 * @param[in]	camera				Camera to draw the gizmos on.
+		 * @param[in]	drawSettings		Settings used to control icon drawing.
 		 * @param[in]	idxToColorCallback	Callback that assigns a unique color to each gizmo index.
 		 *
 		 * @note	Internal method.
 		 */
-		void renderForPicking(const SPtr<Camera>& camera, std::function<Color(UINT32)> idxToColorCallback);
+		void renderForPicking(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings, 
+			std::function<Color(UINT32)> idxToColorCallback);
 
 		/** @} */
 
@@ -419,16 +453,17 @@ namespace bs
 		/**
 		 * Builds a brand new mesh that can be used for rendering all icon gizmos.
 		 *
-		 * @param[in]	camera		Camera the mesh will be rendered to.
-		 * @param[in]	iconData	A list of all icons and their properties.
-		 * @param[in]	forPicking	Whether the icons will be rendered normally, or with a special material for picking.
-		 * @param[in]	renderData	Output data that outlines the structure of the returned mesh. It tells us which portions
-		 *							of the mesh use which icon texture.
+		 * @param[in]	camera			Camera the mesh will be rendered to.
+		 * @param[in]	drawSettings	Settings used to control icon drawing.
+		 * @param[in]	iconData		A list of all icons and their properties.
+		 * @param[in]	forPicking		Whether the icons will be rendered normally, or with a special material for picking.
+		 * @param[in]	renderData		Output data that outlines the structure of the returned mesh. It tells us which 
+		 *								portions of the mesh use which icon texture.
 		 *
-		 * @return					A mesh containing all of the visible icons.	
+		 * @return						A mesh containing all of the visible icons.	
 		 */
-		SPtr<Mesh> buildIconMesh(const SPtr<Camera>& camera, const Vector<IconData>& iconData, bool forPicking, 
-			IconRenderDataVecPtr& renderData);
+		SPtr<Mesh> buildIconMesh(const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings,
+			const Vector<IconData>& iconData, bool forPicking, IconRenderDataVecPtr& renderData);
 
 		/**	Resizes the icon width/height so it is always scaled to optimal size (with preserved aspect). */
 		void limitIconSize(UINT32& width, UINT32& height);
@@ -440,15 +475,16 @@ namespace bs
 		 * Calculates colors for an icon based on its position in the camera. For example icons too close to too far might
 		 * be faded.
 		 *
-		 * @param[in]	tint		Primary tint for the icon.
-		 * @param[in]	camera		Camera in which the icon will be rendered in.
-		 * @param[in]	iconHeight	Height of the icon in pixels.
-		 * @param[in]	fixedScale	Whether the icon size changes depending on distance from the camera.
-		 * @param[in]	normalColor	Normal color of the icon.
-		 * @param[in]	fadedColor	Faded color to be used when icon is occluded by geometry.
+		 * @param[in]	tint			Primary tint for the icon.
+		 * @param[in]	camera			Camera in which the icon will be rendered in.
+		 * @param[in]	drawSettings	Settings used to control icon drawing.
+		 * @param[in]	iconHeight		Height of the icon in pixels.
+		 * @param[in]	fixedScale		Whether the icon size changes depending on distance from the camera.
+		 * @param[in]	normalColor		Normal color of the icon.
+		 * @param[in]	fadedColor		Faded color to be used when icon is occluded by geometry.
 		 */
-		void calculateIconColors(const Color& tint, const SPtr<Camera>& camera, UINT32 iconHeight, bool fixedScale,
-			Color& normalColor, Color& fadedColor);
+		void calculateIconColors(const Color& tint, const SPtr<Camera>& camera, const GizmoDrawSettings& drawSettings, 
+			UINT32 iconHeight, bool fixedScale, Color& normalColor, Color& fadedColor);
 
 		static const UINT32 VERTEX_BUFFER_GROWTH;
 		static const UINT32 INDEX_BUFFER_GROWTH;
@@ -463,13 +499,13 @@ namespace bs
 		Color mColor;
 		Matrix4 mTransform;
 		HSceneObject mActiveSO;
-		bool mPickable;
-		UINT32 mCurrentIdx;
-		bool mTransformDirty;
-		bool mColorDirty;
+		bool mPickable = false;
+		UINT32 mCurrentIdx = 0;
+		bool mTransformDirty = false;
+		bool mColorDirty = false;
 
-		DrawHelper* mDrawHelper;
-		DrawHelper* mPickingDrawHelper;
+		DrawHelper* mDrawHelper = nullptr;
+		DrawHelper* mPickingDrawHelper = nullptr;
 
 		Vector<CubeData> mSolidCubeData;
 		Vector<CubeData> mWireCubeData;

+ 8 - 7
Source/EditorCore/Scene/BsScenePicking.cpp

@@ -51,11 +51,11 @@ namespace bs
 		gCoreThread().queueCommand(std::bind(&ct::ScenePicking::destroy, mCore));
 	}
 
-	HSceneObject ScenePicking::pickClosestObject(const SPtr<Camera>& cam, const Vector2I& position, const Vector2I& area, 
-		Vector<HSceneObject>& ignoreRenderables, SnapData* data)
+	HSceneObject ScenePicking::pickClosestObject(const SPtr<Camera>& cam, const GizmoDrawSettings& gizmoDrawSettings,
+		const Vector2I& position, const Vector2I& area, Vector<HSceneObject>& ignoreRenderables, SnapData* data)
 	{
-		Vector<HSceneObject> selectedObjects = pickObjects(cam, position, area, ignoreRenderables, data);
-		if (selectedObjects.size() == 0)
+		Vector<HSceneObject> selectedObjects = pickObjects(cam, gizmoDrawSettings, position, area, ignoreRenderables, data);
+		if (selectedObjects.empty())
 			return HSceneObject();
 			
 		if (data != nullptr)
@@ -68,8 +68,8 @@ namespace bs
 		return selectedObjects[0];
 	}
 
-	Vector<HSceneObject> ScenePicking::pickObjects(const SPtr<Camera>& cam, const Vector2I& position, const Vector2I& area, 
-		Vector<HSceneObject>& ignoreRenderables, SnapData* data)
+	Vector<HSceneObject> ScenePicking::pickObjects(const SPtr<Camera>& cam, const GizmoDrawSettings& gizmoDrawSettings,
+		const Vector2I& position, const Vector2I& area, Vector<HSceneObject>& ignoreRenderables, SnapData* data)
 	{
 		auto comparePickElement = [&] (const ScenePicking::RenderablePickData& a, const ScenePicking::RenderablePickData& b)
 		{
@@ -166,7 +166,8 @@ namespace bs
 		gCoreThread().queueCommand(std::bind(&ct::ScenePicking::corePickingBegin, mCore, target,
 			cam->getViewport()->getArea(), std::cref(pickData), position, area));
 
-		GizmoManager::instance().renderForPicking(cam, [&](UINT32 inputIdx) { return encodeIndex(firstGizmoIdx + inputIdx); });
+		GizmoManager::instance().renderForPicking(cam, gizmoDrawSettings, 
+			[&](UINT32 inputIdx) { return encodeIndex(firstGizmoIdx + inputIdx); });
 
 		AsyncOp op = gCoreThread().queueReturnCommand(std::bind(&ct::ScenePicking::corePickingEnd, mCore, target,
 			cam->getViewport()->getArea(), position, area, data != nullptr, _1));

+ 9 - 4
Source/EditorCore/Scene/BsScenePicking.h

@@ -10,6 +10,8 @@
 
 namespace bs
 {
+	struct GizmoDrawSettings;
+
 	/** @addtogroup Scene-Editor
 	 *  @{
 	 */
@@ -53,6 +55,7 @@ namespace bs
 		 * Attempts to find a single nearest scene object under the provided position and area.
 		 *
 		 * @param[in]	cam					Camera to perform the picking from.
+		 * @param[in]	gizmoDrawSettings	Settings used for drawing pickable gizmos.
 		 * @param[in]	position			Pointer position relative to the camera viewport, in pixels.
 		 * @param[in]	area				Width/height of the checked area in pixels. Use (1, 1) if you want the exact
 		 *									position under the pointer.
@@ -61,14 +64,15 @@ namespace bs
 		 * @return							Nearest SceneObject under the provided area, or an empty handle if no object is
 		 *									found.
 		 */
-		HSceneObject pickClosestObject(const SPtr<Camera>& cam, const Vector2I& position, const Vector2I& area, 
-			Vector<HSceneObject>& ignoreRenderables, SnapData* data = nullptr);
+		HSceneObject pickClosestObject(const SPtr<Camera>& cam, const GizmoDrawSettings& gizmoDrawSettings,
+			const Vector2I& position, const Vector2I& area, Vector<HSceneObject>& ignoreRenderables, SnapData* data = nullptr);
 
 		/**
 		 * Attempts to find all scene objects under the provided position and area. This does not mean objects occluded by
 		 * other objects.
 		 *
 		 * @param[in]	cam					Camera to perform the picking from.
+		 * @param[in]	gizmoDrawSettings	Settings used for drawing pickable gizmos.
 		 * @param[in]	position			Pointer position relative to the camera viewport, in pixels.
 		 * @param[in]	area				Width/height of the checked area in pixels. Use (1, 1) if you want the exact 
 		 *									position under the pointer.
@@ -76,8 +80,9 @@ namespace bs
 		 * @param[out]	data				Picking data regarding position and normal.
 		 * @return							A list of SceneObject%s under the provided area.
 		 */
-		Vector<HSceneObject> pickObjects(const SPtr<Camera>& cam, const Vector2I& position, const Vector2I& area, 
-			Vector<HSceneObject>& ignoreRenderables, SnapData* data = nullptr);
+		Vector<HSceneObject> pickObjects(const SPtr<Camera>& cam, const GizmoDrawSettings& gizmoDrawSettings,
+			const Vector2I& position, const Vector2I& area, Vector<HSceneObject>& ignoreRenderables, 
+			SnapData* data = nullptr);
 
 	private:
 		friend class ct::ScenePicking;

+ 47 - 0
Source/EditorManaged/Generated/GizmoDrawSettings.generated.cs

@@ -0,0 +1,47 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//************** Copyright (c) 2016-2019 Marko Pintera ([email protected]). All rights reserved. *******************//
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using bs;
+
+namespace bs.Editor
+{
+	/// <summary>Settings that control gizmo drawing.</summary>
+	[StructLayout(LayoutKind.Sequential), SerializeObject]
+	public partial struct GizmoDrawSettings
+	{
+		/// <summary>Initializes the struct with default values.</summary>
+		public static GizmoDrawSettings Default()
+		{
+			GizmoDrawSettings value = new GizmoDrawSettings();
+			value.iconScale = 1f;
+			value.iconRange = 500f;
+			value.iconSizeMin = 0.0500000007f;
+			value.iconSizeMax = 0.150000006f;
+			value.iconSizeCull = 0.25f;
+
+			return value;
+		}
+
+		/// <summary>Scale to apply to gizmo icons, controlling their size.</summary>
+		public float iconScale;
+		/// <summary>Maximum range at which gizmo icons will be rendered, in world units.</summary>
+		public float iconRange;
+		/// <summary>
+		/// Icons smaller than this size will be faded out. The value represents the size of the icon relative to viewport  size 
+		/// (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be smaller than maximum size value.
+		/// </summary>
+		public float iconSizeMin;
+		/// <summary>
+		/// Icons larger than this size will be faded out. The value represents the size of the icon relative to viewport  size 
+		/// (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than minimum size value.
+		/// </summary>
+		public float iconSizeMax;
+		/// <summary>
+		/// Icons larger than this size will not be shown. The value represents the size of the icon relative to viewport  size 
+		/// (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than maximum size value.
+		/// </summary>
+		public float iconSizeCull;
+	}
+}

+ 20 - 0
Source/EditorManaged/Generated/info.xml

@@ -499,6 +499,26 @@
 		<field name="icon256" type="RRef&lt;Texture&gt;">
 		</field>
 	</struct>
+	<struct native="GizmoDrawSettings" script="GizmoDrawSettings">
+		<doc>Settings that control gizmo drawing.</doc>
+		<ctor>
+		</ctor>
+		<field name="iconScale" type="float">
+			<doc>Scale to apply to gizmo icons, controlling their size.</doc>
+		</field>
+		<field name="iconRange" type="float">
+			<doc>Maximum range at which gizmo icons will be rendered, in world units.</doc>
+		</field>
+		<field name="iconSizeMin" type="float">
+			<doc>Icons smaller than this size will be faded out. The value represents the size of the icon relative to viewport  size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be smaller than maximum size value.</doc>
+		</field>
+		<field name="iconSizeMax" type="float">
+			<doc>Icons larger than this size will be faded out. The value represents the size of the icon relative to viewport  size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than minimum size value.</doc>
+		</field>
+		<field name="iconSizeCull" type="float">
+			<doc>Icons larger than this size will not be shown. The value represents the size of the icon relative to viewport  size (e.g. 1 means the icons fully covers the viewport). In range [0, 1], should be larger than maximum size value.</doc>
+		</field>
+	</struct>
 	<class native="SerializedSceneObject" script="SerializedSceneObject">
 		<doc>Serializes the current state of a scene object and allows that state to be restored. The advantage of using this  class versus normal serialization is that the deserialization happens into the original scene object, instead of creating a new scene object.</doc>
 	</class>

+ 1 - 1
Source/EditorManaged/Windows/Library/ProjectLibrary.cs

@@ -123,7 +123,7 @@ namespace bs.Editor
         /// Triggers a reimport of a resource using the provided import options, if needed.
         /// </summary>
         /// <param name="path">Path to the resource to reimport, absolute or relative to resources folder.</param>
-        /// <param name="options">ptional import options to use when importing the resource. Caller must ensure the import
+        /// <param name="options">Optional import options to use when importing the resource. Caller must ensure the import
         ///                       options are of the correct type for the resource in question. If null is provided default 
         ///                       import options are used.</param>
         /// <param name="force">Should the resource be reimported even if no changes are detected.</param>

+ 33 - 0
Source/EditorManaged/Windows/Scene/SceneCameraSettingsWindow.cs

@@ -19,14 +19,18 @@ namespace bs.Editor
 
         private InspectorFieldDrawer guiViewSettings;
         private InspectorFieldDrawer guiMovementSettings;
+        private InspectorFieldDrawer guiGizmoSettings;
         private InspectorFieldDrawer guiRenderSettings;
 
         private SceneCameraViewSettings viewSettings;
+        private GizmoDrawSettings gizmoSettings;
         private SceneCameraMoveSettings moveSettings;
         private RenderSettings renderSettings;
 
         private SerializableProperties expandStates;
 
+        private object objGizmoSettings;
+
         /// <summary>
         /// Opens the options window.
         /// </summary>
@@ -51,12 +55,18 @@ namespace bs.Editor
                 viewSettings = sceneWindow.Camera.ViewSettings;
                 moveSettings = sceneWindow.Camera.MoveSettings;
                 renderSettings = sceneWindow.Camera.RenderSettings;
+                gizmoSettings = sceneWindow.GizmoDrawSettings;
             }
             else
             {
                 viewSettings = ProjectSettings.GetObject<SceneCameraViewSettings>(SceneCamera.ViewSettingsKey);
                 moveSettings = ProjectSettings.GetObject<SceneCameraMoveSettings>(SceneCamera.MoveSettingsKey);
                 renderSettings = ProjectSettings.GetObject<RenderSettings>(SceneCamera.RenderSettingsKey);
+
+                if(ProjectSettings.HasKey(SceneWindow.GizmoDrawSettingsKey))
+                    gizmoSettings = ProjectSettings.GetObject<GizmoDrawSettings>(SceneWindow.GizmoDrawSettingsKey);
+                else
+                    gizmoSettings = GizmoDrawSettings.Default();
             }
 
             expandStates = ProjectSettings.GetObject<SerializableProperties>(ExpandStatesKey);
@@ -79,6 +89,10 @@ namespace bs.Editor
             GUILayoutY viewSettingsLayout = vertLayout.AddLayoutY();
             vertLayout.AddSpace(10);
 
+            vertLayout.AddElement(new GUILabel(new LocEdString("Gizmo Settings"), EditorStyles.LabelBold));
+            GUILayoutY gizmoSettingsLayout = vertLayout.AddLayoutY();
+            vertLayout.AddSpace(10);
+
             vertLayout.AddElement(new GUILabel(new LocEdString("Move Settings"), EditorStyles.LabelBold));
             GUILayoutY moveSettingsLayout = vertLayout.AddLayoutY();
             vertLayout.AddSpace(10);
@@ -87,10 +101,14 @@ namespace bs.Editor
             GUILayoutY renderSettingsLayout = vertLayout.AddLayoutY();
 
             guiViewSettings = new InspectorFieldDrawer(inspectableContext, viewSettingsLayout);
+            guiGizmoSettings = new InspectorFieldDrawer(inspectableContext, gizmoSettingsLayout);
             guiMovementSettings = new InspectorFieldDrawer(inspectableContext, moveSettingsLayout);
             guiRenderSettings = new InspectorFieldDrawer(inspectableContext, renderSettingsLayout);
 
+            objGizmoSettings = gizmoSettings;
+
             guiViewSettings.AddDefault(viewSettings);
+            guiGizmoSettings.AddDefault(objGizmoSettings);
             guiMovementSettings.AddDefault(moveSettings);
             guiRenderSettings.AddDefault(renderSettings);
 
@@ -137,6 +155,18 @@ namespace bs.Editor
 
                 ProjectSettings.SetObject(SceneCamera.RenderSettingsKey, renderSettings);
             }
+
+            InspectableState gizmoOptionsState = guiGizmoSettings.Refresh();
+            if (gizmoOptionsState != InspectableState.NotModified)
+            {
+                gizmoSettings = (GizmoDrawSettings) objGizmoSettings;
+
+                SceneWindow sceneWindow = SceneWindow.GetWindow<SceneWindow>();
+                if (sceneWindow != null)
+                    sceneWindow.GizmoDrawSettings = gizmoSettings;
+
+                ProjectSettings.SetObject(SceneWindow.GizmoDrawSettingsKey, gizmoSettings);
+            }
         }
 
         private void OnDestroy()
@@ -157,6 +187,7 @@ namespace bs.Editor
             viewSettings = new SceneCameraViewSettings();
             moveSettings = new SceneCameraMoveSettings();
             renderSettings = new RenderSettings();
+            gizmoSettings = GizmoDrawSettings.Default();
 
             SceneWindow sceneWindow = SceneWindow.GetWindow<SceneWindow>();
             if (sceneWindow != null)
@@ -164,11 +195,13 @@ namespace bs.Editor
                 sceneWindow.Camera.ViewSettings = viewSettings;
                 sceneWindow.Camera.MoveSettings = moveSettings;
                 sceneWindow.Camera.RenderSettings = renderSettings;
+                sceneWindow.GizmoDrawSettings = gizmoSettings;
             }
 
             ProjectSettings.SetObject(SceneCamera.ViewSettingsKey, viewSettings);
             ProjectSettings.SetObject(SceneCamera.MoveSettingsKey, moveSettings);
             ProjectSettings.SetObject(SceneCamera.RenderSettingsKey, renderSettings);
+            ProjectSettings.SetObject(SceneWindow.GizmoDrawSettingsKey, gizmoSettings);
         }
 
         /// <summary>

+ 29 - 3
Source/EditorManaged/Windows/Scene/SceneGizmos.cs

@@ -15,13 +15,32 @@ namespace bs.Editor
     /// </summary>
     internal sealed class SceneGizmos : ScriptObject
     {
+        /// <summary>
+        /// Settings that control how are gizmos drawn.
+        /// </summary>
+        internal GizmoDrawSettings DrawSettings
+        {
+            get
+            {
+                GizmoDrawSettings value;
+                Internal_GetDrawSettings(mCachedPtr, out value);
+                return value;
+            }
+
+            set
+            {
+                Internal_SetDrawSettings(mCachedPtr, ref value);
+            }
+        }
+
         /// <summary>
         /// Creates a new scene gizmo renderer.
         /// </summary>
         /// <param name="sceneCamera">Camera into which the gizmos will be rendered.</param>
-        internal SceneGizmos(Camera sceneCamera)
+        /// <param name="drawSettings">Settings that control how are gizmos drawn.</param>
+        internal SceneGizmos(Camera sceneCamera, GizmoDrawSettings drawSettings)
         {
-            Internal_Create(this, sceneCamera.GetCachedPtr());
+            Internal_Create(this, sceneCamera.GetCachedPtr(), ref drawSettings);
         }
 
         /// <summary>
@@ -33,10 +52,17 @@ namespace bs.Editor
         }
 
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Create(SceneGizmos managedInstance, IntPtr camera);
+        private static extern void Internal_Create(SceneGizmos managedInstance, IntPtr camera, 
+            ref GizmoDrawSettings drawSettings);
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern void Internal_Draw(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetDrawSettings(IntPtr thisPtr, ref GizmoDrawSettings settings);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetDrawSettings(IntPtr thisPtr, out GizmoDrawSettings settings);
     }
 
     /** @} */

+ 28 - 3
Source/EditorManaged/Windows/Scene/SceneSelection.cs

@@ -33,13 +33,32 @@ namespace bs.Editor
     /// </summary>
     internal sealed class SceneSelection : ScriptObject
     {
+        /// <summary>
+        /// Settings that control how are pickable gizmos drawn.
+        /// </summary>
+        internal GizmoDrawSettings GizmoDrawSettings
+        {
+            get
+            {
+                GizmoDrawSettings value;
+                Internal_GetGizmoDrawSettings(mCachedPtr, out value);
+                return value;
+            }
+
+            set
+            {
+                Internal_SetGizmoDrawSettings(mCachedPtr, ref value);
+            }
+        }
+
         /// <summary>
         /// Creates a new scene selection manager.
         /// </summary>
         /// <param name="sceneCamera">Camera into which to render the selection overlay, and perform picking from.</param>
-        internal SceneSelection(Camera sceneCamera)
+        /// <param name="drawSettings">Settings that control how are pickable gizmos drawn.</param>
+        internal SceneSelection(Camera sceneCamera, GizmoDrawSettings gizmoDrawSettings)
         {
-            Internal_Create(this, sceneCamera.GetCachedPtr());
+            Internal_Create(this, sceneCamera.GetCachedPtr(), ref gizmoDrawSettings);
         }
 
         /// <summary>
@@ -89,7 +108,7 @@ namespace bs.Editor
         }
 
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern void Internal_Create(SceneSelection managedInstance, IntPtr camera);
+        private static extern void Internal_Create(SceneSelection managedInstance, IntPtr camera, ref GizmoDrawSettings gizmoDrawSettings);
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern void Internal_Draw(IntPtr thisPtr);
@@ -102,6 +121,12 @@ namespace bs.Editor
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern SceneObject Internal_Snap(IntPtr thisPtr, ref Vector2I pointerPos, out SnapData data, SceneObject[] ignoreRenderables);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetGizmoDrawSettings(IntPtr thisPtr, ref GizmoDrawSettings settings);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_GetGizmoDrawSettings(IntPtr thisPtr, out GizmoDrawSettings settings);
     }
 
     /** @} */

+ 27 - 2
Source/EditorManaged/Windows/Scene/SceneWindow.cs

@@ -16,6 +16,7 @@ namespace bs.Editor
     /// </summary>
     internal sealed class SceneWindow : EditorWindow, IGlobalShortcuts
     {
+        internal const string GizmoDrawSettingsKey = "SceneCamera0_GizmoDrawSettings";
         internal const string ToggleProfilerOverlayBinding = "ToggleProfilerOverlay";
         internal const string ViewToolBinding = "ViewTool";
         internal const string MoveToolBinding = "MoveTool";
@@ -80,6 +81,7 @@ namespace bs.Editor
         private bool AllowViewportInput { get { return !loadingProgressShown; } }
 
         private int editorSettingsHash = int.MaxValue;
+        private GizmoDrawSettings gizmoDrawSettings = GizmoDrawSettings.Default();
 
         private VirtualButton frameKey;
 
@@ -110,6 +112,24 @@ namespace bs.Editor
         /// </summary>
         public SceneCamera Camera => sceneCamera;
 
+        /// <summary>
+        /// Settings that control gizmo drawing.
+        /// </summary>
+        public GizmoDrawSettings GizmoDrawSettings
+        {
+            get => gizmoDrawSettings;
+            set
+            {
+                gizmoDrawSettings = value;
+
+                if(sceneGizmos != null)
+                    sceneGizmos.DrawSettings = gizmoDrawSettings;
+
+                if(sceneSelection != null)
+                    sceneSelection.GizmoDrawSettings = gizmoDrawSettings;
+            }
+        }
+
         /// <summary>
         /// Constructs a new scene window.
         /// </summary>
@@ -188,6 +208,11 @@ namespace bs.Editor
 
         private void OnInitialize()
         {
+            if (ProjectSettings.HasKey(GizmoDrawSettingsKey))
+                gizmoDrawSettings = ProjectSettings.GetObject<GizmoDrawSettings>(SceneWindow.GizmoDrawSettingsKey);
+            else
+                gizmoDrawSettings = GizmoDrawSettings.Default();
+
             mainLayout = GUI.AddLayoutY();
 
             GUIContent viewIcon = new GUIContent(EditorBuiltin.GetSceneWindowIcon(SceneWindowIcon.View),
@@ -949,8 +974,8 @@ namespace bs.Editor
                 rtPanel.AddElement(renderTextureGUI);
 
                 sceneGrid = new SceneGrid(camera);
-                sceneSelection = new SceneSelection(camera);
-                sceneGizmos = new SceneGizmos(camera);
+                sceneSelection = new SceneSelection(camera, gizmoDrawSettings);
+                sceneGizmos = new SceneGizmos(camera, gizmoDrawSettings);
                 sceneHandles = new SceneHandles(this, camera);
             }
             else

+ 2 - 2
Source/EditorManaged/Windows/Settings/EditorSettings.cs

@@ -279,13 +279,13 @@ namespace bs.Editor
         /// Value of the property if it exists, otherwise an empty instance of the object. Returns null if the tyoe of
         /// the stored object doesn't match the requested type.
         /// </returns>
-        public static T GetObject<T>(string name) where T : class, new()
+        public static T GetObject<T>(string name) where T : new()
         {
             object obj = Internal_GetObject(name);
             if (obj == null)
                 return new T();
 
-            return obj as T;
+            return (T)obj;
         }
 
         /// <summary>

+ 2 - 2
Source/EditorManaged/Windows/Settings/ProjectSettings.cs

@@ -136,13 +136,13 @@ namespace bs.Editor
         /// Value of the property if it exists, otherwise an empty instance of the object. Returns null if the tyoe of
         /// the stored object doesn't match the requested type.
         /// </returns>
-        public static T GetObject<T>(string name) where T : class, new()
+        public static T GetObject<T>(string name) where T : new()
         {
             object obj = Internal_GetObject(name);
             if (obj == null)
                 return new T();
 
-            return obj as T;
+            return (T)obj;
         }
 
         /// <summary>

+ 27 - 0
Source/EditorScript/Generated/BsScriptGizmoDrawSettings.generated.cpp

@@ -0,0 +1,27 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//************** Copyright (c) 2016-2019 Marko Pintera ([email protected]). All rights reserved. *******************//
+#include "BsScriptGizmoDrawSettings.generated.h"
+#include "BsMonoMethod.h"
+#include "BsMonoClass.h"
+#include "BsMonoUtil.h"
+
+namespace bs
+{
+	ScriptGizmoDrawSettings::ScriptGizmoDrawSettings(MonoObject* managedInstance)
+		:ScriptObject(managedInstance)
+	{ }
+
+	void ScriptGizmoDrawSettings::initRuntimeData()
+	{ }
+
+	MonoObject*ScriptGizmoDrawSettings::box(const GizmoDrawSettings& value)
+	{
+		return MonoUtil::box(metaData.scriptClass->_getInternalClass(), (void*)&value);
+	}
+
+	GizmoDrawSettings ScriptGizmoDrawSettings::unbox(MonoObject* value)
+	{
+		return *(GizmoDrawSettings*)MonoUtil::unbox(value);
+	}
+
+}

+ 23 - 0
Source/EditorScript/Generated/BsScriptGizmoDrawSettings.generated.h

@@ -0,0 +1,23 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//************** Copyright (c) 2016-2019 Marko Pintera ([email protected]). All rights reserved. *******************//
+#pragma once
+
+#include "BsScriptEditorPrerequisites.h"
+#include "BsScriptObject.h"
+#include "../../EditorCore/Scene/BsGizmoManager.h"
+
+namespace bs
+{
+	class BS_SCR_BED_EXPORT ScriptGizmoDrawSettings : public ScriptObject<ScriptGizmoDrawSettings>
+	{
+	public:
+		SCRIPT_OBJ(EDITOR_ASSEMBLY, EDITOR_NS, "GizmoDrawSettings")
+
+		static MonoObject* box(const GizmoDrawSettings& value);
+		static GizmoDrawSettings unbox(MonoObject* value);
+
+	private:
+		ScriptGizmoDrawSettings(MonoObject* managedInstance);
+
+	};
+}

+ 19 - 8
Source/EditorScript/Wrappers/BsScriptSceneGizmos.cpp

@@ -9,11 +9,9 @@
 
 namespace bs
 {
-	ScriptSceneGizmos::ScriptSceneGizmos(MonoObject* object, const HCamera& camera)
-		:ScriptObject(object), mCamera(camera)
-	{
-
-	}
+	ScriptSceneGizmos::ScriptSceneGizmos(MonoObject* object, const HCamera& camera, const GizmoDrawSettings& drawSettings)
+		:ScriptObject(object), mCamera(camera), mDrawSettings(drawSettings)
+	{ }
 
 	ScriptSceneGizmos::~ScriptSceneGizmos()
 	{
@@ -25,11 +23,14 @@ namespace bs
 	{
 		metaData.scriptClass->addInternalCall("Internal_Create", (void*)&ScriptSceneGizmos::internal_Create);
 		metaData.scriptClass->addInternalCall("Internal_Draw", (void*)&ScriptSceneGizmos::internal_Draw);
+		metaData.scriptClass->addInternalCall("Internal_SetDrawSettings", (void*)&ScriptSceneGizmos::internal_SetDrawSettings);
+		metaData.scriptClass->addInternalCall("Internal_GetDrawSettings", (void*)&ScriptSceneGizmos::internal_GetDrawSettings);
 	}
 
-	void ScriptSceneGizmos::internal_Create(MonoObject* managedInstance, ScriptCCamera* camera)
+	void ScriptSceneGizmos::internal_Create(MonoObject* managedInstance, ScriptCCamera* camera, 
+		GizmoDrawSettings* drawSettings)
 	{
-		new (bs_alloc<ScriptSceneGizmos>()) ScriptSceneGizmos(managedInstance, camera->getHandle());
+		new (bs_alloc<ScriptSceneGizmos>()) ScriptSceneGizmos(managedInstance, camera->getHandle(), *drawSettings);
 	}
 
 	void ScriptSceneGizmos::internal_Draw(ScriptSceneGizmos* thisPtr)
@@ -40,6 +41,16 @@ namespace bs
 		const SPtr<Camera>& cameraPtr = thisPtr->mCamera->_getCamera();
 		cameraPtr->_updateState(*thisPtr->mCamera->SO());
 
-		GizmoManager::instance().update(cameraPtr);
+		GizmoManager::instance().update(cameraPtr, thisPtr->mDrawSettings);
+	}
+
+	void ScriptSceneGizmos::internal_GetDrawSettings(ScriptSceneGizmos* thisPtr, GizmoDrawSettings* settings)
+	{
+		*settings = thisPtr->mDrawSettings;
+	}
+
+	void ScriptSceneGizmos::internal_SetDrawSettings(ScriptSceneGizmos* thisPtr, GizmoDrawSettings* settings)
+	{
+		thisPtr->mDrawSettings = *settings;;
 	}
 }

+ 6 - 2
Source/EditorScript/Wrappers/BsScriptSceneGizmos.h

@@ -4,6 +4,7 @@
 
 #include "BsScriptEditorPrerequisites.h"
 #include "BsScriptObject.h"
+#include "Scene/BsGizmoManager.h"
 
 namespace bs
 {
@@ -20,16 +21,19 @@ namespace bs
 		SCRIPT_OBJ(EDITOR_ASSEMBLY, EDITOR_NS, "SceneGizmos")
 
 	private:
-		ScriptSceneGizmos(MonoObject* object, const HCamera& camera);
+		ScriptSceneGizmos(MonoObject* object, const HCamera& camera, const GizmoDrawSettings& drawSettings);
 		~ScriptSceneGizmos();
 
 		HCamera mCamera;
+		GizmoDrawSettings mDrawSettings;
 
 		/************************************************************************/
 		/* 								CLR HOOKS						   		*/
 		/************************************************************************/
-		static void internal_Create(MonoObject* managedInstance, ScriptCCamera* camera);
+		static void internal_Create(MonoObject* managedInstance, ScriptCCamera* camera, GizmoDrawSettings* drawSettings);
 		static void internal_Draw(ScriptSceneGizmos* thisPtr);
+		static void internal_SetDrawSettings(ScriptSceneGizmos* thisPtr, GizmoDrawSettings* settings);
+		static void internal_GetDrawSettings(ScriptSceneGizmos* thisPtr, GizmoDrawSettings* settings);
 	};
 
 	/** @} */

+ 25 - 10
Source/EditorScript/Wrappers/BsScriptSceneSelection.cpp

@@ -14,8 +14,9 @@
 
 namespace bs
 {
-	ScriptSceneSelection::ScriptSceneSelection(MonoObject* object, const SPtr<Camera>& camera)
-		:ScriptObject(object), mCamera(camera), mSelectionRenderer(nullptr)
+	ScriptSceneSelection::ScriptSceneSelection(MonoObject* object, const SPtr<Camera>& camera, 
+		const GizmoDrawSettings& gizmoDrawSettings)
+		:ScriptObject(object), mCamera(camera), mGizmoDrawSettings(gizmoDrawSettings)
 	{
 		mSelectionRenderer = bs_new<SelectionRenderer>();
 	}
@@ -32,11 +33,14 @@ namespace bs
 		metaData.scriptClass->addInternalCall("Internal_PickObject", (void*)&ScriptSceneSelection::internal_PickObject);
 		metaData.scriptClass->addInternalCall("Internal_PickObjects", (void*)&ScriptSceneSelection::internal_PickObjects);
 		metaData.scriptClass->addInternalCall("Internal_Snap", (void*)&ScriptSceneSelection::internal_Snap);
+		metaData.scriptClass->addInternalCall("Internal_SetGizmoDrawSettings", (void*)&ScriptSceneSelection::internal_SetGizmoDrawSettings);
+		metaData.scriptClass->addInternalCall("Internal_GetGizmoDrawSettings", (void*)&ScriptSceneSelection::internal_GetGizmoDrawSettings);
 	}
 
-	void ScriptSceneSelection::internal_Create(MonoObject* managedInstance, ScriptCCamera* camera)
+	void ScriptSceneSelection::internal_Create(MonoObject* managedInstance, ScriptCCamera* camera, GizmoDrawSettings* gizmoDrawSettings)
 	{
-		new (bs_alloc<ScriptSceneSelection>()) ScriptSceneSelection(managedInstance, camera->getHandle()->_getCamera());
+		new (bs_alloc<ScriptSceneSelection>()) ScriptSceneSelection(managedInstance, camera->getHandle()->_getCamera(), 
+			*gizmoDrawSettings);
 	}
 
 	void ScriptSceneSelection::internal_Draw(ScriptSceneSelection* thisPtr)
@@ -66,7 +70,8 @@ namespace bs
 			}
 		}
 
-		HSceneObject pickedObject = ScenePicking::instance().pickClosestObject(thisPtr->mCamera, *inputPos, Vector2I(1, 1), ignoredSceneObjects);
+		HSceneObject pickedObject = ScenePicking::instance().pickClosestObject(thisPtr->mCamera, 
+			thisPtr->mGizmoDrawSettings, *inputPos, Vector2I(1, 1), ignoredSceneObjects);
 		if (pickedObject)
 		{
 			if (additive) // Append to existing selection
@@ -117,10 +122,10 @@ namespace bs
 			}
 		}
 
-		Vector<HSceneObject> pickedObjects = ScenePicking::instance().pickObjects(thisPtr->mCamera, *inputPos, 
-			*area, ignoredSceneObjects);
+		Vector<HSceneObject> pickedObjects = ScenePicking::instance().pickObjects(thisPtr->mCamera, 
+			thisPtr->mGizmoDrawSettings, *inputPos, *area, ignoredSceneObjects);
 
-		if (pickedObjects.size() != 0)
+		if (!pickedObjects.empty())
 		{
 			if (additive) // Append to existing selection
 			{
@@ -176,8 +181,8 @@ namespace bs
 			}
 		}
 
-		HSceneObject instance = ScenePicking::instance().pickClosestObject(thisPtr->mCamera, *inputPos, Vector2I(1, 1), 
-			ignoredSceneObjects, data);
+		HSceneObject instance = ScenePicking::instance().pickClosestObject(thisPtr->mCamera, thisPtr->mGizmoDrawSettings,
+			*inputPos, Vector2I(1, 1), ignoredSceneObjects, data);
 
 		if (instance == nullptr)
 			return nullptr;
@@ -185,4 +190,14 @@ namespace bs
 		ScriptSceneObject* scriptSO = ScriptGameObjectManager::instance().getOrCreateScriptSceneObject(instance);
 		return scriptSO->getManagedInstance();
 	}
+
+	void ScriptSceneSelection::internal_GetGizmoDrawSettings(ScriptSceneSelection* thisPtr, GizmoDrawSettings* settings)
+	{
+		*settings = thisPtr->mGizmoDrawSettings;
+	}
+
+	void ScriptSceneSelection::internal_SetGizmoDrawSettings(ScriptSceneSelection* thisPtr, GizmoDrawSettings* settings)
+	{
+		thisPtr->mGizmoDrawSettings = *settings;;
+	}
 }

+ 7 - 3
Source/EditorScript/Wrappers/BsScriptSceneSelection.h

@@ -5,6 +5,7 @@
 #include "BsScriptEditorPrerequisites.h"
 #include "BsScriptObject.h"
 #include "Scene/BsScenePicking.h"
+#include "Scene/BsGizmoManager.h"
 
 namespace bs
 {
@@ -21,20 +22,23 @@ namespace bs
 		SCRIPT_OBJ(EDITOR_ASSEMBLY, EDITOR_NS, "SceneSelection")
 
 	private:
-		ScriptSceneSelection(MonoObject* object, const SPtr<Camera>& camera);
+		ScriptSceneSelection(MonoObject* object, const SPtr<Camera>& camera, const GizmoDrawSettings& gizmoDrawSettings);
 		~ScriptSceneSelection();
 
 		SPtr<Camera> mCamera;
-		SelectionRenderer* mSelectionRenderer;
+		SelectionRenderer* mSelectionRenderer = nullptr;
+		GizmoDrawSettings mGizmoDrawSettings;
 
 		/************************************************************************/
 		/* 								CLR HOOKS						   		*/
 		/************************************************************************/
-		static void internal_Create(MonoObject* managedInstance, ScriptCCamera* camera);
+		static void internal_Create(MonoObject* managedInstance, ScriptCCamera* camera, GizmoDrawSettings* gizmoDrawSettings);
 		static void internal_Draw(ScriptSceneSelection* thisPtr);
 		static void internal_PickObject(ScriptSceneSelection* thisPtr, Vector2I* inputPos, bool additive, MonoArray* ignoreRenderables);
 		static void internal_PickObjects(ScriptSceneSelection* thisPtr, Vector2I* inputPos, Vector2I* area, bool additive, MonoArray* ignoreRenderables);
 		static MonoObject* internal_Snap(ScriptSceneSelection* thisPtr, Vector2I* inputPos, SnapData* data, MonoArray* ignoreRenderables);
+		static void internal_SetGizmoDrawSettings(ScriptSceneSelection* thisPtr, GizmoDrawSettings* gizmoDrawSettings);
+		static void internal_GetGizmoDrawSettings(ScriptSceneSelection* thisPtr, GizmoDrawSettings* gizmoDrawSettings);
 	};
 
 	/** @} */