1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-02-09 16:48:43 +08:00

Removed references to previous project name

This commit is contained in:
Thor Brigsted 2017-12-31 01:22:18 +01:00
parent 83b8a693e3
commit 5f900c0b14
4 changed files with 18 additions and 18 deletions

View File

@ -9,7 +9,7 @@ namespace BasicNodes {
// The value of an output node field is not used for anything, but could be used for caching output results // The value of an output node field is not used for anything, but could be used for caching output results
[Output] public float result; [Output] public float result;
// UNEC will display this as an editable field - just like the normal inspector would // Will be displayed as an editable field - just like the normal inspector
public MathType mathType = MathType.Add; public MathType mathType = MathType.Add;
public enum MathType { Add, Subtract, Multiply, Divide } public enum MathType { Add, Subtract, Multiply, Divide }

View File

@ -4,7 +4,7 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
namespace XNodeEditor { namespace XNodeEditor {
/// <summary> UNEC-specific version of <see cref="EditorGUILayout"/> </summary> /// <summary> xNode-specific version of <see cref="EditorGUILayout"/> </summary>
public static class NodeEditorGUILayout { public static class NodeEditorGUILayout {
/// <summary> Make a field for a serialized property. Automatically displays relevant node port. </summary> /// <summary> Make a field for a serialized property. Automatically displays relevant node port. </summary>

View File

@ -114,8 +114,8 @@ namespace XNodeEditor {
//Load type colors //Load type colors
generatedTypeColors = new Dictionary<string, Color>(); generatedTypeColors = new Dictionary<string, Color>();
if (!EditorPrefs.HasKey("unec_typecolors")) EditorPrefs.SetString("unec_typecolors", ""); if (!EditorPrefs.HasKey("xnode_typecolors")) EditorPrefs.SetString("xnode_typecolors", "");
string[] data = EditorPrefs.GetString("unec_typecolors").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string[] data = EditorPrefs.GetString("xnode_typecolors").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
typeColors = new Dictionary<string, Color>(); typeColors = new Dictionary<string, Color>();
for (int i = 0; i < data.Length; i += 2) { for (int i = 0; i < data.Length; i += 2) {
Color col; Color col;
@ -125,13 +125,13 @@ namespace XNodeEditor {
} }
//Load grid colors //Load grid colors
if (!EditorPrefs.HasKey("unec_gridcolor0")) EditorPrefs.SetString("unec_gridcolor0", ColorUtility.ToHtmlStringRGB(new Color(0.45f, 0.45f, 0.45f))); if (!EditorPrefs.HasKey("xnode_gridcolor0")) EditorPrefs.SetString("xnode_gridcolor0", ColorUtility.ToHtmlStringRGB(new Color(0.45f, 0.45f, 0.45f)));
ColorUtility.TryParseHtmlString("#" + EditorPrefs.GetString("unec_gridcolor0"), out _gridLineColor); ColorUtility.TryParseHtmlString("#" + EditorPrefs.GetString("xnode_gridcolor0"), out _gridLineColor);
if (!EditorPrefs.HasKey("unec_gridcolor1")) EditorPrefs.SetString("unec_gridcolor1", ColorUtility.ToHtmlStringRGB(new Color(0.18f, 0.18f, 0.18f))); if (!EditorPrefs.HasKey("xnode_gridcolor1")) EditorPrefs.SetString("xnode_gridcolor1", ColorUtility.ToHtmlStringRGB(new Color(0.18f, 0.18f, 0.18f)));
ColorUtility.TryParseHtmlString("#" + EditorPrefs.GetString("unec_gridcolor1"), out _gridBgColor); ColorUtility.TryParseHtmlString("#" + EditorPrefs.GetString("xnode_gridcolor1"), out _gridBgColor);
//Load snap option //Load snap option
if (EditorPrefs.HasKey("unec_gridsnap")) _gridSnap = EditorPrefs.GetBool("unec_gridsnap"); if (EditorPrefs.HasKey("xnode_gridsnap")) _gridSnap = EditorPrefs.GetBool("xnode_gridsnap");
NodeEditorWindow.RepaintAll(); NodeEditorWindow.RepaintAll();
prefsLoaded = true; prefsLoaded = true;
@ -139,9 +139,9 @@ namespace XNodeEditor {
/// <summary> Delete all prefs </summary> /// <summary> Delete all prefs </summary>
public static void ResetPrefs() { public static void ResetPrefs() {
if (EditorPrefs.HasKey("unec_typecolors")) EditorPrefs.DeleteKey("unec_typecolors"); if (EditorPrefs.HasKey("xnode_typecolors")) EditorPrefs.DeleteKey("xnode_typecolors");
if (EditorPrefs.HasKey("unec_gridcolor0")) EditorPrefs.DeleteKey("unec_gridcolor0"); if (EditorPrefs.HasKey("xnode_gridcolor0")) EditorPrefs.DeleteKey("xnode_gridcolor0");
if (EditorPrefs.HasKey("unec_gridcolor1")) EditorPrefs.DeleteKey("unec_gridcolor1"); if (EditorPrefs.HasKey("xnode_gridcolor1")) EditorPrefs.DeleteKey("xnode_gridcolor1");
LoadPrefs(); LoadPrefs();
} }
@ -150,10 +150,10 @@ namespace XNodeEditor {
foreach (var item in typeColors) { foreach (var item in typeColors) {
s += item.Key + "," + ColorUtility.ToHtmlStringRGB(item.Value) + ","; s += item.Key + "," + ColorUtility.ToHtmlStringRGB(item.Value) + ",";
} }
EditorPrefs.SetString("unec_typecolors", s); EditorPrefs.SetString("xnode_typecolors", s);
EditorPrefs.SetString("unec_gridcolor0", ColorUtility.ToHtmlStringRGB(_gridLineColor)); EditorPrefs.SetString("xnode_gridcolor0", ColorUtility.ToHtmlStringRGB(_gridLineColor));
EditorPrefs.SetString("unec_gridcolor1", ColorUtility.ToHtmlStringRGB(_gridBgColor)); EditorPrefs.SetString("xnode_gridcolor1", ColorUtility.ToHtmlStringRGB(_gridBgColor));
EditorPrefs.SetBool("unec_gridsnap", _gridSnap); EditorPrefs.SetBool("xnode_gridsnap", _gridSnap);
} }
private static void VerifyLoaded() { private static void VerifyLoaded() {

View File

@ -2,7 +2,7 @@
namespace XNodeEditor { namespace XNodeEditor {
public static class NodeEditorResources { public static class NodeEditorResources {
//Unec textures // Textures
public static Texture2D dot { get { return _dot != null ? _dot : _dot = Resources.Load<Texture2D>("xnode_dot"); } } public static Texture2D dot { get { return _dot != null ? _dot : _dot = Resources.Load<Texture2D>("xnode_dot"); } }
private static Texture2D _dot; private static Texture2D _dot;
public static Texture2D dotOuter { get { return _dotOuter != null ? _dotOuter : _dotOuter = Resources.Load<Texture2D>("xnode_dot_outer"); } } public static Texture2D dotOuter { get { return _dotOuter != null ? _dotOuter : _dotOuter = Resources.Load<Texture2D>("xnode_dot_outer"); } }
@ -10,7 +10,7 @@ namespace XNodeEditor {
public static Texture2D nodeBody { get { return _nodeBody != null ? _nodeBody : _nodeBody = Resources.Load<Texture2D>("xnode_node"); } } public static Texture2D nodeBody { get { return _nodeBody != null ? _nodeBody : _nodeBody = Resources.Load<Texture2D>("xnode_node"); } }
private static Texture2D _nodeBody; private static Texture2D _nodeBody;
//Unec styles // Styles
public static Styles styles { get { return _styles != null ? _styles : _styles = new Styles(); } } public static Styles styles { get { return _styles != null ? _styles : _styles = new Styles(); } }
public static Styles _styles = null; public static Styles _styles = null;