add UI layer: dialogue stream, HUD, player menu, and skills panel
Runtime UI under Scripts/UI: a UIStateController owning menu/dialogue state, a PlayerControlLock so opening a panel suppresses world input, panel visibility helpers, and the menu input binding. Views: the dialogue stream presenter and its options presenter and message row, the portrait HUD, and the player menu with character, journal, and tab-bar views. Skills gains SkillsPanelView and SkillRowView, which is why the Skills asmdef now references UnityEngine.UI. Prefabs/UI holds the authored canvases (dialogue stream, HUD, player menu) and their rows. UILayerBootstrap remains a hand-added runtime fallback for scenes where those prefabs are not instantiated; it deliberately does not auto-spawn. Editor/UILayerSetup.cs is the one-shot menu that builds and wires those prefabs into a scene, with UILayerSetupAutoRun reminding after a script reload. Art/UI/Placeholder carries the placeholder portrait the HUD falls back to. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98c69c750f094ae79e2f9362c4422647
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6270e22570864d7c862434241018328f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bffd4617fb74418f9eb0d0d6378cf79a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff84645ddce3641b0a7e9c68db56c8db
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,84 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1b2c3d4e5f60718293a4b5c6d7e8f90
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,818 @@
|
||||
using System.IO;
|
||||
using NightclubArcadia.Cinematics;
|
||||
using NightclubArcadia.Dialogue;
|
||||
using NightclubArcadia.Skills;
|
||||
using NightclubArcadia.UI;
|
||||
using NightclubArcadia.UI.Dialogue;
|
||||
using NightclubArcadia.UI.HUD;
|
||||
using NightclubArcadia.UI.Menu;
|
||||
using StarterAssets;
|
||||
using TMPro;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Yarn.Unity;
|
||||
|
||||
/// <summary>
|
||||
/// Builds UI prefabs and wires them into DialogueTest.unity.
|
||||
/// Run via Tools → Nightclub Arcadia → Set Up UI Layer.
|
||||
/// </summary>
|
||||
public static class UILayerSetup
|
||||
{
|
||||
const string ScenePath = "Assets/Scenes/DialogueTest.unity";
|
||||
const string PrefabFolder = "Assets/Prefabs/UI";
|
||||
const string ArtFolder = "Assets/Art/UI/Placeholder";
|
||||
|
||||
// Nested Resources folder: UILayerBootstrap builds the HUD at runtime and
|
||||
// can only reach the sprite through Resources.Load. Keeping it under
|
||||
// Art/UI/Placeholder preserves the organisation while making it
|
||||
// build-safe — an AssetDatabase-only path is null outside the editor.
|
||||
const string PortraitFolder = ArtFolder + "/Resources";
|
||||
const string PortraitPath = PortraitFolder + "/portrait_placeholder.png";
|
||||
const string MessageRowPrefabPath = PrefabFolder + "/DialogueMessageRow.prefab";
|
||||
const string StreamCanvasPrefabPath = PrefabFolder + "/DialogueStreamCanvas.prefab";
|
||||
const string HudCanvasPrefabPath = PrefabFolder + "/HudCanvas.prefab";
|
||||
const string SkillRowPrefabPath = PrefabFolder + "/SkillRow.prefab";
|
||||
const string MenuCanvasPrefabPath = PrefabFolder + "/PlayerMenuCanvas.prefab";
|
||||
|
||||
[MenuItem("Tools/Nightclub Arcadia/Set Up UI Layer")]
|
||||
public static void SetUp()
|
||||
{
|
||||
EnsureFolders();
|
||||
CreatePortraitPlaceholder();
|
||||
|
||||
var messageRow = CreateMessageRowPrefab();
|
||||
var skillRow = CreateSkillRowPrefab();
|
||||
var streamCanvas = CreateDialogueStreamCanvasPrefab(messageRow);
|
||||
var hudCanvas = CreateHudCanvasPrefab();
|
||||
var menuCanvas = CreatePlayerMenuCanvasPrefab(skillRow);
|
||||
|
||||
WireScene(streamCanvas, hudCanvas, menuCanvas);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
Debug.Log("[UILayerSetup] UI layer setup complete.");
|
||||
}
|
||||
|
||||
static void EnsureFolders()
|
||||
{
|
||||
EnsureFolder("Assets/Prefabs");
|
||||
EnsureFolder(PrefabFolder);
|
||||
EnsureFolder("Assets/Art");
|
||||
EnsureFolder("Assets/Art/UI");
|
||||
EnsureFolder(ArtFolder);
|
||||
EnsureFolder(PortraitFolder);
|
||||
}
|
||||
|
||||
static void EnsureFolder(string path)
|
||||
{
|
||||
if (AssetDatabase.IsValidFolder(path))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Path.GetDirectoryName(path)?.Replace('\\', '/');
|
||||
var name = Path.GetFileName(path);
|
||||
if (!string.IsNullOrEmpty(parent) && !string.IsNullOrEmpty(name))
|
||||
{
|
||||
AssetDatabase.CreateFolder(parent, name);
|
||||
}
|
||||
}
|
||||
|
||||
static void CreatePortraitPlaceholder()
|
||||
{
|
||||
if (File.Exists(PortraitPath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var tex = new Texture2D(512, 512, TextureFormat.RGBA32, false);
|
||||
var dark = new Color(0.12f, 0.12f, 0.14f, 1f);
|
||||
var mid = new Color(0.35f, 0.35f, 0.4f, 1f);
|
||||
for (var y = 0; y < 512; y++)
|
||||
{
|
||||
for (var x = 0; x < 512; x++)
|
||||
{
|
||||
var dx = (x - 256) / 256f;
|
||||
var dy = (y - 280) / 256f;
|
||||
var inHead = dx * dx + dy * dy < 0.12f;
|
||||
var inBody = Mathf.Abs(dx) < 0.22f && y < 220 && y > 40;
|
||||
tex.SetPixel(x, y, inHead || inBody ? mid : dark);
|
||||
}
|
||||
}
|
||||
|
||||
tex.Apply();
|
||||
File.WriteAllBytes(PortraitPath, tex.EncodeToPNG());
|
||||
Object.DestroyImmediate(tex);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
var importer = AssetImporter.GetAtPath(PortraitPath) as TextureImporter;
|
||||
if (importer != null)
|
||||
{
|
||||
importer.textureType = TextureImporterType.Sprite;
|
||||
importer.spritePixelsPerUnit = 100;
|
||||
importer.SaveAndReimport();
|
||||
}
|
||||
}
|
||||
|
||||
static GameObject CreateMessageRowPrefab()
|
||||
{
|
||||
var root = new GameObject("DialogueMessageRow", typeof(RectTransform), typeof(DialogueMessageRow));
|
||||
var rootRt = root.GetComponent<RectTransform>();
|
||||
rootRt.sizeDelta = new Vector2(0f, 80f);
|
||||
|
||||
var layout = root.AddComponent<VerticalLayoutGroup>();
|
||||
layout.padding = new RectOffset(12, 12, 8, 8);
|
||||
layout.spacing = 4f;
|
||||
layout.childControlHeight = true;
|
||||
layout.childControlWidth = true;
|
||||
layout.childForceExpandHeight = false;
|
||||
layout.childForceExpandWidth = true;
|
||||
|
||||
var fitter = root.AddComponent<ContentSizeFitter>();
|
||||
fitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
fitter.horizontalFit = ContentSizeFitter.FitMode.Unconstrained;
|
||||
|
||||
var speakerGo = CreateTmp("Speaker", root.transform, 22f, FontStyles.Bold, TextAlignmentOptions.Left);
|
||||
var bodyGo = CreateTmp("Body", root.transform, 28f, FontStyles.Normal, TextAlignmentOptions.TopLeft);
|
||||
|
||||
var row = root.GetComponent<DialogueMessageRow>();
|
||||
var so = new SerializedObject(row);
|
||||
so.FindProperty("speakerText").objectReferenceValue = speakerGo.GetComponent<TMP_Text>();
|
||||
so.FindProperty("bodyText").objectReferenceValue = bodyGo.GetComponent<TMP_Text>();
|
||||
so.FindProperty("speakerLabel").objectReferenceValue = speakerGo;
|
||||
so.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var prefab = PrefabUtility.SaveAsPrefabAsset(root, MessageRowPrefabPath);
|
||||
Object.DestroyImmediate(root);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
static GameObject CreateSkillRowPrefab()
|
||||
{
|
||||
var root = new GameObject("SkillRow", typeof(RectTransform), typeof(SkillRowView));
|
||||
var rootRt = root.GetComponent<RectTransform>();
|
||||
rootRt.sizeDelta = new Vector2(0f, 48f);
|
||||
|
||||
var hlg = root.AddComponent<HorizontalLayoutGroup>();
|
||||
hlg.padding = new RectOffset(8, 8, 4, 4);
|
||||
hlg.spacing = 12f;
|
||||
hlg.childAlignment = TextAnchor.MiddleLeft;
|
||||
hlg.childControlHeight = true;
|
||||
hlg.childControlWidth = true;
|
||||
hlg.childForceExpandHeight = true;
|
||||
hlg.childForceExpandWidth = false;
|
||||
|
||||
var stripe = CreateUiImage("Accent", root.transform, new Color(1f, 1f, 1f, 1f));
|
||||
stripe.GetComponent<LayoutElement>().preferredWidth = 6f;
|
||||
stripe.GetComponent<LayoutElement>().flexibleWidth = 0f;
|
||||
|
||||
var nameGo = CreateTmp("Name", root.transform, 24f, FontStyles.Bold, TextAlignmentOptions.Left);
|
||||
nameGo.GetComponent<LayoutElement>().flexibleWidth = 1f;
|
||||
|
||||
var barGo = new GameObject("Bar", typeof(RectTransform), typeof(Image), typeof(LayoutElement));
|
||||
barGo.transform.SetParent(root.transform, false);
|
||||
barGo.GetComponent<Image>().color = new Color(0.2f, 0.2f, 0.22f, 1f);
|
||||
barGo.GetComponent<LayoutElement>().preferredWidth = 160f;
|
||||
barGo.GetComponent<LayoutElement>().flexibleWidth = 0f;
|
||||
barGo.GetComponent<LayoutElement>().preferredHeight = 16f;
|
||||
|
||||
var fillGo = CreateUiImage("Fill", barGo.transform, Color.white);
|
||||
var fillRt = fillGo.GetComponent<RectTransform>();
|
||||
fillRt.anchorMin = Vector2.zero;
|
||||
fillRt.anchorMax = Vector2.one;
|
||||
fillRt.offsetMin = Vector2.zero;
|
||||
fillRt.offsetMax = Vector2.zero;
|
||||
var fillImage = fillGo.GetComponent<Image>();
|
||||
fillImage.type = Image.Type.Filled;
|
||||
fillImage.fillMethod = Image.FillMethod.Horizontal;
|
||||
fillImage.fillAmount = 0.2f;
|
||||
Object.DestroyImmediate(fillGo.GetComponent<LayoutElement>());
|
||||
|
||||
var rankGo = CreateTmp("Rank", root.transform, 24f, FontStyles.Normal, TextAlignmentOptions.Right);
|
||||
rankGo.GetComponent<LayoutElement>().preferredWidth = 40f;
|
||||
rankGo.GetComponent<LayoutElement>().flexibleWidth = 0f;
|
||||
|
||||
var view = root.GetComponent<SkillRowView>();
|
||||
var so = new SerializedObject(view);
|
||||
so.FindProperty("nameLabel").objectReferenceValue = nameGo.GetComponent<TMP_Text>();
|
||||
so.FindProperty("rankLabel").objectReferenceValue = rankGo.GetComponent<TMP_Text>();
|
||||
so.FindProperty("barFill").objectReferenceValue = fillImage;
|
||||
so.FindProperty("accentStripe").objectReferenceValue = stripe.GetComponent<Image>();
|
||||
so.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var prefab = PrefabUtility.SaveAsPrefabAsset(root, SkillRowPrefabPath);
|
||||
Object.DestroyImmediate(root);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
static GameObject CreateDialogueStreamCanvasPrefab(GameObject messageRowPrefab)
|
||||
{
|
||||
var canvasGo = CreateCanvas("DialogueStreamCanvas", 5);
|
||||
var canvasGroup = canvasGo.AddComponent<CanvasGroup>();
|
||||
|
||||
var panel = new GameObject("Panel", typeof(RectTransform), typeof(Image));
|
||||
panel.transform.SetParent(canvasGo.transform, false);
|
||||
var panelRt = panel.GetComponent<RectTransform>();
|
||||
panelRt.anchorMin = new Vector2(0.66f, 0f);
|
||||
panelRt.anchorMax = new Vector2(1f, 1f);
|
||||
panelRt.offsetMin = Vector2.zero;
|
||||
panelRt.offsetMax = Vector2.zero;
|
||||
panel.GetComponent<Image>().color = new Color(0.05f, 0.05f, 0.08f, 0.92f);
|
||||
|
||||
var scrollGo = new GameObject("Scroll", typeof(RectTransform), typeof(ScrollRect), typeof(Image));
|
||||
scrollGo.transform.SetParent(panel.transform, false);
|
||||
Stretch(scrollGo.GetComponent<RectTransform>(), 8f);
|
||||
scrollGo.GetComponent<Image>().color = new Color(0f, 0f, 0f, 0.01f);
|
||||
|
||||
var viewport = new GameObject("Viewport", typeof(RectTransform), typeof(RectMask2D), typeof(Image));
|
||||
viewport.transform.SetParent(scrollGo.transform, false);
|
||||
Stretch(viewport.GetComponent<RectTransform>());
|
||||
viewport.GetComponent<Image>().color = new Color(1f, 1f, 1f, 0.01f);
|
||||
|
||||
var content = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
content.transform.SetParent(viewport.transform, false);
|
||||
var contentRt = content.GetComponent<RectTransform>();
|
||||
contentRt.anchorMin = new Vector2(0f, 0f);
|
||||
contentRt.anchorMax = new Vector2(1f, 0f);
|
||||
contentRt.pivot = new Vector2(0.5f, 0f);
|
||||
contentRt.sizeDelta = new Vector2(0f, 0f);
|
||||
|
||||
var vlg = content.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.childAlignment = TextAnchor.LowerCenter;
|
||||
vlg.childControlHeight = true;
|
||||
vlg.childControlWidth = true;
|
||||
vlg.childForceExpandHeight = false;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.spacing = 6f;
|
||||
vlg.padding = new RectOffset(4, 4, 8, 8);
|
||||
|
||||
var csf = content.GetComponent<ContentSizeFitter>();
|
||||
csf.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
|
||||
var messages = new GameObject("Messages", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
messages.transform.SetParent(content.transform, false);
|
||||
ConfigureVerticalContent(messages);
|
||||
|
||||
var options = new GameObject("Options", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter), typeof(CanvasGroup));
|
||||
options.transform.SetParent(content.transform, false);
|
||||
ConfigureVerticalContent(options);
|
||||
var optionsGroup = options.GetComponent<CanvasGroup>();
|
||||
optionsGroup.alpha = 0f;
|
||||
optionsGroup.interactable = false;
|
||||
optionsGroup.blocksRaycasts = false;
|
||||
|
||||
var scroll = scrollGo.GetComponent<ScrollRect>();
|
||||
scroll.content = contentRt;
|
||||
scroll.viewport = viewport.GetComponent<RectTransform>();
|
||||
scroll.horizontal = false;
|
||||
scroll.vertical = true;
|
||||
scroll.movementType = ScrollRect.MovementType.Clamped;
|
||||
|
||||
var streamPresenter = canvasGo.AddComponent<DialogueStreamPresenter>();
|
||||
var streamSo = new SerializedObject(streamPresenter);
|
||||
streamSo.FindProperty("messageRowPrefab").objectReferenceValue = messageRowPrefab.GetComponent<DialogueMessageRow>();
|
||||
streamSo.FindProperty("messageContainer").objectReferenceValue = messages.GetComponent<RectTransform>();
|
||||
streamSo.FindProperty("scrollRect").objectReferenceValue = scroll;
|
||||
streamSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var optionPrefab = AssetDatabase.LoadAssetAtPath<GameObject>(
|
||||
"Packages/dev.yarnspinner.unity/Prefabs/Option Item.prefab");
|
||||
var optionsPresenter = canvasGo.AddComponent<DialogueStreamOptionsPresenter>();
|
||||
var optSo = new SerializedObject(optionsPresenter);
|
||||
if (optionPrefab != null)
|
||||
{
|
||||
optSo.FindProperty("optionViewPrefab").objectReferenceValue = optionPrefab.GetComponent<OptionItem>();
|
||||
}
|
||||
|
||||
optSo.FindProperty("optionsContainer").objectReferenceValue = options.transform;
|
||||
optSo.FindProperty("canvasGroup").objectReferenceValue = optionsGroup;
|
||||
optSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
// Start hidden — DialogueTransitionController shows it.
|
||||
canvasGroup.alpha = 0f;
|
||||
canvasGroup.interactable = false;
|
||||
canvasGroup.blocksRaycasts = false;
|
||||
|
||||
var prefab = PrefabUtility.SaveAsPrefabAsset(canvasGo, StreamCanvasPrefabPath);
|
||||
Object.DestroyImmediate(canvasGo);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
static GameObject CreateHudCanvasPrefab()
|
||||
{
|
||||
var canvasGo = CreateCanvas("HudCanvas", 10);
|
||||
var portraitSprite = AssetDatabase.LoadAssetAtPath<Sprite>(PortraitPath);
|
||||
|
||||
var panel = new GameObject("PortraitPanel", typeof(RectTransform), typeof(CanvasGroup), typeof(Image), typeof(Button));
|
||||
panel.transform.SetParent(canvasGo.transform, false);
|
||||
var panelRt = panel.GetComponent<RectTransform>();
|
||||
panelRt.anchorMin = new Vector2(1f, 0f);
|
||||
panelRt.anchorMax = new Vector2(1f, 0f);
|
||||
panelRt.pivot = new Vector2(1f, 0f);
|
||||
panelRt.sizeDelta = new Vector2(220f, 280f);
|
||||
panelRt.anchoredPosition = new Vector2(-24f, 24f);
|
||||
panel.GetComponent<Image>().color = new Color(0.15f, 0.15f, 0.18f, 0.95f);
|
||||
if (portraitSprite != null)
|
||||
{
|
||||
panel.GetComponent<Image>().sprite = portraitSprite;
|
||||
panel.GetComponent<Image>().preserveAspect = true;
|
||||
}
|
||||
|
||||
var hint = CreateTmp("TabHint", panel.transform, 18f, FontStyles.Normal, TextAlignmentOptions.Center);
|
||||
var hintRt = hint.GetComponent<RectTransform>();
|
||||
hintRt.anchorMin = new Vector2(0f, 0f);
|
||||
hintRt.anchorMax = new Vector2(1f, 0f);
|
||||
hintRt.pivot = new Vector2(0.5f, 0f);
|
||||
hintRt.sizeDelta = new Vector2(0f, 28f);
|
||||
hintRt.anchoredPosition = new Vector2(0f, 4f);
|
||||
hint.GetComponent<TMP_Text>().text = "Tab";
|
||||
Object.DestroyImmediate(hint.GetComponent<LayoutElement>());
|
||||
|
||||
var view = canvasGo.AddComponent<PortraitHudView>();
|
||||
var so = new SerializedObject(view);
|
||||
so.FindProperty("panelRoot").objectReferenceValue = panel;
|
||||
so.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var prefab = PrefabUtility.SaveAsPrefabAsset(canvasGo, HudCanvasPrefabPath);
|
||||
Object.DestroyImmediate(canvasGo);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
static GameObject CreatePlayerMenuCanvasPrefab(GameObject skillRowPrefab)
|
||||
{
|
||||
var canvasGo = CreateCanvas("PlayerMenuCanvas", 20);
|
||||
var rootGroup = canvasGo.AddComponent<CanvasGroup>();
|
||||
|
||||
var dimmer = CreateUiImage("Dimmer", canvasGo.transform, new Color(0f, 0f, 0f, 0.6f));
|
||||
Stretch(dimmer.GetComponent<RectTransform>());
|
||||
Object.DestroyImmediate(dimmer.GetComponent<LayoutElement>());
|
||||
|
||||
var body = new GameObject("MenuBody", typeof(RectTransform), typeof(Image));
|
||||
body.transform.SetParent(canvasGo.transform, false);
|
||||
var bodyRt = body.GetComponent<RectTransform>();
|
||||
bodyRt.anchorMin = new Vector2(0.15f, 0.1f);
|
||||
bodyRt.anchorMax = new Vector2(0.85f, 0.9f);
|
||||
bodyRt.offsetMin = Vector2.zero;
|
||||
bodyRt.offsetMax = Vector2.zero;
|
||||
body.GetComponent<Image>().color = new Color(0.08f, 0.08f, 0.1f, 0.98f);
|
||||
|
||||
var tabBarGo = new GameObject("TabBar", typeof(RectTransform), typeof(HorizontalLayoutGroup), typeof(MenuTabBar));
|
||||
tabBarGo.transform.SetParent(body.transform, false);
|
||||
var tabBarRt = tabBarGo.GetComponent<RectTransform>();
|
||||
tabBarRt.anchorMin = new Vector2(0f, 1f);
|
||||
tabBarRt.anchorMax = new Vector2(1f, 1f);
|
||||
tabBarRt.pivot = new Vector2(0.5f, 1f);
|
||||
tabBarRt.sizeDelta = new Vector2(0f, 56f);
|
||||
tabBarRt.anchoredPosition = Vector2.zero;
|
||||
var tabHlg = tabBarGo.GetComponent<HorizontalLayoutGroup>();
|
||||
tabHlg.spacing = 8f;
|
||||
tabHlg.padding = new RectOffset(12, 12, 8, 8);
|
||||
// childControl* default to FALSE on a script-added layout group. Left
|
||||
// false, each tab button keeps its own 100px sizeDelta ("Character"
|
||||
// clips to "Charact") and childForceExpandWidth dumps all the leftover
|
||||
// room between them as a gap instead of widening them.
|
||||
tabHlg.childControlWidth = true;
|
||||
tabHlg.childControlHeight = true;
|
||||
tabHlg.childForceExpandWidth = true;
|
||||
tabHlg.childForceExpandHeight = true;
|
||||
|
||||
var contentArea = new GameObject("ContentArea", typeof(RectTransform));
|
||||
contentArea.transform.SetParent(body.transform, false);
|
||||
var contentRt = contentArea.GetComponent<RectTransform>();
|
||||
contentRt.anchorMin = new Vector2(0f, 0f);
|
||||
contentRt.anchorMax = new Vector2(1f, 1f);
|
||||
contentRt.offsetMin = new Vector2(16f, 16f);
|
||||
contentRt.offsetMax = new Vector2(-16f, -64f);
|
||||
|
||||
var characterPanel = CreateTabPanel("CharacterPanel", contentArea.transform);
|
||||
var skillsPanel = CreateTabPanel("SkillsPanel", contentArea.transform);
|
||||
var journalPanel = CreateTabPanel("JournalPanel", contentArea.transform);
|
||||
|
||||
// Character content
|
||||
var charView = characterPanel.AddComponent<CharacterPanelView>();
|
||||
var nameLabel = CreateTmp("Name", characterPanel.transform, 36f, FontStyles.Bold, TextAlignmentOptions.Left);
|
||||
var aliasLabel = CreateTmp("Alias", characterPanel.transform, 28f, FontStyles.Italic, TextAlignmentOptions.Left);
|
||||
var invLabel = CreateTmp("Inventory", characterPanel.transform, 24f, FontStyles.Normal, TextAlignmentOptions.Left);
|
||||
var charVlg = characterPanel.AddComponent<VerticalLayoutGroup>();
|
||||
charVlg.spacing = 12f;
|
||||
charVlg.padding = new RectOffset(8, 8, 8, 8);
|
||||
charVlg.childControlWidth = true;
|
||||
charVlg.childControlHeight = true;
|
||||
charVlg.childForceExpandWidth = true;
|
||||
charVlg.childForceExpandHeight = false;
|
||||
var charSo = new SerializedObject(charView);
|
||||
charSo.FindProperty("nameLabel").objectReferenceValue = nameLabel.GetComponent<TMP_Text>();
|
||||
charSo.FindProperty("aliasLabel").objectReferenceValue = aliasLabel.GetComponent<TMP_Text>();
|
||||
charSo.FindProperty("inventoryPlaceholder").objectReferenceValue = invLabel.GetComponent<TMP_Text>();
|
||||
charSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
// Skills content
|
||||
var skillsScroll = new GameObject("SkillsScroll", typeof(RectTransform), typeof(ScrollRect));
|
||||
skillsScroll.transform.SetParent(skillsPanel.transform, false);
|
||||
Stretch(skillsScroll.GetComponent<RectTransform>());
|
||||
var skillsViewport = new GameObject("Viewport", typeof(RectTransform), typeof(RectMask2D), typeof(Image));
|
||||
skillsViewport.transform.SetParent(skillsScroll.transform, false);
|
||||
Stretch(skillsViewport.GetComponent<RectTransform>());
|
||||
skillsViewport.GetComponent<Image>().color = new Color(1f, 1f, 1f, 0.01f);
|
||||
var skillsContent = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
skillsContent.transform.SetParent(skillsViewport.transform, false);
|
||||
ConfigureVerticalContent(skillsContent);
|
||||
var skillsContentRt = skillsContent.GetComponent<RectTransform>();
|
||||
skillsContentRt.anchorMin = new Vector2(0f, 1f);
|
||||
skillsContentRt.anchorMax = new Vector2(1f, 1f);
|
||||
skillsContentRt.pivot = new Vector2(0.5f, 1f);
|
||||
var skillsScrollRect = skillsScroll.GetComponent<ScrollRect>();
|
||||
skillsScrollRect.content = skillsContentRt;
|
||||
skillsScrollRect.viewport = skillsViewport.GetComponent<RectTransform>();
|
||||
skillsScrollRect.horizontal = false;
|
||||
|
||||
var axisHeaderTemplate = CreateTmp("AxisHeaderTemplate", skillsContent.transform, 20f, FontStyles.Bold, TextAlignmentOptions.Left);
|
||||
axisHeaderTemplate.SetActive(false);
|
||||
|
||||
var skillsView = skillsPanel.AddComponent<SkillsPanelView>();
|
||||
var skillsSo = new SerializedObject(skillsView);
|
||||
skillsSo.FindProperty("contentRoot").objectReferenceValue = skillsContentRt;
|
||||
skillsSo.FindProperty("rowPrefab").objectReferenceValue = skillRowPrefab.GetComponent<SkillRowView>();
|
||||
skillsSo.FindProperty("axisHeaderPrefab").objectReferenceValue = axisHeaderTemplate.GetComponent<TMP_Text>();
|
||||
skillsSo.FindProperty("displayMaxRank").intValue = 6;
|
||||
skillsSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
// Journal content
|
||||
var journalView = journalPanel.AddComponent<JournalPanelView>();
|
||||
var journalLabel = CreateTmp("Placeholder", journalPanel.transform, 28f, FontStyles.Italic, TextAlignmentOptions.Center);
|
||||
Stretch(journalLabel.GetComponent<RectTransform>());
|
||||
Object.DestroyImmediate(journalLabel.GetComponent<LayoutElement>());
|
||||
var journalSo = new SerializedObject(journalView);
|
||||
journalSo.FindProperty("placeholderLabel").objectReferenceValue = journalLabel.GetComponent<TMP_Text>();
|
||||
journalSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var charBtn = CreateTabButton("Character", tabBarGo.transform);
|
||||
var skillsBtn = CreateTabButton("Skills", tabBarGo.transform);
|
||||
var journalBtn = CreateTabButton("Journal", tabBarGo.transform);
|
||||
|
||||
var tabBar = tabBarGo.GetComponent<MenuTabBar>();
|
||||
var tabSo = new SerializedObject(tabBar);
|
||||
var tabsProp = tabSo.FindProperty("tabs");
|
||||
tabsProp.arraySize = 3;
|
||||
// Character tab must refresh on show for the same reason as Skills:
|
||||
// panels toggle via CanvasGroup, so OnEnable never fires again.
|
||||
SetTabEntry(tabsProp.GetArrayElementAtIndex(0), charBtn.GetComponent<Button>(), characterPanel.GetComponent<CanvasGroup>(), charView, "Refresh");
|
||||
SetTabEntry(tabsProp.GetArrayElementAtIndex(1), skillsBtn.GetComponent<Button>(), skillsPanel.GetComponent<CanvasGroup>(), skillsView, "Refresh");
|
||||
SetTabEntry(tabsProp.GetArrayElementAtIndex(2), journalBtn.GetComponent<Button>(), journalPanel.GetComponent<CanvasGroup>(), null);
|
||||
tabSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
var menuController = canvasGo.AddComponent<PlayerMenuController>();
|
||||
var menuSo = new SerializedObject(menuController);
|
||||
menuSo.FindProperty("menuRoot").objectReferenceValue = canvasGo;
|
||||
menuSo.FindProperty("tabBar").objectReferenceValue = tabBar;
|
||||
menuSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
|
||||
rootGroup.alpha = 0f;
|
||||
rootGroup.interactable = false;
|
||||
rootGroup.blocksRaycasts = false;
|
||||
|
||||
var prefab = PrefabUtility.SaveAsPrefabAsset(canvasGo, MenuCanvasPrefabPath);
|
||||
Object.DestroyImmediate(canvasGo);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
static void SetTabEntry(SerializedProperty entry, Button button, CanvasGroup panel, Object target, string method = null)
|
||||
{
|
||||
entry.FindPropertyRelative("button").objectReferenceValue = button;
|
||||
entry.FindPropertyRelative("panel").objectReferenceValue = panel;
|
||||
if (target != null && method != null)
|
||||
{
|
||||
var onShown = entry.FindPropertyRelative("onShown");
|
||||
onShown.FindPropertyRelative("m_PersistentCalls.m_Calls").arraySize = 1;
|
||||
var call = onShown.FindPropertyRelative("m_PersistentCalls.m_Calls").GetArrayElementAtIndex(0);
|
||||
call.FindPropertyRelative("m_Target").objectReferenceValue = target;
|
||||
call.FindPropertyRelative("m_MethodName").stringValue = method;
|
||||
call.FindPropertyRelative("m_Mode").enumValueIndex = 1; // Void
|
||||
call.FindPropertyRelative("m_CallState").enumValueIndex = 2; // RuntimeOnly
|
||||
}
|
||||
}
|
||||
|
||||
static void WireScene(GameObject streamCanvasPrefab, GameObject hudCanvasPrefab, GameObject menuCanvasPrefab)
|
||||
{
|
||||
var scene = EditorSceneManager.OpenScene(ScenePath, OpenSceneMode.Single);
|
||||
|
||||
// UI System root
|
||||
var uiSystem = GameObject.Find("UI System");
|
||||
if (uiSystem == null)
|
||||
{
|
||||
uiSystem = new GameObject("UI System");
|
||||
}
|
||||
|
||||
if (uiSystem.GetComponent<UIStateController>() == null)
|
||||
{
|
||||
uiSystem.AddComponent<UIStateController>();
|
||||
}
|
||||
|
||||
// Player components
|
||||
var player = GameObject.Find("PlayerArmature");
|
||||
if (player == null)
|
||||
{
|
||||
Debug.LogError("[UILayerSetup] PlayerArmature not found in scene.");
|
||||
return;
|
||||
}
|
||||
|
||||
var controlLock = player.GetComponent<PlayerControlLock>();
|
||||
if (controlLock == null)
|
||||
{
|
||||
controlLock = player.AddComponent<PlayerControlLock>();
|
||||
}
|
||||
|
||||
var menuInput = player.GetComponent<PlayerMenuInput>();
|
||||
if (menuInput == null)
|
||||
{
|
||||
menuInput = player.AddComponent<PlayerMenuInput>();
|
||||
}
|
||||
|
||||
var inputs = player.GetComponent<StarterAssetsInputs>();
|
||||
if (inputs != null)
|
||||
{
|
||||
inputs.cursorLocked = false;
|
||||
EditorUtility.SetDirty(inputs);
|
||||
}
|
||||
|
||||
// DialogueTransitionController
|
||||
var transition = Object.FindFirstObjectByType<DialogueTransitionController>();
|
||||
if (transition != null)
|
||||
{
|
||||
var tSo = new SerializedObject(transition);
|
||||
tSo.FindProperty("controlLock").objectReferenceValue = controlLock;
|
||||
tSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
// Instantiate / refresh UI prefab instances
|
||||
var streamInstance = EnsurePrefabInstance(streamCanvasPrefab, "DialogueStreamCanvas");
|
||||
var hudInstance = EnsurePrefabInstance(hudCanvasPrefab, "HudCanvas");
|
||||
var menuInstance = EnsurePrefabInstance(menuCanvasPrefab, "PlayerMenuCanvas");
|
||||
|
||||
// Wire menu controller refs
|
||||
var menuController = menuInstance.GetComponent<PlayerMenuController>();
|
||||
if (menuController != null)
|
||||
{
|
||||
var mSo = new SerializedObject(menuController);
|
||||
mSo.FindProperty("menuInput").objectReferenceValue = menuInput;
|
||||
mSo.FindProperty("controlLock").objectReferenceValue = controlLock;
|
||||
mSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
// Portrait → Open menu
|
||||
var portraitButton = hudInstance.GetComponentInChildren<Button>(true);
|
||||
if (portraitButton != null && menuController != null)
|
||||
{
|
||||
while (portraitButton.onClick.GetPersistentEventCount() > 0)
|
||||
{
|
||||
UnityEditor.Events.UnityEventTools.RemovePersistentListener(portraitButton.onClick, 0);
|
||||
}
|
||||
|
||||
UnityEditor.Events.UnityEventTools.AddPersistentListener(portraitButton.onClick, menuController.Open);
|
||||
EditorUtility.SetDirty(portraitButton);
|
||||
}
|
||||
|
||||
// Camera framing
|
||||
var vcam = GameObject.Find("CinemachineCamera");
|
||||
if (vcam != null)
|
||||
{
|
||||
var framing = vcam.GetComponent<DialogueCameraFraming>();
|
||||
if (framing == null)
|
||||
{
|
||||
framing = vcam.AddComponent<DialogueCameraFraming>();
|
||||
}
|
||||
|
||||
var composer = vcam.GetComponent<CinemachinePositionComposer>();
|
||||
var fSo = new SerializedObject(framing);
|
||||
fSo.FindProperty("composer").objectReferenceValue = composer;
|
||||
fSo.FindProperty("dialogueScreenX").floatValue = -0.17f;
|
||||
fSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
// Re-point DialogueRunner presenters
|
||||
var runner = Object.FindFirstObjectByType<DialogueRunner>();
|
||||
var streamPresenter = streamInstance.GetComponent<DialogueStreamPresenter>();
|
||||
var optionsPresenter = streamInstance.GetComponent<DialogueStreamOptionsPresenter>();
|
||||
var lineAdvancer = Object.FindFirstObjectByType<LineAdvancer>();
|
||||
|
||||
if (runner != null && streamPresenter != null && optionsPresenter != null)
|
||||
{
|
||||
var rSo = new SerializedObject(runner);
|
||||
var presenters = rSo.FindProperty("dialoguePresenters");
|
||||
if (presenters != null)
|
||||
{
|
||||
presenters.arraySize = lineAdvancer != null ? 3 : 2;
|
||||
presenters.GetArrayElementAtIndex(0).objectReferenceValue = streamPresenter;
|
||||
presenters.GetArrayElementAtIndex(1).objectReferenceValue = optionsPresenter;
|
||||
if (lineAdvancer != null)
|
||||
{
|
||||
presenters.GetArrayElementAtIndex(2).objectReferenceValue = lineAdvancer;
|
||||
}
|
||||
|
||||
rSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
}
|
||||
|
||||
if (lineAdvancer != null && streamPresenter != null)
|
||||
{
|
||||
var aSo = new SerializedObject(lineAdvancer);
|
||||
aSo.FindProperty("presenter").objectReferenceValue = streamPresenter;
|
||||
aSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
// Point DialogueTransitionController.dialogueUI at the new canvas
|
||||
if (transition != null && streamInstance != null)
|
||||
{
|
||||
var tSo = new SerializedObject(transition);
|
||||
tSo.FindProperty("dialogueUI").objectReferenceValue = streamInstance;
|
||||
tSo.FindProperty("controlLock").objectReferenceValue = controlLock;
|
||||
tSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
// Deactivate the package Dialogue System Canvas (keep EventSystem alive)
|
||||
var dialogueSystem = GameObject.Find("Dialogue System");
|
||||
if (dialogueSystem != null)
|
||||
{
|
||||
var packageCanvas = dialogueSystem.transform.Find("Canvas");
|
||||
if (packageCanvas != null)
|
||||
{
|
||||
// Rescue the Skill Check Banner onto the scene-owned Skill Check
|
||||
// Canvas — NOT into streamInstance. EnsurePrefabInstance
|
||||
// DestroyImmediates the stream canvas on every re-run, so
|
||||
// anything parented under it dies with it; that is what left
|
||||
// SkillRuntime.resultView null after the second setup run.
|
||||
// Skill Check Canvas is scene-owned, survives re-runs, and its
|
||||
// sortingOrder 100 already draws above the dialogue canvas.
|
||||
var banner = packageCanvas.Find("Skill Check Banner");
|
||||
if (banner != null)
|
||||
{
|
||||
var bannerHost = GameObject.Find("Skill Check Canvas");
|
||||
if (bannerHost != null)
|
||||
{
|
||||
banner.SetParent(bannerHost.transform, false);
|
||||
}
|
||||
}
|
||||
|
||||
packageCanvas.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Repair SkillRuntime.resultView. It can be left dangling by an earlier
|
||||
// run of this menu item, and a null here silently disables every roll
|
||||
// banner ("SkillCheckResultView is not assigned; skipping roll banner").
|
||||
// Prefer an active view if more than one survives.
|
||||
SkillCheckResultView resultView = null;
|
||||
foreach (var candidate in Object.FindObjectsByType<SkillCheckResultView>(
|
||||
FindObjectsInactive.Include, FindObjectsSortMode.None))
|
||||
{
|
||||
if (resultView == null
|
||||
|| (!resultView.gameObject.activeInHierarchy && candidate.gameObject.activeInHierarchy))
|
||||
{
|
||||
resultView = candidate;
|
||||
}
|
||||
}
|
||||
|
||||
var skillRuntime = Object.FindFirstObjectByType<SkillRuntime>();
|
||||
if (skillRuntime != null && resultView != null)
|
||||
{
|
||||
var skillSo = new SerializedObject(skillRuntime);
|
||||
skillSo.FindProperty("resultView").objectReferenceValue = resultView;
|
||||
skillSo.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
else if (skillRuntime != null)
|
||||
{
|
||||
Debug.LogWarning("[UILayerSetup] No SkillCheckResultView found in the scene; roll banners will not display.", skillRuntime);
|
||||
}
|
||||
|
||||
// Update NPCStandIn dialogueUI refs to the new canvas
|
||||
foreach (var npc in Object.FindObjectsByType<NPCStandIn>(FindObjectsInactive.Include, FindObjectsSortMode.None))
|
||||
{
|
||||
var so = new SerializedObject(npc);
|
||||
var uiProp = so.FindProperty("dialogueUI");
|
||||
if (uiProp != null)
|
||||
{
|
||||
uiProp.objectReferenceValue = streamInstance;
|
||||
so.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
}
|
||||
|
||||
EditorSceneManager.MarkSceneDirty(scene);
|
||||
EditorSceneManager.SaveScene(scene);
|
||||
}
|
||||
|
||||
static GameObject EnsurePrefabInstance(GameObject prefab, string name)
|
||||
{
|
||||
var existing = GameObject.Find(name);
|
||||
if (existing != null)
|
||||
{
|
||||
Object.DestroyImmediate(existing);
|
||||
}
|
||||
|
||||
var instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab);
|
||||
instance.name = name;
|
||||
return instance;
|
||||
}
|
||||
|
||||
static GameObject CreateCanvas(string name, int sortingOrder)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
var canvas = go.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = sortingOrder;
|
||||
var scaler = go.GetComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920f, 1080f);
|
||||
scaler.matchWidthOrHeight = 0.5f;
|
||||
return go;
|
||||
}
|
||||
|
||||
static GameObject CreateTabPanel(string name, Transform parent)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(CanvasGroup));
|
||||
go.transform.SetParent(parent, false);
|
||||
Stretch(go.GetComponent<RectTransform>());
|
||||
var group = go.GetComponent<CanvasGroup>();
|
||||
group.alpha = 0f;
|
||||
group.interactable = false;
|
||||
group.blocksRaycasts = false;
|
||||
return go;
|
||||
}
|
||||
|
||||
static GameObject CreateTabButton(string label, Transform parent)
|
||||
{
|
||||
var go = new GameObject(label, typeof(RectTransform), typeof(Image), typeof(Button), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
go.GetComponent<Image>().color = new Color(0.2f, 0.2f, 0.25f, 1f);
|
||||
var text = CreateTmp("Label", go.transform, 22f, FontStyles.Bold, TextAlignmentOptions.Center);
|
||||
Stretch(text.GetComponent<RectTransform>());
|
||||
Object.DestroyImmediate(text.GetComponent<LayoutElement>());
|
||||
text.GetComponent<TMP_Text>().text = label;
|
||||
return go;
|
||||
}
|
||||
|
||||
static GameObject CreateTmp(string name, Transform parent, float size, FontStyles style, TextAlignmentOptions align)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(TextMeshProUGUI), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
var tmp = go.GetComponent<TextMeshProUGUI>();
|
||||
tmp.fontSize = size;
|
||||
tmp.fontStyle = style;
|
||||
tmp.alignment = align;
|
||||
tmp.color = Color.white;
|
||||
tmp.text = name;
|
||||
tmp.textWrappingMode = TextWrappingModes.Normal;
|
||||
|
||||
// Deliberately no LayoutElement.preferredHeight. A fixed height here is
|
||||
// one line's worth, and LayoutElement outranks TMP's own ILayoutElement
|
||||
// report — so a wrapped 4-line body would be allocated ~40px while
|
||||
// rendering ~150px, and consecutive rows draw on top of each other.
|
||||
// Leaving it at the -1 default lets TMP measure the wrapped text.
|
||||
// The component stays so callers can still set preferredWidth /
|
||||
// flexibleWidth (see the skill row).
|
||||
return go;
|
||||
}
|
||||
|
||||
static GameObject CreateUiImage(string name, Transform parent, Color color)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Image), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
go.GetComponent<Image>().color = color;
|
||||
return go;
|
||||
}
|
||||
|
||||
static void Stretch(RectTransform rt, float pad = 0f)
|
||||
{
|
||||
rt.anchorMin = Vector2.zero;
|
||||
rt.anchorMax = Vector2.one;
|
||||
rt.offsetMin = new Vector2(pad, pad);
|
||||
rt.offsetMax = new Vector2(-pad, -pad);
|
||||
}
|
||||
|
||||
static void ConfigureVerticalContent(GameObject go)
|
||||
{
|
||||
var rt = go.GetComponent<RectTransform>();
|
||||
rt.anchorMin = new Vector2(0f, 0f);
|
||||
rt.anchorMax = new Vector2(1f, 0f);
|
||||
rt.pivot = new Vector2(0.5f, 0f);
|
||||
|
||||
// A RectTransform added via `new GameObject(..., typeof(RectTransform))`
|
||||
// starts at sizeDelta (100,100). With horizontal-stretch anchors that
|
||||
// makes the rect parentWidth + 100 wide, centred — overhanging 50px off
|
||||
// each side, and the RectMask2D shears the left edge off every label.
|
||||
// ContentSizeFitter only governs the vertical axis, so it never
|
||||
// corrects this. Zero the horizontal size explicitly.
|
||||
rt.sizeDelta = new Vector2(0f, rt.sizeDelta.y);
|
||||
rt.anchoredPosition = Vector2.zero;
|
||||
|
||||
var vlg = go.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.childControlHeight = true;
|
||||
vlg.childControlWidth = true;
|
||||
vlg.childForceExpandHeight = false;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.spacing = 4f;
|
||||
var csf = go.GetComponent<ContentSizeFitter>();
|
||||
csf.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5bdf044f1ab04312b76895dac1740b37
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Reminds the user to run the one-shot prefab/scene wiring menu after scripts
|
||||
/// compile. Runtime play works without it via UILayerBootstrap.
|
||||
/// </summary>
|
||||
[InitializeOnLoad]
|
||||
static class UILayerSetupAutoRun
|
||||
{
|
||||
const string PrefKey = "NightclubArcadia.UILayerSetup.Reminded";
|
||||
const string MarkerPrefab = "Assets/Prefabs/UI/PlayerMenuCanvas.prefab";
|
||||
|
||||
static UILayerSetupAutoRun()
|
||||
{
|
||||
EditorApplication.delayCall += RemindIfNeeded;
|
||||
}
|
||||
|
||||
static void RemindIfNeeded()
|
||||
{
|
||||
if (EditorApplication.isPlayingOrWillChangePlaymode || EditorApplication.isCompiling)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (AssetDatabase.LoadAssetAtPath<GameObject>(MarkerPrefab) != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (EditorPrefs.GetBool(PrefKey, false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditorPrefs.SetBool(PrefKey, true);
|
||||
Debug.Log(
|
||||
"[UILayer] Prefabs not built yet. Play Mode works via UILayerBootstrap. " +
|
||||
"To author prefabs into the scene, run Tools → Nightclub Arcadia → Set Up UI Layer.");
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Nightclub Arcadia/Reset UI Layer Auto-Setup Flag")]
|
||||
static void ResetFlag()
|
||||
{
|
||||
EditorPrefs.DeleteKey(PrefKey);
|
||||
Debug.Log("[UILayer] Reminder flag cleared.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c0e3c886ff143d3b26b7f55d7f22410
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe41419ba50842189534933e2b64e958
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11e75200bdad4ff48299a7d24bb8df99
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,413 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3506879458838080580
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1649868454372858534}
|
||||
- component: {fileID: 5353601244371665078}
|
||||
- component: {fileID: 3249155410833833935}
|
||||
- component: {fileID: 3956878563407369997}
|
||||
m_Layer: 0
|
||||
m_Name: DialogueMessageRow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1649868454372858534
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3506879458838080580}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5063401541721017946}
|
||||
- {fileID: 7857316982467238224}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 80}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5353601244371665078
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3506879458838080580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a7773ea9a6f44798aa98356903037d16, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.UI.Dialogue.DialogueMessageRow
|
||||
speakerText: {fileID: 5900251945930220314}
|
||||
bodyText: {fileID: 1670956017877202442}
|
||||
speakerLabel: {fileID: 5822252844234204748}
|
||||
--- !u!114 &3249155410833833935
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3506879458838080580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 12
|
||||
m_Right: 12
|
||||
m_Top: 8
|
||||
m_Bottom: 8
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 4
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &3956878563407369997
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3506879458838080580}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &5450003319614969337
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7857316982467238224}
|
||||
- component: {fileID: 3605186933310922639}
|
||||
- component: {fileID: 1670956017877202442}
|
||||
- component: {fileID: 6572944391823112727}
|
||||
m_Layer: 0
|
||||
m_Name: Body
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7857316982467238224
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5450003319614969337}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1649868454372858534}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3605186933310922639
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5450003319614969337}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1670956017877202442
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5450003319614969337}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Body
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 28
|
||||
m_fontSizeBase: 28
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &6572944391823112727
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5450003319614969337}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &5822252844234204748
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5063401541721017946}
|
||||
- component: {fileID: 4569120956328637162}
|
||||
- component: {fileID: 5900251945930220314}
|
||||
- component: {fileID: 3733932380812113541}
|
||||
m_Layer: 0
|
||||
m_Name: Speaker
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5063401541721017946
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5822252844234204748}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1649868454372858534}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4569120956328637162
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5822252844234204748}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5900251945930220314
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5822252844234204748}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Speaker
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 22
|
||||
m_fontSizeBase: 22
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &3733932380812113541
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5822252844234204748}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90818ef7dc74247ceb348994755cea86
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,673 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1431520567503728820
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4838388606347767229}
|
||||
- component: {fileID: 848167695161913818}
|
||||
- component: {fileID: 872887529246740654}
|
||||
m_Layer: 0
|
||||
m_Name: Messages
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4838388606347767229
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1431520567503728820}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6371610150170887506}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &848167695161913818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1431520567503728820}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 4
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &872887529246740654
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1431520567503728820}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &2888832924926796905
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8553742246756266605}
|
||||
- component: {fileID: 7475958128581596541}
|
||||
- component: {fileID: 5788080976967704390}
|
||||
m_Layer: 0
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8553742246756266605
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2888832924926796905}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6287368187237088396}
|
||||
m_Father: {fileID: 1243836425688988300}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.66, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7475958128581596541
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2888832924926796905}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5788080976967704390
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2888832924926796905}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.05, g: 0.05, b: 0.08, a: 0.92}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4923635399097880277
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3746324764683222304}
|
||||
- component: {fileID: 3035847077530824546}
|
||||
- component: {fileID: 5149667566061008557}
|
||||
- component: {fileID: 2566128074157561357}
|
||||
m_Layer: 0
|
||||
m_Name: Viewport
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3746324764683222304
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4923635399097880277}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6371610150170887506}
|
||||
m_Father: {fileID: 6287368187237088396}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3035847077530824546
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4923635399097880277}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RectMask2D
|
||||
m_Padding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
--- !u!222 &5149667566061008557
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4923635399097880277}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2566128074157561357
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4923635399097880277}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.01}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5260492858234310193
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6371610150170887506}
|
||||
- component: {fileID: 2397794206583674815}
|
||||
- component: {fileID: 5419335647702174254}
|
||||
m_Layer: 0
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6371610150170887506
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5260492858234310193}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4838388606347767229}
|
||||
- {fileID: 6329947636030823459}
|
||||
m_Father: {fileID: 3746324764683222304}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &2397794206583674815
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5260492858234310193}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 4
|
||||
m_Right: 4
|
||||
m_Top: 8
|
||||
m_Bottom: 8
|
||||
m_ChildAlignment: 7
|
||||
m_Spacing: 6
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &5419335647702174254
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5260492858234310193}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &7249108092969100431
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6329947636030823459}
|
||||
- component: {fileID: 5824694681547497274}
|
||||
- component: {fileID: 6817391513969849154}
|
||||
- component: {fileID: 5117926241503925785}
|
||||
m_Layer: 0
|
||||
m_Name: Options
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6329947636030823459
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7249108092969100431}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6371610150170887506}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!114 &5824694681547497274
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7249108092969100431}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 4
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &6817391513969849154
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7249108092969100431}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ContentSizeFitter
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!225 &5117926241503925785
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7249108092969100431}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0
|
||||
m_Interactable: 0
|
||||
m_BlocksRaycasts: 0
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!1 &8691714907102969075
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1243836425688988300}
|
||||
- component: {fileID: 1592513625297910240}
|
||||
- component: {fileID: 7055069541643637941}
|
||||
- component: {fileID: 4390775391658295920}
|
||||
- component: {fileID: 3476584232491665726}
|
||||
- component: {fileID: 6097567599041115085}
|
||||
- component: {fileID: 307489608854241188}
|
||||
m_Layer: 0
|
||||
m_Name: DialogueStreamCanvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1243836425688988300
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8553742246756266605}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &1592513625297910240
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_UseReflectionProbes: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 5
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &7055069541643637941
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0.5
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &4390775391658295920
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!225 &3476584232491665726
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0
|
||||
m_Interactable: 0
|
||||
m_BlocksRaycasts: 0
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &6097567599041115085
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 88cb6495795a4e13ac7fb72343c132af, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.UI.Dialogue.DialogueStreamPresenter
|
||||
messageRowPrefab: {fileID: 5353601244371665078, guid: 90818ef7dc74247ceb348994755cea86, type: 3}
|
||||
messageContainer: {fileID: 4838388606347767229}
|
||||
scrollRect: {fileID: 7105587415705135446}
|
||||
maxRows: 100
|
||||
lettersPerSecond: 60
|
||||
--- !u!114 &307489608854241188
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8691714907102969075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8d86cc99d5b545c4a3fad9e1482031a2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.UI.Dialogue.DialogueStreamOptionsPresenter
|
||||
optionViewPrefab: {fileID: 2576261519635394347, guid: e605972137b0b4c1399ffb07beae9a9b, type: 3}
|
||||
optionsContainer: {fileID: 6329947636030823459}
|
||||
canvasGroup: {fileID: 5117926241503925785}
|
||||
showUnavailableOptions: 0
|
||||
--- !u!1 &8898733438161318853
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6287368187237088396}
|
||||
- component: {fileID: 7105587415705135446}
|
||||
- component: {fileID: 6289533314517078144}
|
||||
- component: {fileID: 7217060756955950799}
|
||||
m_Layer: 0
|
||||
m_Name: Scroll
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6287368187237088396
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8898733438161318853}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3746324764683222304}
|
||||
m_Father: {fileID: 8553742246756266605}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -16, y: -16}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &7105587415705135446
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8898733438161318853}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.ScrollRect
|
||||
m_Content: {fileID: 6371610150170887506}
|
||||
m_Horizontal: 0
|
||||
m_Vertical: 1
|
||||
m_MovementType: 2
|
||||
m_Elasticity: 0.1
|
||||
m_Inertia: 1
|
||||
m_DecelerationRate: 0.135
|
||||
m_ScrollSensitivity: 1
|
||||
m_Viewport: {fileID: 3746324764683222304}
|
||||
m_HorizontalScrollbar: {fileID: 0}
|
||||
m_VerticalScrollbar: {fileID: 0}
|
||||
m_HorizontalScrollbarVisibility: 0
|
||||
m_VerticalScrollbarVisibility: 0
|
||||
m_HorizontalScrollbarSpacing: 0
|
||||
m_VerticalScrollbarSpacing: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!222 &6289533314517078144
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8898733438161318853}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7217060756955950799
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8898733438161318853}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.01}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55fc979a64b174ce796ffa39b13b7259
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,390 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3845905829654890729
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4691680407920056117}
|
||||
- component: {fileID: 9194898352646057999}
|
||||
- component: {fileID: 7450534218736675587}
|
||||
m_Layer: 0
|
||||
m_Name: TabHint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4691680407920056117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3845905829654890729}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 252585930844827291}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 4}
|
||||
m_SizeDelta: {x: 0, y: 28}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &9194898352646057999
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3845905829654890729}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7450534218736675587
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3845905829654890729}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Tab
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 18
|
||||
m_fontSizeBase: 18
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4914891251226459434
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8125896019114993279}
|
||||
- component: {fileID: 637496887729740374}
|
||||
- component: {fileID: 7333171482869056901}
|
||||
- component: {fileID: 3439018567020279905}
|
||||
- component: {fileID: 4573334312575796821}
|
||||
m_Layer: 0
|
||||
m_Name: HudCanvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8125896019114993279
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4914891251226459434}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 252585930844827291}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &637496887729740374
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4914891251226459434}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_UseReflectionProbes: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 10
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &7333171482869056901
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4914891251226459434}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0.5
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &3439018567020279905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4914891251226459434}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &4573334312575796821
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4914891251226459434}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fd1354ade14b4b1d80da9acac4aa9e12, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.UI.HUD.PortraitHudView
|
||||
panelRoot: {fileID: 4989543578856257477}
|
||||
--- !u!1 &4989543578856257477
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 252585930844827291}
|
||||
- component: {fileID: 7861001760273437131}
|
||||
- component: {fileID: 1348039723167098503}
|
||||
- component: {fileID: 4045319608296230342}
|
||||
- component: {fileID: 1473442362196520338}
|
||||
m_Layer: 0
|
||||
m_Name: PortraitPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &252585930844827291
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4989543578856257477}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4691680407920056117}
|
||||
m_Father: {fileID: 8125896019114993279}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -24, y: 24}
|
||||
m_SizeDelta: {x: 220, y: 280}
|
||||
m_Pivot: {x: 1, y: 0}
|
||||
--- !u!225 &7861001760273437131
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4989543578856257477}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!222 &1348039723167098503
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4989543578856257477}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4045319608296230342
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4989543578856257477}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.15, g: 0.15, b: 0.18, a: 0.95}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: a1b2c3d4e5f60718293a4b5c6d7e8f90, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1473442362196520338
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4989543578856257477}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4045319608296230342}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 792e1d4c4cde942e8a71947301a3868c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb4c52aaa2c9e41aabc4bb11fa6372ba
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,669 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &738428826500747930
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7033684844244958404}
|
||||
- component: {fileID: 8854647563054178895}
|
||||
- component: {fileID: 7773152306665733045}
|
||||
- component: {fileID: 3269936702826226914}
|
||||
m_Layer: 0
|
||||
m_Name: Accent
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7033684844244958404
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738428826500747930}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6014094232834212140}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8854647563054178895
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738428826500747930}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7773152306665733045
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738428826500747930}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3269936702826226914
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738428826500747930}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: 6
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: 0
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &1043270585848180102
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6266953780690568889}
|
||||
- component: {fileID: 6662307575930959716}
|
||||
- component: {fileID: 874797289038649292}
|
||||
- component: {fileID: 3005905926608676038}
|
||||
m_Layer: 0
|
||||
m_Name: Bar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6266953780690568889
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043270585848180102}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 437950331768363985}
|
||||
m_Father: {fileID: 6014094232834212140}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6662307575930959716
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043270585848180102}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &874797289038649292
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043270585848180102}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.2, g: 0.2, b: 0.22, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3005905926608676038
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043270585848180102}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: 160
|
||||
m_PreferredHeight: 16
|
||||
m_FlexibleWidth: 0
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &1311471292218943158
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4484942689062487776}
|
||||
- component: {fileID: 285052103366591294}
|
||||
- component: {fileID: 6986784551111800944}
|
||||
- component: {fileID: 4453305505185908855}
|
||||
m_Layer: 0
|
||||
m_Name: Rank
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4484942689062487776
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1311471292218943158}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6014094232834212140}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &285052103366591294
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1311471292218943158}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6986784551111800944
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1311471292218943158}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Rank
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 4
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &4453305505185908855
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1311471292218943158}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: 40
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: 0
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &3239427835033733195
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4775921688302885094}
|
||||
- component: {fileID: 3498508026980942921}
|
||||
- component: {fileID: 4172720891822695416}
|
||||
- component: {fileID: 6787294827931527212}
|
||||
m_Layer: 0
|
||||
m_Name: Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4775921688302885094
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3239427835033733195}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6014094232834212140}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3498508026980942921
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3239427835033733195}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4172720891822695416
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3239427835033733195}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Name
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: 0
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &6787294827931527212
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3239427835033733195}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: 1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &3768236759226886124
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 437950331768363985}
|
||||
- component: {fileID: 5606763019278455248}
|
||||
- component: {fileID: 1019288287942172810}
|
||||
m_Layer: 0
|
||||
m_Name: Fill
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &437950331768363985
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3768236759226886124}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6266953780690568889}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5606763019278455248
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3768236759226886124}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1019288287942172810
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3768236759226886124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 0.2
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7442810364304304402
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6014094232834212140}
|
||||
- component: {fileID: 1141587833647839303}
|
||||
- component: {fileID: 8736413170534072599}
|
||||
m_Layer: 0
|
||||
m_Name: SkillRow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6014094232834212140
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7442810364304304402}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7033684844244958404}
|
||||
- {fileID: 4775921688302885094}
|
||||
- {fileID: 6266953780690568889}
|
||||
- {fileID: 4484942689062487776}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 48}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1141587833647839303
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7442810364304304402}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6ccda37aee7e42b09a0628f8a5729060, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: NightclubArcadia.Skills::NightclubArcadia.Skills.SkillRowView
|
||||
nameLabel: {fileID: 4172720891822695416}
|
||||
rankLabel: {fileID: 6986784551111800944}
|
||||
barFill: {fileID: 1019288287942172810}
|
||||
accentStripe: {fileID: 7773152306665733045}
|
||||
--- !u!114 &8736413170534072599
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7442810364304304402}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.HorizontalLayoutGroup
|
||||
m_Padding:
|
||||
m_Left: 8
|
||||
m_Right: 8
|
||||
m_Top: 4
|
||||
m_Bottom: 4
|
||||
m_ChildAlignment: 3
|
||||
m_Spacing: 12
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 1
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e14f68d6a57ea4945bd93c44202db910
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,7 +3,8 @@
|
||||
"rootNamespace": "NightclubArcadia.Skills",
|
||||
"references": [
|
||||
"YarnSpinner.Unity",
|
||||
"Unity.TextMeshPro"
|
||||
"Unity.TextMeshPro",
|
||||
"UnityEngine.UI"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace NightclubArcadia.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// One skill row: name, numeric rank, and accent-tinted fill bar.
|
||||
/// </summary>
|
||||
public sealed class SkillRowView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] TMP_Text nameLabel;
|
||||
[SerializeField] TMP_Text rankLabel;
|
||||
[SerializeField] Image barFill;
|
||||
[SerializeField] Image accentStripe;
|
||||
|
||||
public void Bind(SkillDefinition def, int rank, int displayMaxRank)
|
||||
{
|
||||
if (def == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (nameLabel != null)
|
||||
{
|
||||
nameLabel.text = string.IsNullOrEmpty(def.DisplayName)
|
||||
? def.Id.ToUpperInvariant()
|
||||
: def.DisplayName;
|
||||
nameLabel.color = def.AccentColor;
|
||||
}
|
||||
|
||||
if (rankLabel != null)
|
||||
{
|
||||
rankLabel.text = rank.ToString();
|
||||
}
|
||||
|
||||
if (barFill != null)
|
||||
{
|
||||
var max = Mathf.Max(1, displayMaxRank);
|
||||
barFill.fillAmount = Mathf.Clamp01(rank / (float)max);
|
||||
barFill.color = def.AccentColor;
|
||||
}
|
||||
|
||||
if (accentStripe != null)
|
||||
{
|
||||
accentStripe.color = def.AccentColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ccda37aee7e42b09a0628f8a5729060
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// Skills tab content. Rebuilds the list from SkillDatabase.All +
|
||||
/// PlayerSkills.GetRank on each show. No change event on PlayerSkills —
|
||||
/// refresh on show is deliberate (menu is modal; ranks cannot change while open).
|
||||
/// </summary>
|
||||
public sealed class SkillsPanelView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] RectTransform contentRoot;
|
||||
[SerializeField] SkillRowView rowPrefab;
|
||||
[SerializeField] TMP_Text axisHeaderPrefab;
|
||||
[SerializeField] int displayMaxRank = 6;
|
||||
|
||||
readonly List<GameObject> spawned = new List<GameObject>();
|
||||
|
||||
/// <summary>
|
||||
/// Wired from MenuTabBar TabEntry.onShown in the Inspector.
|
||||
/// </summary>
|
||||
public void Refresh()
|
||||
{
|
||||
Clear();
|
||||
|
||||
var runtime = SkillRuntime.Instance;
|
||||
if (runtime == null || runtime.Database == null || runtime.Skills == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (contentRoot == null || rowPrefab == null)
|
||||
{
|
||||
Debug.LogWarning($"[{nameof(SkillsPanelView)}] Missing contentRoot or rowPrefab.", this);
|
||||
return;
|
||||
}
|
||||
|
||||
SkillAxis? currentAxis = null;
|
||||
foreach (var def in runtime.Database.All)
|
||||
{
|
||||
if (def == null || string.IsNullOrEmpty(def.Id))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (currentAxis == null || currentAxis.Value != def.Axis)
|
||||
{
|
||||
currentAxis = def.Axis;
|
||||
SpawnAxisHeader(def.Axis);
|
||||
}
|
||||
|
||||
var rank = runtime.Skills.GetRank(def.Id);
|
||||
var row = Instantiate(rowPrefab, contentRoot);
|
||||
row.gameObject.SetActive(true);
|
||||
row.Bind(def, rank, displayMaxRank);
|
||||
spawned.Add(row.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnAxisHeader(SkillAxis axis)
|
||||
{
|
||||
if (axisHeaderPrefab == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var header = Instantiate(axisHeaderPrefab, contentRoot);
|
||||
header.gameObject.SetActive(true);
|
||||
header.text = axis.ToString().ToUpperInvariant();
|
||||
spawned.Add(header.gameObject);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
for (var i = 0; i < spawned.Count; i++)
|
||||
{
|
||||
if (spawned[i] != null)
|
||||
{
|
||||
Destroy(spawned[i]);
|
||||
}
|
||||
}
|
||||
|
||||
spawned.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3955c87e179f42a790c048be66b69606
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfde056299764ef1b8308f5df3774fe7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0166936dfea40599b3d29101ae1c086
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,53 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// One message row in the dialogue stream: optional speaker name + body text.
|
||||
/// </summary>
|
||||
public sealed class DialogueMessageRow : MonoBehaviour
|
||||
{
|
||||
[SerializeField] TMP_Text speakerText;
|
||||
[SerializeField] TMP_Text bodyText;
|
||||
[SerializeField] GameObject speakerLabel;
|
||||
|
||||
public TMP_Text BodyText => bodyText;
|
||||
|
||||
public void SetContent(string speaker, string body)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(speaker))
|
||||
{
|
||||
if (speakerLabel != null)
|
||||
{
|
||||
speakerLabel.SetActive(false);
|
||||
}
|
||||
else if (speakerText != null)
|
||||
{
|
||||
speakerText.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (speakerLabel != null)
|
||||
{
|
||||
speakerLabel.SetActive(true);
|
||||
}
|
||||
else if (speakerText != null)
|
||||
{
|
||||
speakerText.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
if (speakerText != null)
|
||||
{
|
||||
speakerText.text = speaker;
|
||||
}
|
||||
}
|
||||
|
||||
if (bodyText != null)
|
||||
{
|
||||
bodyText.text = body ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7773ea9a6f44798aa98356903037d16
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,173 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
// Annotations only (not warnings): DialoguePresenterBase declares
|
||||
// RunOptionsAsync as YarnTask<DialogueOption?>, so the override needs a
|
||||
// nullable annotation context to match it without CS8632.
|
||||
#nullable enable annotations
|
||||
|
||||
namespace NightclubArcadia.UI.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Presents Yarn options as rows at the bottom of the dialogue stream,
|
||||
/// reusing the stock OptionItem component from the Yarn package.
|
||||
/// </summary>
|
||||
public sealed class DialogueStreamOptionsPresenter : DialoguePresenterBase
|
||||
{
|
||||
[SerializeField] OptionItem optionViewPrefab;
|
||||
[SerializeField] Transform optionsContainer;
|
||||
[SerializeField] CanvasGroup canvasGroup;
|
||||
[SerializeField] bool showUnavailableOptions;
|
||||
|
||||
readonly List<OptionItem> optionViews = new List<OptionItem>();
|
||||
|
||||
public override YarnTask OnDialogueStartedAsync() => YarnTask.CompletedTask;
|
||||
|
||||
public override YarnTask OnDialogueCompleteAsync()
|
||||
{
|
||||
HideAllOptions();
|
||||
return YarnTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override YarnTask RunLineAsync(LocalizedLine line, LineCancellationToken token)
|
||||
{
|
||||
// Lines are handled by DialogueStreamPresenter.
|
||||
return YarnTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override async YarnTask<DialogueOption?> RunOptionsAsync(
|
||||
DialogueOption[] dialogueOptions,
|
||||
LineCancellationToken cancellationToken)
|
||||
{
|
||||
var anyAvailable = false;
|
||||
foreach (var option in dialogueOptions)
|
||||
{
|
||||
if (option.IsAvailable)
|
||||
{
|
||||
anyAvailable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!anyAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
while (dialogueOptions.Length > optionViews.Count)
|
||||
{
|
||||
optionViews.Add(CreateNewOptionView());
|
||||
}
|
||||
|
||||
var selectedOptionCompletionSource = new YarnTaskCompletionSource<DialogueOption?>();
|
||||
var completionCancellationSource = CancellationTokenSource.CreateLinkedTokenSource(
|
||||
cancellationToken.NextContentToken);
|
||||
|
||||
async YarnTask CancelSourceWhenDialogueCancelled()
|
||||
{
|
||||
await YarnTask.WaitUntilCanceled(completionCancellationSource.Token);
|
||||
|
||||
if (cancellationToken.IsNextContentRequested)
|
||||
{
|
||||
selectedOptionCompletionSource.TrySetResult(null);
|
||||
}
|
||||
}
|
||||
|
||||
CancelSourceWhenDialogueCancelled().Forget();
|
||||
|
||||
for (var i = 0; i < dialogueOptions.Length; i++)
|
||||
{
|
||||
var optionView = optionViews[i];
|
||||
var option = dialogueOptions[i];
|
||||
|
||||
if (!option.IsAvailable && !showUnavailableOptions)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
optionView.gameObject.SetActive(true);
|
||||
optionView.Option = option;
|
||||
optionView.OnOptionSelected = selectedOptionCompletionSource;
|
||||
optionView.completionToken = completionCancellationSource.Token;
|
||||
}
|
||||
|
||||
var optionIndexToSelect = -1;
|
||||
for (var i = 0; i < optionViews.Count; i++)
|
||||
{
|
||||
var view = optionViews[i];
|
||||
if (!view.isActiveAndEnabled)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (view.IsHighlighted)
|
||||
{
|
||||
optionIndexToSelect = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (optionIndexToSelect == -1)
|
||||
{
|
||||
optionIndexToSelect = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (optionIndexToSelect > -1)
|
||||
{
|
||||
optionViews[optionIndexToSelect].Select();
|
||||
}
|
||||
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
canvasGroup.alpha = 1f;
|
||||
canvasGroup.interactable = true;
|
||||
canvasGroup.blocksRaycasts = true;
|
||||
}
|
||||
|
||||
var completedTask = await selectedOptionCompletionSource.Task;
|
||||
completionCancellationSource.Cancel();
|
||||
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
canvasGroup.interactable = false;
|
||||
canvasGroup.blocksRaycasts = false;
|
||||
canvasGroup.alpha = 0f;
|
||||
}
|
||||
|
||||
HideAllOptions();
|
||||
await YarnTask.Yield();
|
||||
|
||||
if (cancellationToken.NextContentToken.IsCancellationRequested)
|
||||
{
|
||||
return await DialogueRunner.NoOptionSelected;
|
||||
}
|
||||
|
||||
return completedTask;
|
||||
}
|
||||
|
||||
OptionItem CreateNewOptionView()
|
||||
{
|
||||
var parent = optionsContainer != null
|
||||
? optionsContainer
|
||||
: (canvasGroup != null ? canvasGroup.transform : transform);
|
||||
|
||||
var optionView = Instantiate(optionViewPrefab, parent, false);
|
||||
optionView.transform.SetAsLastSibling();
|
||||
optionView.gameObject.SetActive(false);
|
||||
return optionView;
|
||||
}
|
||||
|
||||
void HideAllOptions()
|
||||
{
|
||||
foreach (var optionView in optionViews)
|
||||
{
|
||||
if (optionView != null)
|
||||
{
|
||||
optionView.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d86cc99d5b545c4a3fad9e1482031a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,133 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Yarn.Unity;
|
||||
|
||||
// Annotations only (not warnings): DialoguePresenterBase declares
|
||||
// RunOptionsAsync as YarnTask<DialogueOption?>, so the override needs a
|
||||
// nullable annotation context to match it without CS8632.
|
||||
#nullable enable annotations
|
||||
|
||||
namespace NightclubArcadia.UI.Dialogue
|
||||
{
|
||||
/// <summary>
|
||||
/// Yarn presenter that appends each line to a scrolling chat-style stream
|
||||
/// rather than replacing a single text box.
|
||||
/// </summary>
|
||||
public sealed class DialogueStreamPresenter : DialoguePresenterBase
|
||||
{
|
||||
[SerializeField] DialogueMessageRow messageRowPrefab;
|
||||
[SerializeField] RectTransform messageContainer;
|
||||
[SerializeField] ScrollRect scrollRect;
|
||||
[SerializeField] int maxRows = 100;
|
||||
[SerializeField] float lettersPerSecond = 60f;
|
||||
|
||||
readonly List<DialogueMessageRow> rows = new List<DialogueMessageRow>();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Must exist before LineAdvancer.Start(), which does
|
||||
// presenter.Typewriter?.ActionMarkupHandlers.Add(this);
|
||||
// to learn when a line has finished displaying. Leave Typewriter
|
||||
// null and that is a silent no-op: LineAdvancer never receives
|
||||
// OnLineDisplayComplete, its status never leaves LineBegan, and
|
||||
// pressing the advance key only ever hurries up the line — the
|
||||
// conversation can never move past the first message.
|
||||
Typewriter = new LetterTypewriter
|
||||
{
|
||||
CharactersPerSecond = lettersPerSecond,
|
||||
};
|
||||
}
|
||||
|
||||
public override YarnTask OnDialogueStartedAsync()
|
||||
{
|
||||
ClearRows();
|
||||
return YarnTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override YarnTask OnDialogueCompleteAsync()
|
||||
{
|
||||
// DialogueTransitionController owns showing/hiding the panel.
|
||||
return YarnTask.CompletedTask;
|
||||
}
|
||||
|
||||
public override async YarnTask RunLineAsync(LocalizedLine line, LineCancellationToken token)
|
||||
{
|
||||
if (messageRowPrefab == null || messageContainer == null)
|
||||
{
|
||||
Debug.LogError($"[{nameof(DialogueStreamPresenter)}] Missing messageRowPrefab or messageContainer.", this);
|
||||
return;
|
||||
}
|
||||
|
||||
var row = Instantiate(messageRowPrefab, messageContainer);
|
||||
row.gameObject.SetActive(true);
|
||||
rows.Add(row);
|
||||
|
||||
while (rows.Count > maxRows)
|
||||
{
|
||||
var oldest = rows[0];
|
||||
rows.RemoveAt(0);
|
||||
if (oldest != null)
|
||||
{
|
||||
Destroy(oldest.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
var text = line.TextWithoutCharacterName;
|
||||
row.SetContent(line.CharacterName, text.Text ?? string.Empty);
|
||||
|
||||
// Delegate the reveal to Yarn's own typewriter rather than
|
||||
// hand-rolling maxVisibleCharacters. It drives the
|
||||
// IActionMarkupHandler lifecycle — including LineAdvancer's
|
||||
// OnLineDisplayComplete, which is what lets the advance key move to
|
||||
// the next line instead of only hurrying up the current one — and
|
||||
// it honours [pause] markup for free.
|
||||
//
|
||||
// TextElement is re-pointed at each new row; the typewriter itself
|
||||
// is reused so LineAdvancer's registration survives.
|
||||
if (Typewriter != null && row.BodyText != null)
|
||||
{
|
||||
Typewriter.TextElement = row.BodyText;
|
||||
Typewriter.PrepareForContent(text);
|
||||
await Typewriter.RunTypewriter(text, token.HurryUpToken).SuppressCancellationThrow();
|
||||
}
|
||||
|
||||
// Deliberately no ContentWillDismiss/ContentDidDismiss: rows persist
|
||||
// in the stream, and ContentDidDismiss would blank the row by
|
||||
// resetting maxVisibleCharacters to 0.
|
||||
|
||||
Canvas.ForceUpdateCanvases();
|
||||
if (scrollRect != null)
|
||||
{
|
||||
scrollRect.verticalNormalizedPosition = 0f;
|
||||
}
|
||||
|
||||
if (!token.IsNextContentRequested)
|
||||
{
|
||||
await YarnTask.WaitUntilCanceled(token.NextContentToken).SuppressCancellationThrow();
|
||||
}
|
||||
}
|
||||
|
||||
public override YarnTask<DialogueOption?> RunOptionsAsync(
|
||||
DialogueOption[] dialogueOptions,
|
||||
LineCancellationToken cancellationToken)
|
||||
{
|
||||
// Options are handled by DialogueStreamOptionsPresenter.
|
||||
return DialogueRunner.NoOptionSelected;
|
||||
}
|
||||
|
||||
void ClearRows()
|
||||
{
|
||||
for (var i = 0; i < rows.Count; i++)
|
||||
{
|
||||
if (rows[i] != null)
|
||||
{
|
||||
Destroy(rows[i].gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
rows.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88cb6495795a4e13ac7fb72343c132af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43777cd37e914ac1872021e3de3ceaed
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
using NightclubArcadia.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI.HUD
|
||||
{
|
||||
/// <summary>
|
||||
/// Bottom-right player portrait. Visible only when dialogue is inactive
|
||||
/// and the player menu is closed.
|
||||
/// </summary>
|
||||
public sealed class PortraitHudView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject panelRoot;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (UIStateController.Instance != null)
|
||||
{
|
||||
UIStateController.Instance.StateChanged += OnStateChanged;
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Re-subscribe in case Instance was not ready during OnEnable,
|
||||
// and apply the initial visibility.
|
||||
if (UIStateController.Instance != null)
|
||||
{
|
||||
UIStateController.Instance.StateChanged -= OnStateChanged;
|
||||
UIStateController.Instance.StateChanged += OnStateChanged;
|
||||
}
|
||||
|
||||
ApplyVisibility();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (UIStateController.Instance != null)
|
||||
{
|
||||
UIStateController.Instance.StateChanged -= OnStateChanged;
|
||||
}
|
||||
}
|
||||
|
||||
void OnStateChanged() => ApplyVisibility();
|
||||
|
||||
void ApplyVisibility()
|
||||
{
|
||||
if (panelRoot == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var state = UIStateController.Instance;
|
||||
var visible = state == null || (!state.IsDialogueActive && !state.IsMenuOpen);
|
||||
|
||||
if (visible)
|
||||
{
|
||||
PanelVisibility.Show(panelRoot);
|
||||
}
|
||||
else
|
||||
{
|
||||
PanelVisibility.Hide(panelRoot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd1354ade14b4b1d80da9acac4aa9e12
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36b77035604148a0bec372b5f51e0f5f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
using NightclubArcadia.Dialogue;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace NightclubArcadia.UI.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Character tab stub: shows player name / alias from Yarn variable storage
|
||||
/// and an empty inventory placeholder.
|
||||
/// </summary>
|
||||
public sealed class CharacterPanelView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] TMP_Text nameLabel;
|
||||
[SerializeField] TMP_Text aliasLabel;
|
||||
[SerializeField] TMP_Text inventoryPlaceholder;
|
||||
[SerializeField] DialogueRunner dialogueRunner;
|
||||
|
||||
// No OnEnable refresh: panels are toggled via CanvasGroup, so OnEnable
|
||||
// fires exactly once during scene load — before the DialogueRunner has
|
||||
// initialised its variables. MenuTabBar calls Refresh on tab show,
|
||||
// which is both correctly timed and repeatable.
|
||||
public void Refresh()
|
||||
{
|
||||
if (dialogueRunner == null)
|
||||
{
|
||||
dialogueRunner = FindFirstObjectByType<DialogueRunner>();
|
||||
}
|
||||
|
||||
var storage = dialogueRunner != null ? dialogueRunner.VariableStorage : null;
|
||||
|
||||
if (nameLabel != null)
|
||||
{
|
||||
nameLabel.text = ReadString(storage, "$player_name_full", "Unknown");
|
||||
}
|
||||
|
||||
if (aliasLabel != null)
|
||||
{
|
||||
// $player_alias is a *smart* variable
|
||||
// <<declare $player_alias = alias_name($player_name) as string>>
|
||||
// and Yarn's Unity runtime never assigns
|
||||
// VariableStorageBehaviour.SmartVariableEvaluator, so reading it
|
||||
// through TryGetValue always throws InvalidOperationException.
|
||||
// Derive it from $player_name with the same generator the Yarn
|
||||
// function wraps — deterministic, so the result is identical.
|
||||
var realName = ReadString(storage, "$player_name", string.Empty);
|
||||
aliasLabel.text = string.IsNullOrEmpty(realName)
|
||||
? "—"
|
||||
: AliasNameGenerator.AliasName(realName);
|
||||
}
|
||||
|
||||
if (inventoryPlaceholder != null)
|
||||
{
|
||||
inventoryPlaceholder.text = "Inventory — empty";
|
||||
}
|
||||
}
|
||||
|
||||
static string ReadString(VariableStorageBehaviour storage, string key, string fallback)
|
||||
{
|
||||
if (storage == null)
|
||||
{
|
||||
return fallback;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (storage.TryGetValue<string>(key, out var value) && !string.IsNullOrEmpty(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
catch (System.InvalidOperationException)
|
||||
{
|
||||
// Smart variables, and variables read before the runner has a
|
||||
// compiled Program, throw rather than returning false. A HUD
|
||||
// panel showing a fallback string is the right failure mode.
|
||||
}
|
||||
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef17c93c7dec4af2ae7ce565c8984de3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Journal tab stub — no journal data model exists yet.
|
||||
/// </summary>
|
||||
public sealed class JournalPanelView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] TMP_Text placeholderLabel;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (placeholderLabel != null)
|
||||
{
|
||||
placeholderLabel.text = "Nothing recorded yet.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74efa3bf7a354892a401418d8f56fb2b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace NightclubArcadia.UI.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Selects among menu tabs. Panels are toggled via CanvasGroup (never
|
||||
/// SetActive) so TMP's cached Canvas stays valid. Each tab can fire an
|
||||
/// Inspector-wired UnityEvent on show — used by SkillsPanelView.Refresh
|
||||
/// without a cross-assembly interface.
|
||||
/// </summary>
|
||||
public sealed class MenuTabBar : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
public struct TabEntry
|
||||
{
|
||||
public Button button;
|
||||
public CanvasGroup panel;
|
||||
public UnityEvent onShown;
|
||||
}
|
||||
|
||||
[SerializeField] TabEntry[] tabs = Array.Empty<TabEntry>();
|
||||
|
||||
int currentIndex = -1;
|
||||
bool bound;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
BindButtons();
|
||||
}
|
||||
|
||||
void BindButtons()
|
||||
{
|
||||
if (bound || tabs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < tabs.Length; i++)
|
||||
{
|
||||
var index = i;
|
||||
if (tabs[i].button != null)
|
||||
{
|
||||
tabs[i].button.onClick.RemoveAllListeners();
|
||||
tabs[i].button.onClick.AddListener(() => SelectTab(index));
|
||||
}
|
||||
}
|
||||
|
||||
bound = tabs.Length > 0;
|
||||
}
|
||||
|
||||
/// <summary>Runtime / bootstrap entry point for assigning tabs after AddComponent.</summary>
|
||||
public void SetTabs(TabEntry[] entries)
|
||||
{
|
||||
tabs = entries ?? System.Array.Empty<TabEntry>();
|
||||
bound = false;
|
||||
BindButtons();
|
||||
}
|
||||
|
||||
public void SelectTab(int index)
|
||||
{
|
||||
if (tabs == null || tabs.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
index = Mathf.Clamp(index, 0, tabs.Length - 1);
|
||||
currentIndex = index;
|
||||
|
||||
for (var i = 0; i < tabs.Length; i++)
|
||||
{
|
||||
var active = i == index;
|
||||
var panel = tabs[i].panel;
|
||||
if (panel != null)
|
||||
{
|
||||
panel.alpha = active ? 1f : 0f;
|
||||
panel.interactable = active;
|
||||
panel.blocksRaycasts = active;
|
||||
}
|
||||
}
|
||||
|
||||
tabs[index].onShown?.Invoke();
|
||||
|
||||
if (tabs[index].button != null && EventSystem.current != null)
|
||||
{
|
||||
EventSystem.current.SetSelectedGameObject(tabs[index].button.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db83a1a74e0e418881880ca808f68160
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,139 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Opens and closes the player menu from Tab (PlayerMenuInput) or an
|
||||
/// external Open() call (portrait click). Holds a PlayerControlLock so
|
||||
/// opening the menu during dialogue does not re-enable movement when the
|
||||
/// menu is closed — the dialogue holder remains in the lock set.
|
||||
/// </summary>
|
||||
public sealed class PlayerMenuController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject menuRoot;
|
||||
[SerializeField] PlayerMenuInput menuInput;
|
||||
[SerializeField] PlayerControlLock controlLock;
|
||||
[SerializeField] MenuTabBar tabBar;
|
||||
|
||||
bool isOpen;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
SubscribeToMenuInput();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Re-run unconditionally: when this component is created by
|
||||
// UILayerBootstrap, AddComponent fires OnEnable *before* menuInput
|
||||
// has been assigned, so the OnEnable subscription is a no-op.
|
||||
// Subscribing again here (idempotent via -= then +=) is what makes
|
||||
// Tab work on both the bootstrap and the authored-prefab paths.
|
||||
SubscribeToMenuInput();
|
||||
|
||||
if (controlLock == null)
|
||||
{
|
||||
controlLock = FindFirstObjectByType<PlayerControlLock>();
|
||||
}
|
||||
|
||||
if (menuRoot != null)
|
||||
{
|
||||
PanelVisibility.Hide(menuRoot);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resolves <see cref="menuInput"/> if unassigned and (re)subscribes.
|
||||
/// Safe to call repeatedly — the -= before += keeps it single-shot.
|
||||
/// </summary>
|
||||
void SubscribeToMenuInput()
|
||||
{
|
||||
if (menuInput == null)
|
||||
{
|
||||
menuInput = FindFirstObjectByType<PlayerMenuInput>();
|
||||
}
|
||||
|
||||
if (menuInput != null)
|
||||
{
|
||||
menuInput.MenuToggleRequested -= Toggle;
|
||||
menuInput.MenuToggleRequested += Toggle;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (menuInput != null)
|
||||
{
|
||||
menuInput.MenuToggleRequested -= Toggle;
|
||||
}
|
||||
|
||||
if (isOpen)
|
||||
{
|
||||
// Ensure we release the lock if destroyed while open.
|
||||
CloseInternal(notifyState: false);
|
||||
}
|
||||
}
|
||||
|
||||
public void Toggle()
|
||||
{
|
||||
if (isOpen)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
Open();
|
||||
}
|
||||
}
|
||||
|
||||
public void Open()
|
||||
{
|
||||
if (isOpen)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
isOpen = true;
|
||||
|
||||
if (menuRoot != null)
|
||||
{
|
||||
PanelVisibility.Show(menuRoot);
|
||||
}
|
||||
|
||||
UIStateController.Instance?.SetMenuOpen(true);
|
||||
controlLock?.Acquire(this);
|
||||
tabBar?.SelectTab(0);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
if (!isOpen)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CloseInternal(notifyState: true);
|
||||
}
|
||||
|
||||
void CloseInternal(bool notifyState)
|
||||
{
|
||||
isOpen = false;
|
||||
|
||||
if (menuRoot != null)
|
||||
{
|
||||
PanelVisibility.Hide(menuRoot);
|
||||
}
|
||||
|
||||
if (notifyState)
|
||||
{
|
||||
UIStateController.Instance?.SetMenuOpen(false);
|
||||
}
|
||||
|
||||
// Tab during dialogue works and is the whole point of the
|
||||
// ref-counted lock: the dialogue holder is still in the set, so
|
||||
// closing the menu leaves the player locked and the conversation
|
||||
// intact.
|
||||
controlLock?.Release(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 118cc9783dba4b3cac1646d97ebd3998
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,67 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Shows and hides a UI panel *without* deactivating its GameObject.
|
||||
///
|
||||
/// SetActive(false) is not a safe way to hide this UI. TextMeshProUGUI
|
||||
/// resolves its Canvas through Graphic.CacheCanvas, which calls
|
||||
/// GetComponentsInParent(includeInactive: false) and then requires
|
||||
/// canvas.isActiveAndEnabled. Once the Canvas GameObject has been
|
||||
/// deactivated, that lookup yields null, and TMP.GetTextInfo does:
|
||||
///
|
||||
/// if (m_canvas == null) m_canvas = this.canvas; // still null
|
||||
/// GenerateTextMesh(); // m_canvas.worldCamera -> NRE
|
||||
///
|
||||
/// GenerateTextMesh dereferences m_canvas unguarded, so the very next line
|
||||
/// Yarn tries to type throws NullReferenceException. Keeping the hierarchy
|
||||
/// active and driving a CanvasGroup instead means the cached Canvas
|
||||
/// reference stays valid across any number of enter/exit dialogue cycles.
|
||||
/// </summary>
|
||||
public static class PanelVisibility
|
||||
{
|
||||
/// <summary>
|
||||
/// Makes the panel visible and interactive. Returns true if the
|
||||
/// GameObject had to be re-activated (legacy scene state), in which
|
||||
/// case the caller must wait one frame before rendering text so that
|
||||
/// TMP's OnEnable can re-cache its Canvas.
|
||||
/// </summary>
|
||||
public static bool Show(GameObject panel) => SetVisible(panel, true);
|
||||
|
||||
/// <summary>
|
||||
/// Hides the panel, leaving the hierarchy active. See class docs.
|
||||
/// </summary>
|
||||
public static void Hide(GameObject panel) => SetVisible(panel, false);
|
||||
|
||||
static bool SetVisible(GameObject panel, bool visible)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// The UI may still be deactivated by an older saved scene state or
|
||||
// by code that predates this helper. Recover from that, and tell
|
||||
// the caller a frame of grace is needed.
|
||||
var wasReactivated = false;
|
||||
if (!panel.activeSelf)
|
||||
{
|
||||
panel.SetActive(true);
|
||||
wasReactivated = true;
|
||||
}
|
||||
|
||||
var group = panel.GetComponent<CanvasGroup>();
|
||||
if (group == null)
|
||||
{
|
||||
group = panel.AddComponent<CanvasGroup>();
|
||||
}
|
||||
|
||||
group.alpha = visible ? 1f : 0f;
|
||||
group.interactable = visible;
|
||||
group.blocksRaycasts = visible;
|
||||
|
||||
return wasReactivated;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 988359a7b8f64e3aa42a4527989ec6e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,101 @@
|
||||
using System.Collections.Generic;
|
||||
using NightclubArcadia.Player;
|
||||
using StarterAssets;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Ref-counted freeze of the player's ThirdPersonController. Multiple
|
||||
/// independent holders (dialogue, menu) can Acquire/Release; the controller
|
||||
/// stays disabled until the last holder releases.
|
||||
/// </summary>
|
||||
public sealed class PlayerControlLock : MonoBehaviour
|
||||
{
|
||||
readonly HashSet<object> holders = new HashSet<object>();
|
||||
|
||||
ThirdPersonController playerController;
|
||||
StarterAssetsInputs playerInputs;
|
||||
Animator playerAnimator;
|
||||
PlayerMotionArbiter motionArbiter;
|
||||
|
||||
static readonly int AnimIDSpeed = Animator.StringToHash("Speed");
|
||||
static readonly int AnimIDMotionSpeed = Animator.StringToHash("MotionSpeed");
|
||||
|
||||
public bool IsLocked => holders.Count > 0;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
playerController = GetComponent<ThirdPersonController>();
|
||||
playerInputs = GetComponent<StarterAssetsInputs>();
|
||||
playerAnimator = GetComponent<Animator>();
|
||||
motionArbiter = GetComponent<PlayerMotionArbiter>();
|
||||
}
|
||||
|
||||
public void Acquire(object reason)
|
||||
{
|
||||
if (reason == null)
|
||||
{
|
||||
throw new System.ArgumentNullException(nameof(reason));
|
||||
}
|
||||
|
||||
var wasLocked = IsLocked;
|
||||
holders.Add(reason);
|
||||
|
||||
if (!wasLocked && IsLocked)
|
||||
{
|
||||
ApplyLock(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void Release(object reason)
|
||||
{
|
||||
if (reason == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var wasLocked = IsLocked;
|
||||
holders.Remove(reason);
|
||||
|
||||
if (wasLocked && !IsLocked)
|
||||
{
|
||||
ApplyLock(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyLock(bool locked)
|
||||
{
|
||||
if (playerController == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (locked)
|
||||
{
|
||||
// Clear pending input and the locomotion blend before freezing
|
||||
// the controller. Disabling it mid-stride otherwise leaves
|
||||
// Speed at its last value, and the character keeps running on
|
||||
// the spot for the whole conversation.
|
||||
if (playerInputs != null)
|
||||
{
|
||||
playerInputs.MoveInput(Vector2.zero);
|
||||
playerInputs.LookInput(Vector2.zero);
|
||||
playerInputs.SprintInput(false);
|
||||
playerInputs.JumpInput(false);
|
||||
}
|
||||
|
||||
if (playerAnimator != null)
|
||||
{
|
||||
playerAnimator.SetFloat(AnimIDSpeed, 0f);
|
||||
playerAnimator.SetFloat(AnimIDMotionSpeed, 0f);
|
||||
}
|
||||
|
||||
motionArbiter?.ResetState();
|
||||
}
|
||||
|
||||
// cursor state hook — see plan §3.4
|
||||
playerController.enabled = !locked;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2323f96ac8bc4e7080b4e3dac9a23795
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NightclubArcadia.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Receives the Player/Menu SendMessage from PlayerInput (sibling of
|
||||
/// StarterAssetsInputs on PlayerArmature) and raises
|
||||
/// <see cref="MenuToggleRequested"/>.
|
||||
/// </summary>
|
||||
public sealed class PlayerMenuInput : MonoBehaviour
|
||||
{
|
||||
public event Action MenuToggleRequested;
|
||||
|
||||
void OnMenu(InputValue value)
|
||||
{
|
||||
if (value.isPressed)
|
||||
{
|
||||
MenuToggleRequested?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d08e055ec81347c4bddb8231f5c20cd2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,646 @@
|
||||
using NightclubArcadia.Cinematics;
|
||||
using NightclubArcadia.Dialogue;
|
||||
using NightclubArcadia.Skills;
|
||||
using NightclubArcadia.UI.Dialogue;
|
||||
using NightclubArcadia.UI.HUD;
|
||||
using NightclubArcadia.UI.Menu;
|
||||
using StarterAssets;
|
||||
using TMPro;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace NightclubArcadia.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Builds the rudimentary UI layer at runtime, for scenes where the UI
|
||||
/// prefabs have not been instantiated. It is a fallback only: the authored
|
||||
/// path is Tools → Nightclub Arcadia → Set Up UI Layer, which produces the
|
||||
/// prefabs under Assets/Prefabs/UI and wires them into the scene.
|
||||
///
|
||||
/// It does NOT auto-spawn. It used to, which meant that once the scene had
|
||||
/// been wired properly it would still create a second "UI System" object
|
||||
/// carrying a duplicate UIStateController — logging a Debug.LogError every
|
||||
/// play — and would reflection-overwrite DialogueCameraFraming's serialised
|
||||
/// dialogueScreenX, making that value impossible to tune in the Inspector.
|
||||
/// Add this component to a scene by hand if you want the fallback.
|
||||
/// </summary>
|
||||
[DefaultExecutionOrder(-100)]
|
||||
public sealed class UILayerBootstrap : MonoBehaviour
|
||||
{
|
||||
[SerializeField] bool buildIfMissing = true;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
EnsureFoundation();
|
||||
|
||||
if (!buildIfMissing)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (FindFirstObjectByType<DialogueStreamPresenter>() == null)
|
||||
{
|
||||
BuildDialogueStream();
|
||||
}
|
||||
|
||||
if (FindFirstObjectByType<PortraitHudView>() == null)
|
||||
{
|
||||
BuildHud();
|
||||
}
|
||||
|
||||
if (FindFirstObjectByType<PlayerMenuController>() == null)
|
||||
{
|
||||
BuildMenu();
|
||||
}
|
||||
|
||||
EnsureCameraFraming();
|
||||
WireDialogueRunner();
|
||||
HidePackageDialogueCanvas();
|
||||
}
|
||||
|
||||
void EnsureFoundation()
|
||||
{
|
||||
if (UIStateController.Instance == null && FindFirstObjectByType<UIStateController>() == null)
|
||||
{
|
||||
var go = GameObject.Find("UI System") ?? new GameObject("UI System");
|
||||
go.AddComponent<UIStateController>();
|
||||
}
|
||||
|
||||
var player = GameObject.Find("PlayerArmature");
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.GetComponent<PlayerControlLock>() == null)
|
||||
{
|
||||
player.AddComponent<PlayerControlLock>();
|
||||
}
|
||||
|
||||
if (player.GetComponent<PlayerMenuInput>() == null)
|
||||
{
|
||||
player.AddComponent<PlayerMenuInput>();
|
||||
}
|
||||
|
||||
var inputs = player.GetComponent<StarterAssetsInputs>();
|
||||
if (inputs != null)
|
||||
{
|
||||
inputs.cursorLocked = false;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
var transition = FindFirstObjectByType<DialogueTransitionController>();
|
||||
if (transition != null)
|
||||
{
|
||||
var soLock = player.GetComponent<PlayerControlLock>();
|
||||
// Assign via reflection-free serialized path: public setter not available,
|
||||
// so use SendMessage-style field via SerializedObject is editor-only.
|
||||
// Runtime: DialogueTransitionController finds lock from playerArmature in Awake.
|
||||
var field = typeof(DialogueTransitionController).GetField(
|
||||
"controlLock",
|
||||
System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
||||
field?.SetValue(transition, soLock);
|
||||
}
|
||||
}
|
||||
|
||||
void BuildDialogueStream()
|
||||
{
|
||||
var canvasGo = CreateCanvas("DialogueStreamCanvas", 5);
|
||||
var canvasGroup = canvasGo.AddComponent<CanvasGroup>();
|
||||
canvasGroup.alpha = 0f;
|
||||
canvasGroup.interactable = false;
|
||||
canvasGroup.blocksRaycasts = false;
|
||||
|
||||
var panel = new GameObject("Panel", typeof(RectTransform), typeof(Image));
|
||||
panel.transform.SetParent(canvasGo.transform, false);
|
||||
var panelRt = panel.GetComponent<RectTransform>();
|
||||
panelRt.anchorMin = new Vector2(0.66f, 0f);
|
||||
panelRt.anchorMax = Vector2.one;
|
||||
panelRt.offsetMin = Vector2.zero;
|
||||
panelRt.offsetMax = Vector2.zero;
|
||||
panel.GetComponent<Image>().color = new Color(0.05f, 0.05f, 0.08f, 0.92f);
|
||||
|
||||
var scrollGo = new GameObject("Scroll", typeof(RectTransform), typeof(ScrollRect), typeof(Image));
|
||||
scrollGo.transform.SetParent(panel.transform, false);
|
||||
Stretch(scrollGo.GetComponent<RectTransform>(), 8f);
|
||||
scrollGo.GetComponent<Image>().color = new Color(0f, 0f, 0f, 0.01f);
|
||||
|
||||
var viewport = new GameObject("Viewport", typeof(RectTransform), typeof(RectMask2D), typeof(Image));
|
||||
viewport.transform.SetParent(scrollGo.transform, false);
|
||||
Stretch(viewport.GetComponent<RectTransform>());
|
||||
viewport.GetComponent<Image>().color = new Color(1f, 1f, 1f, 0.01f);
|
||||
|
||||
var content = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
content.transform.SetParent(viewport.transform, false);
|
||||
var contentRt = content.GetComponent<RectTransform>();
|
||||
contentRt.anchorMin = new Vector2(0f, 0f);
|
||||
contentRt.anchorMax = new Vector2(1f, 0f);
|
||||
contentRt.pivot = new Vector2(0.5f, 0f);
|
||||
var vlg = content.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.childAlignment = TextAnchor.LowerCenter;
|
||||
vlg.childControlHeight = true;
|
||||
vlg.childControlWidth = true;
|
||||
vlg.childForceExpandHeight = false;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.spacing = 6f;
|
||||
content.GetComponent<ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
|
||||
var messages = new GameObject("Messages", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
messages.transform.SetParent(content.transform, false);
|
||||
ConfigureVertical(messages);
|
||||
|
||||
var options = new GameObject("Options", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter), typeof(CanvasGroup));
|
||||
options.transform.SetParent(content.transform, false);
|
||||
ConfigureVertical(options);
|
||||
var optionsGroup = options.GetComponent<CanvasGroup>();
|
||||
optionsGroup.alpha = 0f;
|
||||
optionsGroup.interactable = false;
|
||||
optionsGroup.blocksRaycasts = false;
|
||||
|
||||
var scroll = scrollGo.GetComponent<ScrollRect>();
|
||||
scroll.content = contentRt;
|
||||
scroll.viewport = viewport.GetComponent<RectTransform>();
|
||||
scroll.horizontal = false;
|
||||
scroll.vertical = true;
|
||||
|
||||
var templates = new GameObject("UITemplates");
|
||||
templates.transform.SetParent(transform, false);
|
||||
templates.SetActive(false);
|
||||
|
||||
var rowPrefab = BuildMessageRowPrefab(templates.transform);
|
||||
|
||||
var stream = canvasGo.AddComponent<DialogueStreamPresenter>();
|
||||
SetPrivate(stream, "messageRowPrefab", rowPrefab);
|
||||
SetPrivate(stream, "messageContainer", messages.GetComponent<RectTransform>());
|
||||
SetPrivate(stream, "scrollRect", scroll);
|
||||
|
||||
OptionItem yarnOption = null;
|
||||
#if UNITY_EDITOR
|
||||
yarnOption = UnityEditor.AssetDatabase.LoadAssetAtPath<OptionItem>(
|
||||
"Packages/dev.yarnspinner.unity/Prefabs/Option Item.prefab");
|
||||
#endif
|
||||
if (yarnOption == null)
|
||||
{
|
||||
yarnOption = BuildFallbackOptionItem(templates.transform);
|
||||
}
|
||||
|
||||
var optionsPresenter = canvasGo.AddComponent<DialogueStreamOptionsPresenter>();
|
||||
SetPrivate(optionsPresenter, "optionViewPrefab", yarnOption);
|
||||
SetPrivate(optionsPresenter, "optionsContainer", options.transform);
|
||||
SetPrivate(optionsPresenter, "canvasGroup", optionsGroup);
|
||||
|
||||
var transition = FindFirstObjectByType<DialogueTransitionController>();
|
||||
if (transition != null)
|
||||
{
|
||||
SetPrivate(transition, "dialogueUI", canvasGo);
|
||||
}
|
||||
|
||||
foreach (var npc in FindObjectsByType<NPCStandIn>(FindObjectsInactive.Include, FindObjectsSortMode.None))
|
||||
{
|
||||
npc.dialogueUI = canvasGo;
|
||||
}
|
||||
}
|
||||
|
||||
DialogueMessageRow BuildMessageRowPrefab(Transform parent)
|
||||
{
|
||||
var root = new GameObject("DialogueMessageRow", typeof(RectTransform), typeof(DialogueMessageRow), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
root.transform.SetParent(parent, false);
|
||||
var layout = root.GetComponent<VerticalLayoutGroup>();
|
||||
layout.padding = new RectOffset(12, 12, 8, 8);
|
||||
layout.spacing = 4f;
|
||||
layout.childControlHeight = true;
|
||||
layout.childControlWidth = true;
|
||||
layout.childForceExpandWidth = true;
|
||||
layout.childForceExpandHeight = false;
|
||||
root.GetComponent<ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
|
||||
var speaker = CreateTmp("Speaker", root.transform, 22f, FontStyles.Bold);
|
||||
var body = CreateTmp("Body", root.transform, 28f, FontStyles.Normal);
|
||||
var row = root.GetComponent<DialogueMessageRow>();
|
||||
SetPrivate(row, "speakerText", speaker);
|
||||
SetPrivate(row, "bodyText", body);
|
||||
SetPrivate(row, "speakerLabel", speaker.gameObject);
|
||||
return row;
|
||||
}
|
||||
|
||||
OptionItem BuildFallbackOptionItem(Transform parent)
|
||||
{
|
||||
var go = new GameObject("OptionItem", typeof(RectTransform), typeof(Image), typeof(OptionItem));
|
||||
go.transform.SetParent(parent, false);
|
||||
go.GetComponent<Image>().color = new Color(0.15f, 0.15f, 0.2f, 1f);
|
||||
var text = CreateTmp("Text", go.transform, 24f, FontStyles.Normal);
|
||||
Stretch(text.rectTransform);
|
||||
SetPrivate(go.GetComponent<OptionItem>(), "text", text);
|
||||
return go.GetComponent<OptionItem>();
|
||||
}
|
||||
|
||||
void BuildHud()
|
||||
{
|
||||
var canvasGo = CreateCanvas("HudCanvas", 10);
|
||||
var panel = new GameObject("PortraitPanel", typeof(RectTransform), typeof(CanvasGroup), typeof(Image), typeof(Button));
|
||||
panel.transform.SetParent(canvasGo.transform, false);
|
||||
var rt = panel.GetComponent<RectTransform>();
|
||||
rt.anchorMin = new Vector2(1f, 0f);
|
||||
rt.anchorMax = new Vector2(1f, 0f);
|
||||
rt.pivot = new Vector2(1f, 0f);
|
||||
rt.sizeDelta = new Vector2(220f, 280f);
|
||||
rt.anchoredPosition = new Vector2(-24f, 24f);
|
||||
panel.GetComponent<Image>().color = new Color(0.15f, 0.15f, 0.18f, 0.95f);
|
||||
|
||||
// Lives in Assets/Art/UI/Placeholder/Resources so this resolves in
|
||||
// builds too — the AssetDatabase fallback below is editor-only.
|
||||
var sprite = Resources.Load<Sprite>("portrait_placeholder");
|
||||
#if UNITY_EDITOR
|
||||
if (sprite == null)
|
||||
{
|
||||
sprite = UnityEditor.AssetDatabase.LoadAssetAtPath<Sprite>(
|
||||
"Assets/Art/UI/Placeholder/Resources/portrait_placeholder.png");
|
||||
}
|
||||
#endif
|
||||
if (sprite != null)
|
||||
{
|
||||
panel.GetComponent<Image>().sprite = sprite;
|
||||
panel.GetComponent<Image>().preserveAspect = true;
|
||||
}
|
||||
|
||||
var hint = CreateTmp("TabHint", panel.transform, 18f, FontStyles.Normal);
|
||||
hint.text = "Tab";
|
||||
hint.alignment = TextAlignmentOptions.Center;
|
||||
var hintRt = hint.rectTransform;
|
||||
hintRt.anchorMin = new Vector2(0f, 0f);
|
||||
hintRt.anchorMax = new Vector2(1f, 0f);
|
||||
hintRt.pivot = new Vector2(0.5f, 0f);
|
||||
hintRt.sizeDelta = new Vector2(0f, 28f);
|
||||
hintRt.anchoredPosition = new Vector2(0f, 4f);
|
||||
|
||||
var view = canvasGo.AddComponent<PortraitHudView>();
|
||||
SetPrivate(view, "panelRoot", panel);
|
||||
}
|
||||
|
||||
void BuildMenu()
|
||||
{
|
||||
var canvasGo = CreateCanvas("PlayerMenuCanvas", 20);
|
||||
var rootGroup = canvasGo.AddComponent<CanvasGroup>();
|
||||
rootGroup.alpha = 0f;
|
||||
rootGroup.interactable = false;
|
||||
rootGroup.blocksRaycasts = false;
|
||||
|
||||
var dimmer = new GameObject("Dimmer", typeof(RectTransform), typeof(Image));
|
||||
dimmer.transform.SetParent(canvasGo.transform, false);
|
||||
Stretch(dimmer.GetComponent<RectTransform>());
|
||||
dimmer.GetComponent<Image>().color = new Color(0f, 0f, 0f, 0.6f);
|
||||
|
||||
var body = new GameObject("MenuBody", typeof(RectTransform), typeof(Image));
|
||||
body.transform.SetParent(canvasGo.transform, false);
|
||||
var bodyRt = body.GetComponent<RectTransform>();
|
||||
bodyRt.anchorMin = new Vector2(0.15f, 0.1f);
|
||||
bodyRt.anchorMax = new Vector2(0.85f, 0.9f);
|
||||
bodyRt.offsetMin = Vector2.zero;
|
||||
bodyRt.offsetMax = Vector2.zero;
|
||||
body.GetComponent<Image>().color = new Color(0.08f, 0.08f, 0.1f, 0.98f);
|
||||
|
||||
var tabBarGo = new GameObject("TabBar", typeof(RectTransform), typeof(HorizontalLayoutGroup), typeof(MenuTabBar));
|
||||
tabBarGo.transform.SetParent(body.transform, false);
|
||||
var tabBarRt = tabBarGo.GetComponent<RectTransform>();
|
||||
tabBarRt.anchorMin = new Vector2(0f, 1f);
|
||||
tabBarRt.anchorMax = new Vector2(1f, 1f);
|
||||
tabBarRt.pivot = new Vector2(0.5f, 1f);
|
||||
tabBarRt.sizeDelta = new Vector2(0f, 56f);
|
||||
var tabHlg = tabBarGo.GetComponent<HorizontalLayoutGroup>();
|
||||
tabHlg.spacing = 8f;
|
||||
tabHlg.padding = new RectOffset(12, 12, 8, 8);
|
||||
// childControl* default to false on a script-added layout group.
|
||||
tabHlg.childControlWidth = true;
|
||||
tabHlg.childControlHeight = true;
|
||||
tabHlg.childForceExpandWidth = true;
|
||||
tabHlg.childForceExpandHeight = true;
|
||||
|
||||
var contentArea = new GameObject("ContentArea", typeof(RectTransform));
|
||||
contentArea.transform.SetParent(body.transform, false);
|
||||
var contentRt = contentArea.GetComponent<RectTransform>();
|
||||
contentRt.anchorMin = Vector2.zero;
|
||||
contentRt.anchorMax = Vector2.one;
|
||||
contentRt.offsetMin = new Vector2(16f, 16f);
|
||||
contentRt.offsetMax = new Vector2(-16f, -64f);
|
||||
|
||||
var characterPanel = CreateTabPanel("CharacterPanel", contentArea.transform);
|
||||
var skillsPanel = CreateTabPanel("SkillsPanel", contentArea.transform);
|
||||
var journalPanel = CreateTabPanel("JournalPanel", contentArea.transform);
|
||||
|
||||
// Character
|
||||
var charVlg = characterPanel.AddComponent<VerticalLayoutGroup>();
|
||||
charVlg.spacing = 12f;
|
||||
charVlg.padding = new RectOffset(8, 8, 8, 8);
|
||||
charVlg.childControlWidth = true;
|
||||
charVlg.childControlHeight = true;
|
||||
charVlg.childForceExpandWidth = true;
|
||||
var charView = characterPanel.AddComponent<CharacterPanelView>();
|
||||
var nameLabel = CreateTmp("Name", characterPanel.transform, 36f, FontStyles.Bold);
|
||||
var aliasLabel = CreateTmp("Alias", characterPanel.transform, 28f, FontStyles.Italic);
|
||||
var invLabel = CreateTmp("Inventory", characterPanel.transform, 24f, FontStyles.Normal);
|
||||
SetPrivate(charView, "nameLabel", nameLabel);
|
||||
SetPrivate(charView, "aliasLabel", aliasLabel);
|
||||
SetPrivate(charView, "inventoryPlaceholder", invLabel);
|
||||
|
||||
// Skills
|
||||
var skillsContent = new GameObject("Content", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
skillsContent.transform.SetParent(skillsPanel.transform, false);
|
||||
Stretch(skillsContent.GetComponent<RectTransform>());
|
||||
ConfigureVertical(skillsContent);
|
||||
skillsContent.GetComponent<RectTransform>().anchorMin = new Vector2(0f, 1f);
|
||||
skillsContent.GetComponent<RectTransform>().anchorMax = new Vector2(1f, 1f);
|
||||
skillsContent.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 1f);
|
||||
|
||||
var axisHeader = CreateTmp("AxisHeaderTemplate", skillsContent.transform, 20f, FontStyles.Bold);
|
||||
axisHeader.gameObject.SetActive(false);
|
||||
var templates = GameObject.Find("UI System")?.transform.Find("UITemplates")
|
||||
?? new GameObject("UITemplates").transform;
|
||||
if (templates.parent == null && transform != null)
|
||||
{
|
||||
templates.SetParent(transform, false);
|
||||
templates.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
var rowPrefab = BuildSkillRowPrefab(templates);
|
||||
var skillsView = skillsPanel.AddComponent<SkillsPanelView>();
|
||||
SetPrivate(skillsView, "contentRoot", skillsContent.GetComponent<RectTransform>());
|
||||
SetPrivate(skillsView, "rowPrefab", rowPrefab);
|
||||
SetPrivate(skillsView, "axisHeaderPrefab", axisHeader);
|
||||
SetPrivate(skillsView, "displayMaxRank", 6);
|
||||
|
||||
// Journal
|
||||
var journalView = journalPanel.AddComponent<JournalPanelView>();
|
||||
var journalLabel = CreateTmp("Placeholder", journalPanel.transform, 28f, FontStyles.Italic);
|
||||
journalLabel.text = "Nothing recorded yet.";
|
||||
journalLabel.alignment = TextAlignmentOptions.Center;
|
||||
Stretch(journalLabel.rectTransform);
|
||||
SetPrivate(journalView, "placeholderLabel", journalLabel);
|
||||
|
||||
var charBtn = CreateTabButton("Character", tabBarGo.transform);
|
||||
var skillsBtn = CreateTabButton("Skills", tabBarGo.transform);
|
||||
var journalBtn = CreateTabButton("Journal", tabBarGo.transform);
|
||||
|
||||
var tabBar = tabBarGo.GetComponent<MenuTabBar>();
|
||||
var tabs = new MenuTabBar.TabEntry[3];
|
||||
tabs[0] = new MenuTabBar.TabEntry
|
||||
{
|
||||
button = charBtn,
|
||||
panel = characterPanel.GetComponent<CanvasGroup>(),
|
||||
onShown = new UnityEngine.Events.UnityEvent(),
|
||||
};
|
||||
// Panels toggle via CanvasGroup, never SetActive, so OnEnable fires
|
||||
// once at construction and never again — before Yarn has set
|
||||
// $player_name_full. Refresh on show or the tab stays stale forever.
|
||||
tabs[0].onShown.AddListener(charView.Refresh);
|
||||
tabs[1] = new MenuTabBar.TabEntry
|
||||
{
|
||||
button = skillsBtn,
|
||||
panel = skillsPanel.GetComponent<CanvasGroup>(),
|
||||
onShown = new UnityEngine.Events.UnityEvent(),
|
||||
};
|
||||
tabs[1].onShown.AddListener(skillsView.Refresh);
|
||||
tabs[2] = new MenuTabBar.TabEntry
|
||||
{
|
||||
button = journalBtn,
|
||||
panel = journalPanel.GetComponent<CanvasGroup>(),
|
||||
onShown = new UnityEngine.Events.UnityEvent(),
|
||||
};
|
||||
tabBar.SetTabs(tabs);
|
||||
|
||||
var player = GameObject.Find("PlayerArmature");
|
||||
var menuController = canvasGo.AddComponent<PlayerMenuController>();
|
||||
SetPrivate(menuController, "menuRoot", canvasGo);
|
||||
SetPrivate(menuController, "menuInput", player != null ? player.GetComponent<PlayerMenuInput>() : null);
|
||||
SetPrivate(menuController, "controlLock", player != null ? player.GetComponent<PlayerControlLock>() : null);
|
||||
SetPrivate(menuController, "tabBar", tabBar);
|
||||
|
||||
// Portrait click
|
||||
var portraitButton = FindFirstObjectByType<PortraitHudView>()?.GetComponentInChildren<Button>(true);
|
||||
if (portraitButton != null)
|
||||
{
|
||||
portraitButton.onClick.AddListener(menuController.Open);
|
||||
}
|
||||
}
|
||||
|
||||
SkillRowView BuildSkillRowPrefab(Transform parent)
|
||||
{
|
||||
var root = new GameObject("SkillRow", typeof(RectTransform), typeof(SkillRowView), typeof(HorizontalLayoutGroup));
|
||||
root.transform.SetParent(parent, false);
|
||||
var hlg = root.GetComponent<HorizontalLayoutGroup>();
|
||||
hlg.padding = new RectOffset(8, 8, 4, 4);
|
||||
hlg.spacing = 12f;
|
||||
hlg.childAlignment = TextAnchor.MiddleLeft;
|
||||
hlg.childControlHeight = true;
|
||||
hlg.childControlWidth = true;
|
||||
hlg.childForceExpandHeight = true;
|
||||
|
||||
var stripe = new GameObject("Accent", typeof(RectTransform), typeof(Image), typeof(LayoutElement));
|
||||
stripe.transform.SetParent(root.transform, false);
|
||||
stripe.GetComponent<LayoutElement>().preferredWidth = 6f;
|
||||
stripe.GetComponent<Image>().color = Color.white;
|
||||
|
||||
var name = CreateTmp("Name", root.transform, 24f, FontStyles.Bold);
|
||||
name.GetComponent<LayoutElement>().flexibleWidth = 1f;
|
||||
|
||||
var bar = new GameObject("Bar", typeof(RectTransform), typeof(Image), typeof(LayoutElement));
|
||||
bar.transform.SetParent(root.transform, false);
|
||||
bar.GetComponent<Image>().color = new Color(0.2f, 0.2f, 0.22f);
|
||||
bar.GetComponent<LayoutElement>().preferredWidth = 160f;
|
||||
bar.GetComponent<LayoutElement>().preferredHeight = 16f;
|
||||
|
||||
var fill = new GameObject("Fill", typeof(RectTransform), typeof(Image));
|
||||
fill.transform.SetParent(bar.transform, false);
|
||||
Stretch(fill.GetComponent<RectTransform>());
|
||||
var fillImage = fill.GetComponent<Image>();
|
||||
fillImage.type = Image.Type.Filled;
|
||||
fillImage.fillMethod = Image.FillMethod.Horizontal;
|
||||
fillImage.color = Color.white;
|
||||
|
||||
var rank = CreateTmp("Rank", root.transform, 24f, FontStyles.Normal);
|
||||
rank.alignment = TextAlignmentOptions.Right;
|
||||
rank.GetComponent<LayoutElement>().preferredWidth = 40f;
|
||||
|
||||
var view = root.GetComponent<SkillRowView>();
|
||||
SetPrivate(view, "nameLabel", name);
|
||||
SetPrivate(view, "rankLabel", rank);
|
||||
SetPrivate(view, "barFill", fillImage);
|
||||
SetPrivate(view, "accentStripe", stripe.GetComponent<Image>());
|
||||
return view;
|
||||
}
|
||||
|
||||
void EnsureCameraFraming()
|
||||
{
|
||||
var vcam = GameObject.Find("CinemachineCamera");
|
||||
if (vcam == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var framing = vcam.GetComponent<DialogueCameraFraming>();
|
||||
if (framing == null)
|
||||
{
|
||||
framing = vcam.AddComponent<DialogueCameraFraming>();
|
||||
}
|
||||
|
||||
SetPrivate(framing, "composer", vcam.GetComponent<CinemachinePositionComposer>());
|
||||
SetPrivate(framing, "dialogueScreenX", -0.17f);
|
||||
}
|
||||
|
||||
void WireDialogueRunner()
|
||||
{
|
||||
var runner = FindFirstObjectByType<DialogueRunner>();
|
||||
var stream = FindFirstObjectByType<DialogueStreamPresenter>();
|
||||
var options = FindFirstObjectByType<DialogueStreamOptionsPresenter>();
|
||||
var advancer = FindFirstObjectByType<LineAdvancer>();
|
||||
if (runner == null || stream == null || options == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var list = new System.Collections.Generic.List<DialoguePresenterBase>();
|
||||
list.Add(stream);
|
||||
list.Add(options);
|
||||
if (advancer != null)
|
||||
{
|
||||
list.Add(advancer);
|
||||
SetPrivate(advancer, "presenter", stream);
|
||||
}
|
||||
|
||||
runner.DialoguePresenters = list;
|
||||
}
|
||||
|
||||
void HidePackageDialogueCanvas()
|
||||
{
|
||||
var dialogueSystem = GameObject.Find("Dialogue System");
|
||||
if (dialogueSystem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var packageCanvas = dialogueSystem.transform.Find("Canvas");
|
||||
if (packageCanvas == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var banner = packageCanvas.Find("Skill Check Banner");
|
||||
var streamCanvas = GameObject.Find("DialogueStreamCanvas");
|
||||
if (banner != null && streamCanvas != null)
|
||||
{
|
||||
banner.SetParent(streamCanvas.transform, false);
|
||||
var bannerRt = banner.GetComponent<RectTransform>();
|
||||
if (bannerRt != null)
|
||||
{
|
||||
bannerRt.anchorMin = new Vector2(0f, 0.85f);
|
||||
bannerRt.anchorMax = new Vector2(0.66f, 1f);
|
||||
bannerRt.offsetMin = new Vector2(16f, 0f);
|
||||
bannerRt.offsetMax = new Vector2(-16f, -16f);
|
||||
}
|
||||
}
|
||||
|
||||
packageCanvas.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
static GameObject CreateCanvas(string name, int sortingOrder)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
var canvas = go.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = sortingOrder;
|
||||
var scaler = go.GetComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920f, 1080f);
|
||||
scaler.matchWidthOrHeight = 0.5f;
|
||||
return go;
|
||||
}
|
||||
|
||||
static GameObject CreateTabPanel(string name, Transform parent)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(CanvasGroup));
|
||||
go.transform.SetParent(parent, false);
|
||||
Stretch(go.GetComponent<RectTransform>());
|
||||
var group = go.GetComponent<CanvasGroup>();
|
||||
group.alpha = 0f;
|
||||
group.interactable = false;
|
||||
group.blocksRaycasts = false;
|
||||
return go;
|
||||
}
|
||||
|
||||
static Button CreateTabButton(string label, Transform parent)
|
||||
{
|
||||
var go = new GameObject(label, typeof(RectTransform), typeof(Image), typeof(Button), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
go.GetComponent<Image>().color = new Color(0.2f, 0.2f, 0.25f, 1f);
|
||||
var text = CreateTmp("Label", go.transform, 22f, FontStyles.Bold);
|
||||
text.text = label;
|
||||
text.alignment = TextAlignmentOptions.Center;
|
||||
Stretch(text.rectTransform);
|
||||
return go.GetComponent<Button>();
|
||||
}
|
||||
|
||||
static TextMeshProUGUI CreateTmp(string name, Transform parent, float size, FontStyles style)
|
||||
{
|
||||
var go = new GameObject(name, typeof(RectTransform), typeof(TextMeshProUGUI), typeof(LayoutElement));
|
||||
go.transform.SetParent(parent, false);
|
||||
var tmp = go.GetComponent<TextMeshProUGUI>();
|
||||
tmp.fontSize = size;
|
||||
tmp.fontStyle = style;
|
||||
tmp.color = Color.white;
|
||||
tmp.enableWordWrapping = true;
|
||||
tmp.text = name;
|
||||
// No LayoutElement.preferredHeight — it would pin wrapped text to a
|
||||
// single line's height and make stream rows overlap. See the same
|
||||
// note in UILayerSetup.CreateTmp.
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static void Stretch(RectTransform rt, float pad = 0f)
|
||||
{
|
||||
rt.anchorMin = Vector2.zero;
|
||||
rt.anchorMax = Vector2.one;
|
||||
rt.offsetMin = new Vector2(pad, pad);
|
||||
rt.offsetMax = new Vector2(-pad, -pad);
|
||||
}
|
||||
|
||||
static void ConfigureVertical(GameObject go)
|
||||
{
|
||||
var rt = go.GetComponent<RectTransform>();
|
||||
rt.anchorMin = new Vector2(0f, 0f);
|
||||
rt.anchorMax = new Vector2(1f, 0f);
|
||||
rt.pivot = new Vector2(0.5f, 0f);
|
||||
// See UILayerSetup.ConfigureVerticalContent: a script-added
|
||||
// RectTransform starts at sizeDelta (100,100), which overhangs 50px
|
||||
// off each side under stretch anchors and gets sheared by the mask.
|
||||
rt.sizeDelta = new Vector2(0f, rt.sizeDelta.y);
|
||||
rt.anchoredPosition = Vector2.zero;
|
||||
var vlg = go.GetComponent<VerticalLayoutGroup>();
|
||||
vlg.childControlHeight = true;
|
||||
vlg.childControlWidth = true;
|
||||
vlg.childForceExpandHeight = false;
|
||||
vlg.childForceExpandWidth = true;
|
||||
vlg.spacing = 4f;
|
||||
go.GetComponent<ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
}
|
||||
|
||||
static void SetPrivate(object target, string fieldName, object value)
|
||||
{
|
||||
var type = target.GetType();
|
||||
while (type != null)
|
||||
{
|
||||
var field = type.GetField(fieldName, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public);
|
||||
if (field != null)
|
||||
{
|
||||
field.SetValue(target, value);
|
||||
return;
|
||||
}
|
||||
|
||||
type = type.BaseType;
|
||||
}
|
||||
|
||||
Debug.LogWarning($"[UILayerBootstrap] Could not set field '{fieldName}' on {target.GetType().Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e244f08c4f1b4fe08ddef0a1c5409136
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: -100
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NightclubArcadia.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Owns the two independent UI state flags — dialogue active and menu open —
|
||||
/// and raises <see cref="StateChanged"/> so HUD, camera framing, and panels
|
||||
/// can derive their visibility from a single source of truth.
|
||||
/// </summary>
|
||||
public sealed class UIStateController : MonoBehaviour
|
||||
{
|
||||
public static UIStateController Instance { get; private set; }
|
||||
|
||||
public bool IsDialogueActive { get; private set; }
|
||||
public bool IsMenuOpen { get; private set; }
|
||||
|
||||
/// <summary>Raised after any state change. Subscribers derive their own visibility.</summary>
|
||||
public event Action StateChanged;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
{
|
||||
Debug.LogError($"[{nameof(UIStateController)}] Duplicate instance on '{name}'. Destroying this component.", this);
|
||||
Destroy(this);
|
||||
return;
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (Instance == this)
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDialogueActive(bool value)
|
||||
{
|
||||
if (IsDialogueActive == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IsDialogueActive = value;
|
||||
StateChanged?.Invoke();
|
||||
}
|
||||
|
||||
public void SetMenuOpen(bool value)
|
||||
{
|
||||
if (IsMenuOpen == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IsMenuOpen = value;
|
||||
StateChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa16b7ff96b64cd4bd74a00174bf9c60
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user