浏览代码

Small Fixes for Setup Wizard

/main
Thomas Iché 6 年前
当前提交
a1684111
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 4
      Editor/WelcomeScreen/WelcomeScreen.Setup.cs
  2. 10
      Editor/WelcomeScreen/WelcomeScreen.cs

4
Editor/WelcomeScreen/WelcomeScreen.Setup.cs


if (GUILayout.Button("Create GameplayIngredientsSettings Asset"))
{
bool create = true;
if(System.IO.File.Exists(Application.dataPath +"/"+ kSettingsAssetPath))
if(System.IO.File.Exists(Application.dataPath +"/../"+ kSettingsAssetPath))
{
if (!EditorUtility.DisplayDialog("GameplayIngredientsSettings Asset Overwrite", "A GameplayIngredientsSettings Asset already exists, do you want to overwrite it?", "Yes", "No"))
create = false;

{
if(!System.IO.Directory.Exists(Application.dataPath+"/Assets/Resources"))
if(!System.IO.Directory.Exists(Application.dataPath+"/Resources"))
AssetDatabase.CreateFolder("Assets", "Resources");
GameplayIngredientsSettings asset = Instantiate<GameplayIngredientsSettings>(GameplayIngredientsSettings.defaultSettings);

10
Editor/WelcomeScreen/WelcomeScreen.cs


const int WindowWidth = 640;
const int WindowHeight = 520;
static WelcomeScreen s_Instance;
static bool showOnStartup
{
get { return EditorPrefs.GetBool(kShowOnStartupPreference, true); }

[MenuItem("Window/Gameplay Ingredients")]
static void ShowFromMenu()
{
GetWindow<WelcomeScreen>(true, "Gameplay Ingredients");
s_Instance = GetWindow<WelcomeScreen>(true, "Gameplay Ingredients");
}
private void OnEnable()

wizardMode = WizardMode.FirstTimeSetup;
InitTips();
}
private void OnDisable()
{
if (s_Instance != null)
s_Instance.Close();
}
private void OnDestroy()

正在加载...
取消
保存