파일 탐색기 사용 시의 기본 경로 설정
This commit is contained in:
10
Assets/Scripts/Studio/Common/OptionURL.cs
Normal file
10
Assets/Scripts/Studio/Common/OptionURL.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Studio
|
||||||
|
{
|
||||||
|
public class OptionURL
|
||||||
|
{
|
||||||
|
internal static string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/Scripts/Studio/Common/OptionURL.cs.meta
Normal file
2
Assets/Scripts/Studio/Common/OptionURL.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e6d98f9c6f0b57a4baa2db43e9a75c3f
|
||||||
@@ -1,19 +1,17 @@
|
|||||||
using Studio.AssetTool;
|
using Studio.AssetTool;
|
||||||
using Studio.Manage;
|
using Studio.Manage;
|
||||||
using Studio.VirtualFactory.Info;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Unity.Mathematics;
|
using Unity.Mathematics;
|
||||||
using UnityEditor.Build;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Studio.Staic.STKC
|
namespace Studio.Staic.STKC
|
||||||
{
|
{
|
||||||
public class StackerCrane : AbstractFunctionObject
|
public class StackerCrane : AbstractFunctionObject
|
||||||
{
|
{
|
||||||
private Dictionary<string, string> CurrentEntity;
|
private Dictionary<string, string> CurrentEntity;
|
||||||
public override Dictionary<string, string> Info
|
public override Dictionary<string, string> Info
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -72,7 +70,7 @@ namespace Studio.Staic.STKC
|
|||||||
}
|
}
|
||||||
public void OnPlayStart()
|
public void OnPlayStart()
|
||||||
{
|
{
|
||||||
if(isfirstStart ==false)
|
if (isfirstStart == false)
|
||||||
startPos = transform.position.z;
|
startPos = transform.position.z;
|
||||||
isfirstStart = true;
|
isfirstStart = true;
|
||||||
var type = GetComponent<CustomAssetRenderObject>().topic;
|
var type = GetComponent<CustomAssetRenderObject>().topic;
|
||||||
@@ -189,6 +187,6 @@ namespace Studio.Staic.STKC
|
|||||||
onMotionStart -= StartAnim;
|
onMotionStart -= StartAnim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ namespace Studio.UI
|
|||||||
private Button Button_SelectedFolder;
|
private Button Button_SelectedFolder;
|
||||||
|
|
||||||
public Action<UI_FolderPathItem> onEndEditInputFieldURL;
|
public Action<UI_FolderPathItem> onEndEditInputFieldURL;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -34,7 +33,7 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private void OnClickSelectedFolderButton()
|
private void OnClickSelectedFolderButton()
|
||||||
{
|
{
|
||||||
var paths = StandaloneFileBrowser.OpenFolderPanel("Select AssetsFolder", defaultPath, false);
|
var paths = StandaloneFileBrowser.OpenFolderPanel("Select AssetsFolder", "", false);
|
||||||
|
|
||||||
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ namespace Studio.UI
|
|||||||
private float ratio;
|
private float ratio;
|
||||||
public Action onClose;
|
public Action onClose;
|
||||||
public Button Button_Close;
|
public Button Button_Close;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public void Active(bool isActive)
|
public void Active(bool isActive)
|
||||||
{
|
{
|
||||||
@@ -99,7 +98,7 @@ namespace Studio.UI
|
|||||||
private void OnClickImageSelectedButton()
|
private void OnClickImageSelectedButton()
|
||||||
{
|
{
|
||||||
var extensions = new[] { new ExtensionFilter("Image Files", "png", "jpg", "jpeg") };
|
var extensions = new[] { new ExtensionFilter("Image Files", "png", "jpg", "jpeg") };
|
||||||
StandaloneFileBrowser.OpenFilePanelAsync("이미지 열기", defaultPath, extensions, false, LoadImage);
|
StandaloneFileBrowser.OpenFilePanelAsync("이미지 열기", "", extensions, false, LoadImage);
|
||||||
}
|
}
|
||||||
private void OnAutoStartValuedChanged(bool isOn)
|
private void OnAutoStartValuedChanged(bool isOn)
|
||||||
{
|
{
|
||||||
@@ -107,7 +106,7 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private void OnClickLanguagePackButton()
|
private void OnClickLanguagePackButton()
|
||||||
{
|
{
|
||||||
var packItem = StandaloneFileBrowser.OpenFilePanel("언어 팩 열기", defaultPath, "", false);
|
var packItem = StandaloneFileBrowser.OpenFilePanel("언어 팩 열기", "", "", false);
|
||||||
|
|
||||||
if (packItem != null && packItem.Count > 0)
|
if (packItem != null && packItem.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ namespace Studio.UI
|
|||||||
private Dictionary<string, string> languages = new Dictionary<string, string>();
|
private Dictionary<string, string> languages = new Dictionary<string, string>();
|
||||||
private string json;
|
private string json;
|
||||||
public string saveLanguage;
|
public string saveLanguage;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -39,7 +38,7 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
void OnClickOpenFileButton()
|
void OnClickOpenFileButton()
|
||||||
{
|
{
|
||||||
StandaloneFileBrowser.OpenFilePanelAsync("Open File", defaultPath, "json", false, LoadJson);
|
StandaloneFileBrowser.OpenFilePanelAsync("Open File", "", "json", false, LoadJson);
|
||||||
}
|
}
|
||||||
void OnClickSaveButton()
|
void OnClickSaveButton()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,19 +22,17 @@ namespace Studio.UI
|
|||||||
public Action onClickFileExplorer;
|
public Action onClickFileExplorer;
|
||||||
public Action onClickCreate;
|
public Action onClickCreate;
|
||||||
|
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
Button_FileExplorer.onClick.AddListener(OnClickFileExplorer);
|
||||||
Button_Create.onClick.AddListener(OnClickCreate);
|
Button_Create.onClick.AddListener(OnClickCreate);
|
||||||
|
|
||||||
InputField_ProjectRoute.text = defaultPath;
|
InputField_ProjectRoute.text = OptionURL.defaultPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickFileExplorer()
|
private void OnClickFileExplorer()
|
||||||
{
|
{
|
||||||
var paths = StandaloneFileBrowser.OpenFolderPanel("Select Folder", defaultPath, false);
|
var paths = StandaloneFileBrowser.OpenFolderPanel("Select Folder", "", false);
|
||||||
|
|
||||||
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ namespace Studio.UI
|
|||||||
public Button Button_Open;
|
public Button Button_Open;
|
||||||
|
|
||||||
public Action onClickOpen;
|
public Action onClickOpen;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -77,7 +76,7 @@ namespace Studio.UI
|
|||||||
|
|
||||||
private void OnClickFileExplorer()
|
private void OnClickFileExplorer()
|
||||||
{
|
{
|
||||||
var paths = StandaloneFileBrowser.OpenFilePanel("Select Project", defaultPath, "ocs", false);
|
var paths = StandaloneFileBrowser.OpenFilePanel("Select Project", "", "ocs", false);
|
||||||
|
|
||||||
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ namespace Studio.UI
|
|||||||
public Button Button_Close;
|
public Button Button_Close;
|
||||||
|
|
||||||
public Action onClickCreate;
|
public Action onClickCreate;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -29,7 +28,7 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private void OnClickFileExplorer()
|
private void OnClickFileExplorer()
|
||||||
{
|
{
|
||||||
var paths = StandaloneFileBrowser.OpenFolderPanel("Select Folder", defaultPath, false);
|
var paths = StandaloneFileBrowser.OpenFolderPanel("Select Folder", "", false);
|
||||||
|
|
||||||
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
||||||
{
|
{
|
||||||
@@ -53,6 +52,9 @@ namespace Studio.UI
|
|||||||
public void Open()
|
public void Open()
|
||||||
{
|
{
|
||||||
SetActive(true);
|
SetActive(true);
|
||||||
|
|
||||||
|
InputField_ProjectName.text = string.Empty;
|
||||||
|
InputField_ProjectRoute.text = OptionURL.defaultPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ namespace Studio.UI
|
|||||||
public Button Button_Close;
|
public Button Button_Close;
|
||||||
|
|
||||||
public Action onClickOpen;
|
public Action onClickOpen;
|
||||||
private string defaultPath = $"C:\\Users\\{Environment.UserName}";
|
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
@@ -28,7 +27,7 @@ namespace Studio.UI
|
|||||||
}
|
}
|
||||||
private void OnClickFileExplorer()
|
private void OnClickFileExplorer()
|
||||||
{
|
{
|
||||||
var paths = StandaloneFileBrowser.OpenFilePanel("Select Project", defaultPath, "ocs", false);
|
var paths = StandaloneFileBrowser.OpenFilePanel("Select Project", "", "ocs", false);
|
||||||
|
|
||||||
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
if (paths.Count > 0 && !string.IsNullOrEmpty(paths[0].Name))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ MonoBehaviour:
|
|||||||
m_OverrideGlobalSceneList: 1
|
m_OverrideGlobalSceneList: 1
|
||||||
m_Scenes:
|
m_Scenes:
|
||||||
- m_enabled: 1
|
- m_enabled: 1
|
||||||
m_path: Assets/Scenes/New Scene.unity
|
m_path: Assets/Scenes/pre-0.24.0.unity
|
||||||
m_ScriptingDefines: []
|
m_ScriptingDefines: []
|
||||||
m_PlayerSettingsYaml:
|
m_PlayerSettingsYaml:
|
||||||
m_Settings:
|
m_Settings:
|
||||||
|
|||||||
@@ -56,7 +56,17 @@ MonoBehaviour:
|
|||||||
- rid: 4833515143083327508
|
- rid: 4833515143083327508
|
||||||
- rid: 2393467941640208635
|
- rid: 2393467941640208635
|
||||||
m_RuntimeSettings:
|
m_RuntimeSettings:
|
||||||
m_List: []
|
m_List:
|
||||||
|
- rid: 4833515143083327490
|
||||||
|
- rid: 4833515143083327492
|
||||||
|
- rid: 4833515143083327494
|
||||||
|
- rid: 4833515143083327495
|
||||||
|
- rid: 4833515143083327496
|
||||||
|
- rid: 4833515143083327497
|
||||||
|
- rid: 4833515143083327499
|
||||||
|
- rid: 4833515143083327501
|
||||||
|
- rid: 4833515143083327505
|
||||||
|
- rid: 4833515143083327508
|
||||||
m_AssetVersion: 8
|
m_AssetVersion: 8
|
||||||
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
||||||
m_RenderingLayerNames:
|
m_RenderingLayerNames:
|
||||||
|
|||||||
Reference in New Issue
Block a user