test
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class EditorPreferencesProvider : Editor
|
||||
{
|
||||
[SettingsProvider]
|
||||
public static SettingsProvider CreateEditorPreferencesProvider()
|
||||
{
|
||||
return new EditorPreferencesProviderView();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba9c71f100044b3a9dca49c8f9e489cb
|
||||
timeCreated: 1625864018
|
@@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
internal class EditorPreferencesProviderView : SettingsProvider
|
||||
{
|
||||
private const string Path = "Preferences/Visual Scripting";
|
||||
private const string Title = "Visual Scripting";
|
||||
private const string ID = "Bolt";
|
||||
private readonly GUIStyle marginStyle = new GUIStyle() { margin = new RectOffset(10, 10, 10, 10) };
|
||||
|
||||
public EditorPreferencesProviderView() : base(Path, SettingsScope.User)
|
||||
{
|
||||
label = Title;
|
||||
}
|
||||
|
||||
private void EnsureConfig()
|
||||
{
|
||||
if (BoltCore.instance == null || BoltCore.Configuration == null)
|
||||
{
|
||||
PluginContainer.Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGUI(string searchContext)
|
||||
{
|
||||
EnsureConfig();
|
||||
|
||||
GUILayout.BeginVertical(marginStyle);
|
||||
|
||||
// happens when opening unity with the settings window already opened. there's a delay until the singleton is assigned
|
||||
if (BoltCore.instance == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Loading Configuration...", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
var instance = (BoltProduct)ProductContainer.GetProduct(ID);
|
||||
|
||||
instance.configurationPanel.PreferenceItem();
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7453dd8d3980405794f631eea9f420e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a06b4d04018343b99f255da7f18559d1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,80 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class AssemblyOptionsSettings
|
||||
{
|
||||
private const string CompleteLabel = "Regenerate Nodes";
|
||||
private readonly PluginConfigurationItemMetadata _assemblyOptionsMetadata;
|
||||
|
||||
private bool _showAssembly = false;
|
||||
private const string TitleAssembly = "Node Library";
|
||||
private const string DescriptionAssembly = "Choose the assemblies in which you want to look for nodes.\n"
|
||||
+ "By default, all project and Unity assemblies are included.\n"
|
||||
+ "Unless you use a third-party plugin distributed as a DLL, you shouldn't need to change this.";
|
||||
|
||||
private ProjectAssemblyOptionsListInspector _assemblyOptionsInspector;
|
||||
|
||||
public AssemblyOptionsSettings(BoltCoreConfiguration coreConfig)
|
||||
{
|
||||
_assemblyOptionsMetadata = coreConfig.GetMetadata(nameof(coreConfig.assemblyOptions));
|
||||
_assemblyOptionsInspector = new ProjectAssemblyOptionsListInspector(_assemblyOptionsMetadata);
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
public static readonly GUIStyle background;
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
public const float OptionsWidth = 250;
|
||||
|
||||
static Styles()
|
||||
{
|
||||
background = new GUIStyle(LudiqStyles.windowBackground);
|
||||
background.padding = new RectOffset(20, 20, 20, 20);
|
||||
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
_showAssembly = EditorGUILayout.Foldout(_showAssembly, new GUIContent(TitleAssembly, DescriptionAssembly));
|
||||
|
||||
if (_showAssembly)
|
||||
{
|
||||
GUILayout.BeginVertical(Styles.background, GUILayout.ExpandHeight(true));
|
||||
|
||||
var height = _assemblyOptionsInspector.GetCachedHeight(Styles.OptionsWidth, GUIContent.none, null);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var position = GUILayoutUtility.GetRect(Styles.OptionsWidth, height);
|
||||
|
||||
_assemblyOptionsInspector.Draw(position, GUIContent.none);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
_assemblyOptionsMetadata.SaveImmediately(true);
|
||||
Codebase.UpdateSettings();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Reset to Defaults", Styles.defaultsButton) && EditorUtility.DisplayDialog("Reset the Node Library", "Reset the Node Library to its default state?", "Reset to Default", "Cancel"))
|
||||
{
|
||||
_assemblyOptionsMetadata.Reset(true);
|
||||
_assemblyOptionsMetadata.SaveImmediately(true);
|
||||
}
|
||||
|
||||
LudiqGUI.EndVertical();
|
||||
}
|
||||
|
||||
if (GUILayout.Button(CompleteLabel, Styles.defaultsButton))
|
||||
{
|
||||
UnitBase.Rebuild();
|
||||
|
||||
EditorUtility.DisplayDialog("Visual Script", "Regenerate Nodes completed", "OK");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cb1615bd41a3442a8aabbcb872046a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,46 @@
|
||||
using System.Diagnostics;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class BackupSettings
|
||||
{
|
||||
private const string Title = "Backup Graphs";
|
||||
private const string ButtonBackupLabel = "Create Backup";
|
||||
private const string ButtonRestoreLabel = "Restore Backup";
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Label(Title, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
if (GUILayout.Button(ButtonBackupLabel, Styles.defaultsButton))
|
||||
{
|
||||
VSBackupUtility.Backup();
|
||||
|
||||
EditorUtility.DisplayDialog("Backup", "Backup completed successfully.", "OK");
|
||||
}
|
||||
|
||||
if (GUILayout.Button(ButtonRestoreLabel, Styles.defaultsButton))
|
||||
{
|
||||
PathUtility.CreateDirectoryIfNeeded(Paths.backups);
|
||||
Process.Start(Paths.backups);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
static Styles()
|
||||
{
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50455e66302b715488a9218e30b0ab24
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,45 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class CustomPropertyProviderSettings
|
||||
{
|
||||
private const string Title = "Custom Inspector Properties";
|
||||
private const string ButtonLabel = "Generate";
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Label(Title, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
string label = "Inspectors in Visual Scripting plugins can handle many custom types besides Unity primites and objects. ";
|
||||
label += "However, to be compatible with your custom editor drawers, some additional property provider scripts must be generated. ";
|
||||
|
||||
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
GUILayout.Label(EditorGUIUtility.IconContent("console.infoicon"), GUILayout.ExpandWidth(true));
|
||||
GUILayout.Box(label, EditorStyles.wordWrappedLabel);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
if (GUILayout.Button(ButtonLabel, Styles.defaultsButton))
|
||||
{
|
||||
SerializedPropertyProviderProvider.instance.GenerateProviderScripts();
|
||||
EditorUtility.DisplayDialog("Custom Inspector Generation", "Custom inspector generation has completed successfully.", "OK");
|
||||
}
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
static Styles()
|
||||
{
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7da9d8250917648728b856bfab5f1320
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
internal class LinkerPropertyProviderSettings
|
||||
{
|
||||
private readonly PluginConfigurationItemMetadata _linkerSettings;
|
||||
|
||||
private const string Title = "Linker generation settings";
|
||||
|
||||
private readonly GUIContent[] _toggleTargetsLabel =
|
||||
{
|
||||
new GUIContent("Scan graph assets"),
|
||||
new GUIContent("Scan scenes"),
|
||||
new GUIContent("Scan prefabs")
|
||||
};
|
||||
|
||||
private Array _options = Enum.GetValues(typeof(BoltCoreConfiguration.LinkerScanTarget));
|
||||
private List<bool> _settings;
|
||||
|
||||
public LinkerPropertyProviderSettings(BoltCoreConfiguration coreConfig)
|
||||
{
|
||||
_linkerSettings = coreConfig.GetMetadata(nameof(LinkerPropertyProviderSettings));
|
||||
|
||||
_settings = new List<bool>((List<bool>)_linkerSettings.value);
|
||||
}
|
||||
|
||||
private void SaveIfNeeded()
|
||||
{
|
||||
var settings = (List<bool>)_linkerSettings.value;
|
||||
|
||||
if (!_settings.SequenceEqual(settings))
|
||||
{
|
||||
_linkerSettings.value = new List<bool>(_settings);
|
||||
|
||||
_linkerSettings.SaveImmediately();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Label(Title, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
var label = "Scan for types to be added to link.xml";
|
||||
|
||||
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
GUILayout.Label(EditorGUIUtility.IconContent("console.infoicon"), GUILayout.ExpandWidth(true));
|
||||
GUILayout.Box(label, EditorStyles.wordWrappedLabel);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
foreach (var option in _options)
|
||||
{
|
||||
_settings[(int)option] = GUILayout.Toggle(_settings[(int)option], _toggleTargetsLabel[(int)option]);
|
||||
GUILayout.Space(5f);
|
||||
}
|
||||
|
||||
SaveIfNeeded();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2e89b748a6ae452488da87a34e25287
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,36 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class ScriptReferenceResolverSettings
|
||||
{
|
||||
private const string Title = "Script Reference Resolver";
|
||||
private const string ButtonLabel = "Fix Missing Scripts";
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Label(Title, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
if (GUILayout.Button(ButtonLabel, Styles.defaultsButton))
|
||||
{
|
||||
ScriptReferenceResolver.Run(ScriptReferenceResolver.Mode.Dialog);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
static Styles()
|
||||
{
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8c0a3364f2ef4e42820eb87b5bdab69
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,69 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class TypeOptionsSettings
|
||||
{
|
||||
private readonly PluginConfigurationItemMetadata _typeOptionsMetadata;
|
||||
|
||||
private bool _showTypeOption = false;
|
||||
private const string TitleTypeOption = "Type Options";
|
||||
private const string DescriptionTypeOption = "Choose the types you want to use for variables and nodes.\n"
|
||||
+ "MonoBehaviour types are always included.";
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
public static readonly GUIStyle background;
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
public const float OptionsWidth = 250;
|
||||
|
||||
static Styles()
|
||||
{
|
||||
background = new GUIStyle(LudiqStyles.windowBackground);
|
||||
background.padding = new RectOffset(20, 20, 20, 20);
|
||||
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
}
|
||||
|
||||
public TypeOptionsSettings(BoltCoreConfiguration coreConfig)
|
||||
{
|
||||
_typeOptionsMetadata = coreConfig.GetMetadata(nameof(coreConfig.typeOptions));
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
_showTypeOption = EditorGUILayout.Foldout(_showTypeOption, new GUIContent(TitleTypeOption, DescriptionTypeOption));
|
||||
|
||||
if (_showTypeOption)
|
||||
{
|
||||
GUILayout.BeginVertical(Styles.background, GUILayout.ExpandHeight(true));
|
||||
|
||||
float height =
|
||||
LudiqGUI.GetInspectorHeight(null, _typeOptionsMetadata, Styles.OptionsWidth, GUIContent.none);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var position = GUILayoutUtility.GetRect(Styles.OptionsWidth, height);
|
||||
|
||||
LudiqGUI.Inspector(_typeOptionsMetadata, position, GUIContent.none);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
_typeOptionsMetadata.SaveImmediately(true);
|
||||
Codebase.UpdateSettings();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Reset to Defaults", Styles.defaultsButton) && EditorUtility.DisplayDialog("Reset Included Types", "Reset the included types to their defaults?", "Reset to Default", "Cancel"))
|
||||
{
|
||||
_typeOptionsMetadata.Reset(true);
|
||||
_typeOptionsMetadata.SaveImmediately(true);
|
||||
}
|
||||
|
||||
LudiqGUI.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f061d8e7ad514436d82f47b34306a22c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,13 @@
|
||||
using UnityEditor;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
public class ProjectSettingsProvider : Editor
|
||||
{
|
||||
[SettingsProvider]
|
||||
public static SettingsProvider CreateProjectSettingProvider()
|
||||
{
|
||||
return new ProjectSettingsProviderView();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6a0cc840e6084f62a3e3538f14bf3ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,125 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Unity.VisualScripting
|
||||
{
|
||||
internal class ProjectSettingsProviderView : SettingsProvider
|
||||
{
|
||||
private const string Path = "Project/Visual Scripting";
|
||||
private const string Title = "Visual Scripting";
|
||||
private const string TitleGroup = "Generate Nodes";
|
||||
private readonly GUIStyle marginStyle = new GUIStyle() { margin = new RectOffset(10, 10, 10, 10) };
|
||||
|
||||
private AssemblyOptionsSettings _assemblyOptionsSettings;
|
||||
private TypeOptionsSettings _typeOptionsSettings;
|
||||
private CustomPropertyProviderSettings _customPropertyProviderSettings;
|
||||
private LinkerPropertyProviderSettings _linkerPropertyProviderSettings;
|
||||
private BackupSettings _backupSettings;
|
||||
private ScriptReferenceResolverSettings _scriptReferenceResolverSettings;
|
||||
|
||||
private BoltCoreConfiguration _vsCoreConfig = null;
|
||||
|
||||
public ProjectSettingsProviderView() : base(Path, SettingsScope.Project)
|
||||
{
|
||||
label = Title;
|
||||
EditorTypeUtility.Initialize();
|
||||
}
|
||||
|
||||
private void CreateOptionsIfNeeded()
|
||||
{
|
||||
_assemblyOptionsSettings ??= new AssemblyOptionsSettings(_vsCoreConfig);
|
||||
_typeOptionsSettings ??= new TypeOptionsSettings(_vsCoreConfig);
|
||||
_customPropertyProviderSettings ??= new CustomPropertyProviderSettings();
|
||||
_linkerPropertyProviderSettings ??= new LinkerPropertyProviderSettings(_vsCoreConfig);
|
||||
_backupSettings ??= new BackupSettings();
|
||||
_scriptReferenceResolverSettings ??= new ScriptReferenceResolverSettings();
|
||||
}
|
||||
|
||||
private void EnsureConfig()
|
||||
{
|
||||
if (_vsCoreConfig != null)
|
||||
return;
|
||||
|
||||
if (BoltCore.instance == null || BoltCore.Configuration == null)
|
||||
{
|
||||
UnityAPI.Initialize();
|
||||
PluginContainer.Initialize();
|
||||
}
|
||||
|
||||
_vsCoreConfig = BoltCore.Configuration;
|
||||
}
|
||||
|
||||
public override void OnGUI(string searchContext)
|
||||
{
|
||||
GUILayout.BeginVertical(marginStyle);
|
||||
|
||||
if (VSUsageUtility.isVisualScriptingUsed)
|
||||
{
|
||||
EnsureConfig();
|
||||
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.Label(TitleGroup, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
// happens when opening unity with the settings window already opened. there's a delay until the singleton is assigned
|
||||
if (_vsCoreConfig == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Loading Configuration...", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
CreateOptionsIfNeeded();
|
||||
|
||||
_typeOptionsSettings.OnGUI();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
_assemblyOptionsSettings.OnGUI();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
_customPropertyProviderSettings.OnGUI();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
_linkerPropertyProviderSettings.OnGUI();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
_backupSettings.OnGUI();
|
||||
|
||||
GUILayout.Space(10f);
|
||||
|
||||
_scriptReferenceResolverSettings.OnGUI();
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Space(5f);
|
||||
|
||||
GUILayout.BeginHorizontal(EditorStyles.label);
|
||||
if (GUILayout.Button("Initialize Visual Scripting", Styles.defaultsButton))
|
||||
{
|
||||
VSUsageUtility.isVisualScriptingUsed = true;
|
||||
}
|
||||
|
||||
GUILayout.Space(5f);
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
static Styles()
|
||||
{
|
||||
defaultsButton = new GUIStyle("Button");
|
||||
defaultsButton.padding = new RectOffset(10, 10, 4, 4);
|
||||
}
|
||||
|
||||
public static readonly GUIStyle defaultsButton;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4eea00f49056f4ee98c82b6923b44600
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Unity.VisualScripting.SettingsProvider.Editor",
|
||||
"references": [
|
||||
"Unity.VisualScripting.Core",
|
||||
"Unity.VisualScripting.Core.Editor",
|
||||
"Unity.VisualScripting.Flow",
|
||||
"Unity.VisualScripting.Flow.Editor",
|
||||
"Unity.VisualScripting.State"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2aa54ddaa48744e1caddee916e39805e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user