Added player character and step in/out of dialogue in scene 101
This commit is contained in:
+79
@@ -0,0 +1,79 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.ProBuilder;
|
||||
|
||||
namespace UnityEditor.ProBuilder.Actions
|
||||
{
|
||||
sealed class ToggleDragRectMode : MenuAction
|
||||
{
|
||||
RectSelectMode mode
|
||||
{
|
||||
get { return ProBuilderEditor.rectSelectMode; }
|
||||
set { ProBuilderEditor.rectSelectMode = value; }
|
||||
}
|
||||
|
||||
public override ToolbarGroup group
|
||||
{
|
||||
get { return ToolbarGroup.Selection; }
|
||||
}
|
||||
|
||||
public override string iconPath => "Toolbar/DragSelect_Off";
|
||||
public override Texture2D icon => m_Icons[mode == RectSelectMode.Partial ? 0 : 1];
|
||||
|
||||
internal Texture2D[] icons => m_Icons;
|
||||
Texture2D[] m_Icons;
|
||||
|
||||
public override TooltipContent tooltip
|
||||
{
|
||||
get { return s_Tooltip; }
|
||||
}
|
||||
|
||||
public override int toolbarPriority
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override SelectMode validSelectModes
|
||||
{
|
||||
get { return SelectMode.Edge | SelectMode.Face | SelectMode.TextureFace; }
|
||||
}
|
||||
|
||||
static readonly TooltipContent s_Tooltip = new TooltipContent
|
||||
(
|
||||
"Set Drag Rect Mode",
|
||||
"Sets whether or not a mesh element (edge or face) needs to be completely encompassed by a drag to be selected.\n\nThe default value is Intersect, meaning if any part of the elemnent is touched by the drag rectangle it will be selected."
|
||||
);
|
||||
|
||||
public override string menuTitle { get { return mode == RectSelectMode.Complete ? "Rect: Complete" : "Rect: Intersect"; } }
|
||||
|
||||
public ToggleDragRectMode()
|
||||
{
|
||||
m_Icons = new Texture2D[]
|
||||
{
|
||||
IconUtility.GetIcon("Toolbar/DragSelect_Off"),
|
||||
IconUtility.GetIcon("Toolbar/DragSelect_On")
|
||||
};
|
||||
}
|
||||
|
||||
internal override bool IsMenuItemChecked()
|
||||
{
|
||||
return mode == RectSelectMode.Complete;
|
||||
}
|
||||
|
||||
protected override ActionResult PerformActionImplementation()
|
||||
{
|
||||
mode = InternalUtility.NextEnumValue(mode);
|
||||
|
||||
return new ActionResult(ActionResult.Status.Success,
|
||||
"Set Drag Select\n" + (mode == RectSelectMode.Complete ? "Complete" : "Intersect"));
|
||||
}
|
||||
|
||||
public override bool enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return ProBuilderEditor.instance != null
|
||||
&& ProBuilderEditor.selectMode.ContainsFlag(SelectMode.Edge | SelectMode.Face | SelectMode.TextureFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19fd4a6987194c66bf04e55e19aa466b
|
||||
timeCreated: 1474401946
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.ProBuilder;
|
||||
|
||||
namespace UnityEditor.ProBuilder.Actions
|
||||
{
|
||||
sealed class ToggleHandleOrientation : MenuAction
|
||||
{
|
||||
Texture2D[] m_Icons;
|
||||
|
||||
internal HandleOrientation handleOrientation
|
||||
{
|
||||
get { return VertexManipulationTool.handleOrientation; }
|
||||
set
|
||||
{
|
||||
VertexManipulationTool.handleOrientation = value;
|
||||
ProBuilderEditor.Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
public override ToolbarGroup group
|
||||
{
|
||||
get { return ToolbarGroup.Selection; }
|
||||
}
|
||||
|
||||
public override string iconPath => "Modes/ToolHandleElement";
|
||||
public override Texture2D icon => m_Icons[(int)handleOrientation];
|
||||
|
||||
public override int toolbarPriority
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override TooltipContent tooltip
|
||||
{
|
||||
get { return k_Tooltips[(int)handleOrientation]; }
|
||||
}
|
||||
|
||||
internal static TooltipContent[] tooltips => k_Tooltips;
|
||||
static readonly TooltipContent[] k_Tooltips = new TooltipContent[]
|
||||
{
|
||||
new TooltipContent("Global", "The transform handle is oriented in a fixed direction."),
|
||||
new TooltipContent("Local", "The transform handle is aligned with the active object rotation."),
|
||||
new TooltipContent("Element", "The transform handle is aligned with the active element selection.")
|
||||
};
|
||||
|
||||
public override string menuTitle
|
||||
{
|
||||
get { return "Orientation: " + k_Tooltips[(int)handleOrientation].title; }
|
||||
}
|
||||
|
||||
public override SelectMode validSelectModes
|
||||
{
|
||||
get { return SelectMode.Vertex | SelectMode.Edge | SelectMode.Face; }
|
||||
}
|
||||
|
||||
public override bool hidden
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
const string k_NormalRotationIconPath = "Packages/com.unity.probuilder/Editor Default Resources/Icons/Modes/ToolHandleElement.png";
|
||||
|
||||
public ToggleHandleOrientation()
|
||||
{
|
||||
m_Icons = new Texture2D[]
|
||||
{
|
||||
IconUtility.GetIcon("Modes/ToolHandleGlobal"),
|
||||
IconUtility.GetIcon("Modes/ToolHandleLocal"),
|
||||
IconUtility.GetIcon("Modes/ToolHandleElement")
|
||||
};
|
||||
}
|
||||
|
||||
protected override ActionResult PerformActionImplementation()
|
||||
{
|
||||
handleOrientation = InternalUtility.NextEnumValue(handleOrientation);
|
||||
return new ActionResult(ActionResult.Status.Success, "Set Handle Orientation\n" + k_Tooltips[(int)handleOrientation].title);
|
||||
}
|
||||
|
||||
public override bool enabled
|
||||
{
|
||||
get { return ProBuilderEditor.instance != null; }
|
||||
}
|
||||
|
||||
public override void RegisterChangedCallbacks() => VertexManipulationTool.pivotRotationChanged += ContentsChanged;
|
||||
|
||||
public override void UnregisterChangedCallbacks() => VertexManipulationTool.pivotRotationChanged -= ContentsChanged;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53d27af1247a7d547aa00100fae732a0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.ProBuilder;
|
||||
|
||||
namespace UnityEditor.ProBuilder.Actions
|
||||
{
|
||||
sealed class ToggleSelectBackFaces : MenuAction
|
||||
{
|
||||
public override ToolbarGroup group
|
||||
{
|
||||
get { return ToolbarGroup.Selection; }
|
||||
}
|
||||
|
||||
public override string iconPath => "Toolbar/Selection_SelectHidden-Off";
|
||||
public override Texture2D icon => ProBuilderEditor.backfaceSelectionEnabled ? m_Icons[1] : m_Icons[0];
|
||||
|
||||
public override TooltipContent tooltip
|
||||
{
|
||||
get { return s_Tooltip; }
|
||||
}
|
||||
|
||||
public override int toolbarPriority
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
static readonly TooltipContent s_Tooltip = new TooltipContent
|
||||
(
|
||||
"Set Hidden Element Selection",
|
||||
"Setting Hidden Element Selection to On allows you to select faces that are either obscured by geometry or facing away from the scene camera (backfaces).\n\nThe default value is On.");
|
||||
|
||||
public override string menuTitle
|
||||
{
|
||||
get { return ProBuilderEditor.backfaceSelectionEnabled ? "Select Hidden: On" : "Select Hidden: Off"; }
|
||||
}
|
||||
|
||||
public override SelectMode validSelectModes
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelectMode.Vertex | SelectMode.Edge | SelectMode.Face | SelectMode.TextureFace;
|
||||
}
|
||||
}
|
||||
|
||||
internal Texture2D[] icons => m_Icons;
|
||||
Texture2D[] m_Icons;
|
||||
|
||||
public ToggleSelectBackFaces()
|
||||
{
|
||||
m_Icons = new Texture2D[]
|
||||
{
|
||||
IconUtility.GetIcon("Toolbar/Selection_SelectHidden-Off"),
|
||||
IconUtility.GetIcon("Toolbar/Selection_SelectHidden-On")
|
||||
};
|
||||
}
|
||||
|
||||
internal override bool IsMenuItemChecked() => ProBuilderEditor.backfaceSelectionEnabled;
|
||||
|
||||
protected override ActionResult PerformActionImplementation()
|
||||
{
|
||||
ProBuilderEditor.backfaceSelectionEnabled = !ProBuilderEditor.backfaceSelectionEnabled;
|
||||
return new ActionResult(ActionResult.Status.Success, "Set Hidden Element Selection\n" + (!ProBuilderEditor.backfaceSelectionEnabled ? "On" : "Off"));
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a61c5819f2b24f3fa336247228361725
|
||||
timeCreated: 1457456290
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.ProBuilder;
|
||||
|
||||
namespace UnityEditor.ProBuilder.Actions
|
||||
{
|
||||
sealed class ToggleXRay : MenuAction
|
||||
{
|
||||
public override ToolbarGroup group
|
||||
{
|
||||
get { return ToolbarGroup.Selection; }
|
||||
}
|
||||
|
||||
public override string iconPath => "Toolbar/Selection_SelectHidden-Off";
|
||||
public override Texture2D icon => ProBuilderEditor.backfaceSelectionEnabled ? m_Icons[1] : m_Icons[0];
|
||||
|
||||
public override TooltipContent tooltip
|
||||
{
|
||||
get { return k_Tooltip; }
|
||||
}
|
||||
|
||||
public override int toolbarPriority
|
||||
{
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
// Menu bar item only access for now
|
||||
public override bool hidden => true;
|
||||
|
||||
static readonly TooltipContent k_Tooltip = new TooltipContent
|
||||
(
|
||||
"Toggle X-Ray View",
|
||||
@"When enabled, selected mesh elements that are occluded by geometry will be rendered with a faded appearance.",
|
||||
keyCommandAlt, keyCommandShift, 'x'
|
||||
);
|
||||
|
||||
public override string menuTitle
|
||||
{
|
||||
get { return EditorHandleDrawing.xRay ? "X-Ray: On" : "X-Ray: Off"; }
|
||||
}
|
||||
|
||||
public override SelectMode validSelectModes
|
||||
{
|
||||
get { return SelectMode.Vertex | SelectMode.Edge | SelectMode.Face | SelectMode.TextureFace; }
|
||||
}
|
||||
|
||||
readonly Texture2D[] m_Icons;
|
||||
|
||||
public ToggleXRay()
|
||||
{
|
||||
m_Icons = new Texture2D[]
|
||||
{
|
||||
IconUtility.GetIcon("Toolbar/Selection_SelectHidden-Off"),
|
||||
IconUtility.GetIcon("Toolbar/Selection_SelectHidden-On")
|
||||
};
|
||||
}
|
||||
|
||||
internal override bool IsMenuItemChecked() => EditorHandleDrawing.xRay;
|
||||
|
||||
protected override ActionResult PerformActionImplementation()
|
||||
{
|
||||
EditorHandleDrawing.xRay = !EditorHandleDrawing.xRay;
|
||||
SceneView.RepaintAll();
|
||||
return new ActionResult(ActionResult.Status.Success, "Set X-Ray Vision\n" + (EditorHandleDrawing.xRay ? "On" : "Off"));
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0baa0b710695b7441836813416aa41af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user