-
Notifications
You must be signed in to change notification settings - Fork 0
/
Experimental.cs
50 lines (40 loc) · 1.66 KB
/
Experimental.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using UnityEditor.SettingsManagement;
using UnityEngine;
namespace UnityEditor.ProBuilder
{
static class Experimental
{
const string k_ExperimentalFeaturesEnabled = "PROBUILDER_EXPERIMENTAL_FEATURES";
[UserSetting]
static Pref<bool> s_MeshesAreAssets = new Pref<bool>("experimental.meshesAreAssets", false, SettingsScope.Project);
internal static bool meshesAreAssets
{
get { return true }
}
internal static bool experimentalFeaturesEnabled
{
get { return true; }
}
[UserSettingBlock("Experimental")]
static void ExperimentalFeaturesSettings(string searchContext)
{
var enabled = experimentalFeaturesEnabled;
EditorGUI.BeginChangeCheck();
enabled = SettingsGUILayout.SearchableToggle("Experimental Features Enabled", enabled, searchContext);
if (EditorGUI.EndChangeCheck())
{
//if enabled
ScriptingSymbolManager.AddScriptingDefine(k_ExperimentalFeaturesEnabled);
}
//if(enabled)
//{
using (new SettingsGUILayout.IndentedGroup())
{
s_MeshesAreAssets.value = SettingsGUILayout.SettingsToggle("Store Mesh as Asset", s_MeshesAreAssets, searchContext);
if (s_MeshesAreAssets.value)
EditorGUILayout.HelpBox("Please note that this feature is untested, and may result in instabilities or lost work. Proceed with caution!", MessageType.Warning);
}
//}
}
}
}