입력필드 하이라이트 오류, 최초 화면에서 Open Project가 되지 않는 오류 수정

This commit is contained in:
정영민
2025-06-18 17:50:46 +09:00
parent babe3cfe3f
commit 34fb7d54ff
6 changed files with 66 additions and 19 deletions

View File

@@ -3143,6 +3143,7 @@ GameObject:
- component: {fileID: 1881980878456085221}
- component: {fileID: 864169242389839687}
- component: {fileID: 368971987607002277}
- component: {fileID: 8668772194790118665}
m_Layer: 5
m_Name: InputField_ProjectRoute
m_TagString: Untagged
@@ -3310,6 +3311,21 @@ MonoBehaviour:
isAlert: 0
m_InputValidator: {fileID: 0}
m_ShouldActivateOnSelect: 1
--- !u!114 &8668772194790118665
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4595659736689126238}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 1, g: 0, b: 0, a: 0}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!1 &4745164295224957327
GameObject:
m_ObjectHideFlags: 0

View File

@@ -244,7 +244,7 @@ namespace Studio.Manage
foreach (var mf in meshFilters)
{
if (mf.sharedMesh.isReadable)
if (!mf.sharedMesh.isReadable)
continue;
if (mf.sharedMesh != null)
@@ -256,7 +256,7 @@ namespace Studio.Manage
foreach (var smr in skinnedRenderers)
{
if (smr.sharedMesh.isReadable)
if (!smr.sharedMesh.isReadable)
continue;
if (smr.sharedMesh != null)

View File

@@ -128,17 +128,17 @@ namespace Studio.UI
while (count < 1)
{
while (inputFieldOutline.effectColor.a <= 1f)
while (tempColor.a < 1f)
{
tempColor.a += 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a + 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}
yield return new WaitForSeconds(0.1f);
while (inputFieldOutline.effectColor.a >= 0f)
while (tempColor.a > 0f)
{
tempColor.a -= 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a - 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}

View File

@@ -1,7 +1,9 @@
using Newtonsoft.Json;
using Ookii.Dialogs;
using Studio.Core;
using Studio.Util;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using TMPro;
@@ -49,6 +51,7 @@ namespace Studio.UI
{
if (!IsPathVaild(input))
{
InputFieldHighlight(InputField_ProjectRoute);
Footer.gameObject.SetActive(false);
Text_ProjectName.text = string.Empty;
return;
@@ -84,9 +87,7 @@ namespace Studio.UI
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
{
var path = Path.GetDirectoryName(paths[0].Name);
InputField_ProjectRoute.text = path;
InputField_ProjectRoute.text = paths[0].Name;
InputField_ProjectRoute.onEndEdit?.Invoke(InputField_ProjectRoute.text);
}
onClickFileExplorer?.Invoke();
@@ -136,5 +137,36 @@ namespace Studio.UI
}
return true;
}
private void InputFieldHighlight(TMP_InputField inputField)
{
CoroutineRunner.instance.StartCoroutine(Blink(inputField));
}
private IEnumerator Blink(TMP_InputField inputField)
{
var inputFieldOutline = inputField.GetComponent<Outline>();
Color tempColor = inputFieldOutline.effectColor;
var count = 0;
while (count < 1)
{
while (tempColor.a < 1f)
{
tempColor.a = Mathf.Clamp(tempColor.a + 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}
yield return new WaitForSeconds(0.1f);
while (tempColor.a > 0f)
{
tempColor.a = Mathf.Clamp(tempColor.a - 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}
yield return new WaitForSeconds(0.1f);
count++;
}
}
}
}

View File

@@ -120,17 +120,17 @@ namespace Studio.UI
while (count < 1)
{
while (inputFieldOutline.effectColor.a <= 1f)
while (tempColor.a < 1f)
{
tempColor.a += 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a + 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}
yield return new WaitForSeconds(0.1f);
while (inputFieldOutline.effectColor.a >= 0f)
while (tempColor.a > 0f)
{
tempColor.a -= 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a - 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}

View File

@@ -34,8 +34,7 @@ namespace Studio.UI
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
{
var path = Path.GetDirectoryName(paths[0].Name);
InputField_ProjectRoute.text = path;
InputField_ProjectRoute.text = paths[0].Name;
}
}
@@ -86,17 +85,17 @@ namespace Studio.UI
while (count < 1)
{
while (inputFieldOutline.effectColor.a <= 1f)
while (tempColor.a < 1f)
{
tempColor.a += 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a + 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}
yield return new WaitForSeconds(0.1f);
while (inputFieldOutline.effectColor.a >= 0f)
while (tempColor.a > 0f)
{
tempColor.a -= 0.1f;
tempColor.a = Mathf.Clamp(tempColor.a - 0.1f, 0f, 1f);
inputFieldOutline.effectColor = tempColor;
yield return new WaitForSeconds(0.02f);
}