Added player character and step in/out of dialogue in scene 101

This commit is contained in:
2026-08-15 15:22:47 +02:00
parent a42f25d5fa
commit 38ba2b0eff
2019 changed files with 181227 additions and 265 deletions
@@ -0,0 +1,70 @@
using System;
using UnityEngine;
using UnityEngine.ProBuilder;
using ToolManager = UnityEditor.EditorTools.ToolManager;
namespace UnityEditor.ProBuilder.Actions
{
/// <summary>
/// Represents the [Cut tool](../manual/cut-tool.html) button on the [ProBuilder toolbar](../manual/toolbar.html) in the Editor.
/// </summary>
public class CutToolAction : MenuAction
{
/// <inheritdoc/>
public override ToolbarGroup group
{
get { return ToolbarGroup.Tool; }
}
/// <inheritdoc/>
public override string iconPath => "Toolbar/CutTool";
/// <inheritdoc/>
public override Texture2D icon => IconUtility.GetIcon(iconPath);
/// <inheritdoc/>
public override TooltipContent tooltip
{
get { return s_Tooltip; }
}
/// <inheritdoc/>
public override SelectMode validSelectModes
{
get { return SelectMode.Vertex | SelectMode.Edge | SelectMode.Face; }
}
/// <inheritdoc/>
protected internal override bool hasFileMenuEntry
{
get { return false; }
}
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Cut Tool",
@"Create a cut in a face to subdivide it.",
keyCommandAlt, keyCommandShift, 'C'
);
/// <inheritdoc/>
public override bool enabled
{
get => MeshSelection.selectedObjectCount == 1;
}
/// <inheritdoc/>
protected override ActionResult PerformActionImplementation()
{
if(ToolManager.activeToolType == typeof(CutTool))
ToolManager.RestorePreviousTool();
else
ToolManager.SetActiveTool<CutTool>();
//Give the focus back to scene view to handle key inputs directly
SceneView.lastActiveSceneView.Focus();
return new ActionResult(ActionResult.Status.Success,"Cut Tool Starts");
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3033ae68453f7e54fa868c2610c9bc7d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
using UnityEngine.ProBuilder;
using UnityEngine;
namespace UnityEditor.ProBuilder.Actions
{
sealed class NewBezierShape : MenuAction
{
const string k_IconPath = "Toolbar/NewBezierSpline";
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => k_IconPath;
public override Texture2D icon => IconUtility.GetIcon(k_IconPath);
public override TooltipContent tooltip { get { return _tooltip; } }
public override string menuTitle { get { return "New Bezier Shape"; } }
public override int toolbarPriority { get { return 1; } }
static readonly TooltipContent _tooltip = new TooltipContent
(
"New Bezier Shape",
"Creates a new shape that is built by extruding along a bezier spline."
);
public override bool hidden
{
get { return !Experimental.experimentalFeaturesEnabled; }
}
public override bool enabled
{
get { return Experimental.experimentalFeaturesEnabled; }
}
protected override ActionResult PerformActionImplementation()
{
GameObject go = new GameObject();
var bezier = go.AddComponent<BezierShape>();
go.GetComponent<MeshRenderer>().sharedMaterial = EditorMaterialUtility.GetUserMaterial();
bezier.Init();
bezier.Refresh();
UndoUtility.RegisterCreatedObjectUndo(go, "Create Bezier Shape");
EditorUtility.InitObject(bezier.GetComponent<ProBuilderMesh>());
MeshSelection.SetSelection(go);
bezier.isEditing = true;
return new ActionResult(ActionResult.Status.Success, "Create Bezier Shape");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: ed8e5003f1d14f718326765fbb042572
timeCreated: 1487278078
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,36 @@
using UnityEngine.ProBuilder;
using UnityEngine;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenLightmapUVEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => string.Empty;
public override Texture2D icon => null;
public override TooltipContent tooltip { get { return s_Tooltip; } }
public override string menuTitle { get { return "Lightmap UV Editor"; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Lightmap UV Editor",
""
);
public override bool enabled
{
get { return true; }
}
public override bool hidden
{
get { return true; }
}
protected override ActionResult PerformActionImplementation()
{
EditorWindow.GetWindow<LightmapUVEditor>(true, "Lightmap UV Editor", true).position = LightmapUVEditor.desiredPosition;
return new ActionResult(ActionResult.Status.Success, "Open Lightmap UV Editor Window");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c851f089cbc73c141be8cc62b5dc057a
timeCreated: 1474046557
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,27 @@
using UnityEngine.ProBuilder;
using UnityEngine;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenMaterialEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => "Toolbar/Panel_Materials";
public override Texture2D icon => IconUtility.GetIcon(iconPath);
public override TooltipContent tooltip { get { return s_Tooltip; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Material Editor",
"Opens the Material Editor window.\n\nThe Material Editor window applies materials to selected faces or objects."
);
public override bool enabled => true;
protected override ActionResult PerformActionImplementation()
{
MaterialEditor.MenuOpenMaterialEditor();
return new ActionResult(ActionResult.Status.Success, "Open Materials Window");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2b43eb0a521a4a6a90bde45149e1c656
timeCreated: 1457452380
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
using UnityEngine.ProBuilder;
using UnityEditor.ProBuilder;
using UnityEngine;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenSmoothingEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => "Toolbar/Panel_Smoothing";
public override Texture2D icon => IconUtility.GetIcon(iconPath);
public override TooltipContent tooltip { get { return s_Tooltip; } }
public override string menuTitle { get { return "Smoothing"; } }
public override int toolbarPriority { get { return 2; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Smoothing Groups Editor",
@"Opens the Smoothing Group Editor.
Smoothing groups average the vertex normals with neighboring planes. This allows lighting to behave in a more realistic manner when dealing with edges that are intended to be smooth.
ProBuilder decides which edges should be smoothed by checking for neighboring faces that are in the same group. It also checks for Hard groups, which hardens edges of neighboring faces."
);
public override bool enabled => true;
protected override ActionResult PerformActionImplementation()
{
SmoothGroupEditor.MenuOpenSmoothGroupEditor();
return new ActionResult(ActionResult.Status.Success, "Open Smoothing Groups Editor");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 40af14f295f2434f9cfda219da2645a0
timeCreated: 1457452380
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
using UnityEngine.ProBuilder;
using UnityEditor.ProBuilder;
using UnityEngine;
using UnityEditor;
using UnityEditor.ProBuilder.UI;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenUVEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => "Toolbar/Panel_UVEditor";
public override Texture2D icon => IconUtility.GetIcon(iconPath);
public override TooltipContent tooltip { get { return s_Tooltip; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"UV Editor",
"Opens the UV Editor window.\n\nThe UV Editor allows you to change how textures are rendered on this mesh."
);
public override bool enabled => true;
protected override ActionResult PerformActionImplementation()
{
UVEditor.MenuOpenUVEditor();
return new ActionResult(ActionResult.Status.Success, "Open UV Window");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e985069a91a74567a338b55beddbf74c
timeCreated: 1457452380
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,28 @@
using UnityEngine.ProBuilder;
using UnityEngine;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenVertexColorEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => "Toolbar/Panel_VertColors";
public override Texture2D icon => IconUtility.GetIcon(iconPath);
public override TooltipContent tooltip { get { return s_Tooltip; } }
public override string menuTitle { get { return "Vertex Colors"; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Vertex Colors Editor",
"Opens the Vertex Color Palette.\n\nApply using Face mode for hard-edged colors.\nApply using Edge or Vertex mode for soft, blended colors."
);
public override bool enabled => true;
protected override ActionResult PerformActionImplementation()
{
VertexColorPalette.MenuOpenWindow();
return new ActionResult(ActionResult.Status.Success, "Open Vertex Color Window");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c8e7f2a60420444ba31322510285d625
timeCreated: 1457452380
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,32 @@
using UnityEngine.ProBuilder;
using UnityEditor.ProBuilder;
using UnityEngine;
using UnityEditor;
using UnityEditor.ProBuilder.UI;
namespace UnityEditor.ProBuilder.Actions
{
sealed class OpenVertexPositionEditor : MenuAction
{
public override ToolbarGroup group { get { return ToolbarGroup.Tool; } }
public override string iconPath => string.Empty;
public override Texture2D icon => null;
public override TooltipContent tooltip { get { return s_Tooltip; } }
public override string menuTitle { get { return "Vertex Editor"; } }
static readonly TooltipContent s_Tooltip = new TooltipContent
(
"Vertex Position Editor",
"Opens the vertex positions editor window."
);
public override bool enabled => true;
public override bool hidden => true;
protected override ActionResult PerformActionImplementation()
{
VertexPositionEditor.MenuOpenVertexEditor();
return new ActionResult(ActionResult.Status.Success, "Open Vertex Editor Window");
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0af7522e3732400388ebc019d869caf2
timeCreated: 1474046557
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: