public void OnDisable() { EditorPrefs.SetFloat("nn_NodeSize", NeuralNetwork.Editor.nodeSize); EditorPrefs.SetFloat("nn_NodeSpace", NeuralNetwork.Editor.nodeSpacing); EditorPrefs.SetFloat("nn_LayerSpace", NeuralNetwork.Editor.layerSpacing); EditorPrefsUtil.SetColor("nn_NodeColor", NeuralNetwork.Editor.nodeColor); EditorPrefsUtil.SetGradient("nn_NodeSize", NeuralNetwork.Editor.axonGradient); }
public void OnEnable() { nn = (NeuralNetwork)target; CleanEditorUtil(nn); NeuralNetwork.Editor.nodeSize = EditorPrefs.GetFloat("nn_NodeSize", NeuralNetwork.Editor.nodeSize); NeuralNetwork.Editor.nodeSpacing = EditorPrefs.GetFloat("nn_NodeSpace", NeuralNetwork.Editor.nodeSpacing); NeuralNetwork.Editor.layerSpacing = EditorPrefs.GetFloat("nn_LayerSpace", NeuralNetwork.Editor.layerSpacing); NeuralNetwork.Editor.nodeColor = EditorPrefsUtil.GetColor("nn_NodeColor", NeuralNetwork.Editor.nodeColor); NeuralNetwork.Editor.axonGradient = EditorPrefsUtil.GetGradient("nn_NodeSize", NeuralNetwork.Editor.axonGradient); UpdateGizmoDataAndPosition(); }