浏览代码
Work on Welcome Screen Wizard, Merged all configuration into GameplayIngredientSettings asset
/main
Work on Welcome Screen Wizard, Merged all configuration into GameplayIngredientSettings asset
/main
Thomas Iché
6 年前
当前提交
6e83c5e8
共有 10 个文件被更改,包括 125 次插入 和 41 次删除
-
8Editor/MenuItems.cs
-
56Editor/WelcomeScreen/WelcomeScreen.cs
-
6Runtime/LevelScripting/Callable.cs
-
11Runtime/Managers/Manager.cs
-
2Runtime/Settings/GameplayIngredientsSettings.cs.meta
-
8Runtime/Settings.meta
-
62Runtime/Settings/GameplayIngredientsSettings.cs
-
13Runtime/Managers/ManagerExclusionList.cs
-
0/Runtime/Settings/GameplayIngredientsSettings.cs.meta
|
|||
fileFormatVersion: 2 |
|||
guid: b8739a81f74937f4b815f0298618db6c |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using NaughtyAttributes; |
|||
|
|||
namespace GameplayIngredients |
|||
{ |
|||
public class GameplayIngredientsSettings : ScriptableObject |
|||
{ |
|||
public string[] excludedeManagers { get { return m_ExcludedManagers; } } |
|||
public bool verboseCalls { get { return m_VerboseCalls; } } |
|||
|
|||
[BoxGroup("Managers")] |
|||
[SerializeField, ReorderableList, TypeDropDown(typeof(Manager))] |
|||
protected string[] m_ExcludedManagers; |
|||
[BoxGroup("Callables")] |
|||
[SerializeField, InfoBox("Verbose Calls enable logging at runtime, this can lead to performance drop, use only when debugging.",InfoBoxType.Warning, "m_VerboseCalls")] |
|||
protected bool m_VerboseCalls; |
|||
|
|||
const string kAssetName = "GameplayIngredientsSettings"; |
|||
|
|||
public static GameplayIngredientsSettings currentSettings |
|||
{ |
|||
get |
|||
{ |
|||
if (hasSettingAsset) |
|||
return Resources.Load<GameplayIngredientsSettings>(kAssetName); |
|||
else |
|||
return defaultSettings; |
|||
} |
|||
} |
|||
|
|||
public static bool hasSettingAsset |
|||
{ |
|||
get |
|||
{ |
|||
return Resources.Load<GameplayIngredientsSettings>(kAssetName) != null; |
|||
} |
|||
} |
|||
|
|||
|
|||
public static GameplayIngredientsSettings defaultSettings |
|||
{ |
|||
get |
|||
{ |
|||
if (s_DefaultSettings == null) |
|||
s_DefaultSettings = CreateDefaultSettings(); |
|||
return s_DefaultSettings; |
|||
} |
|||
} |
|||
|
|||
static GameplayIngredientsSettings s_DefaultSettings; |
|||
|
|||
static GameplayIngredientsSettings CreateDefaultSettings() |
|||
{ |
|||
var defaultAsset = CreateInstance<GameplayIngredientsSettings>(); |
|||
defaultAsset.m_VerboseCalls = false; |
|||
defaultAsset.m_ExcludedManagers = new string[0]; |
|||
return defaultAsset; |
|||
} |
|||
} |
|||
} |
|
|||
using NaughtyAttributes; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace GameplayIngredients |
|||
{ |
|||
public class ManagerExclusionList : ScriptableObject |
|||
{ |
|||
[ReorderableList, TypeDropDown(typeof(Manager))] |
|||
public string[] ExcludedManagers; |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue