diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index 23e17fc..e94da31 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -48,6 +48,7 @@ + diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 06d6dd6..af65fe2 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -48,6 +48,7 @@ + @@ -57,9 +58,14 @@ + + + + + /home/pascal/Unity/Hub/Editor/6000.2.13f1/Editor/Data/Managed/UnityEngine/UnityEngine.dll diff --git a/Assets/NanoBrain/Editor/NanoBrain_Editor.cs b/Assets/NanoBrain/Editor/NanoBrain_Editor.cs index 58e4ff5..79fed6a 100644 --- a/Assets/NanoBrain/Editor/NanoBrain_Editor.cs +++ b/Assets/NanoBrain/Editor/NanoBrain_Editor.cs @@ -13,6 +13,15 @@ public class NanoBrain_Editor : Editor { #region Start private void OnEnable() { + // NanoBrain brain = target as NanoBrain; + // if (brain == null) + // return; + + // if (brain.rootNucleus == null) { + // brain.rootNucleus = CreateInstance(); + // EditorUtility.SetDirty(brain.rootNucleus); + // } + SelectNeuron(); } @@ -44,7 +53,6 @@ public class NanoBrain_Editor : Editor { DrawGraph(); - //DrawDefaultInspector(); EditorGUILayout.TextField("Name", currentNucleus.name); EditorGUILayout.Vector3Field("Output Value", currentNucleus.outputValue); if (currentNucleus.synapses.Count > 0) { @@ -62,6 +70,7 @@ public class NanoBrain_Editor : Editor { } EditorGUI.indentLevel--; } + DrawDefaultInspector(); } private void BuildLayers() { diff --git a/Assets/NanoBrain/Editor/NeuroidWindow.cs b/Assets/NanoBrain/Editor/NeuroidWindow.cs index 248e0e4..a725c97 100644 --- a/Assets/NanoBrain/Editor/NeuroidWindow.cs +++ b/Assets/NanoBrain/Editor/NeuroidWindow.cs @@ -40,7 +40,7 @@ public class GraphEditorWindow : EditorWindow { return; NeuroidLayer currentLayer = new() { ix = layerIx }; - foreach (Neuroid outputNeuroid in selectedNucleus.receivers) { + foreach (Nucleus outputNeuroid in selectedNucleus.receivers) { if (outputNeuroid != null) { AddToLayer(currentLayer, outputNeuroid); Debug.Log($"layer {layerIx} nucleus {outputNeuroid.name}"); diff --git a/Assets/NanoBrain/NanoBrain.cs b/Assets/NanoBrain/NanoBrain.cs index 437f0b2..a8e557b 100644 --- a/Assets/NanoBrain/NanoBrain.cs +++ b/Assets/NanoBrain/NanoBrain.cs @@ -2,6 +2,9 @@ using System.Collections.Generic; using UnityEngine; public class NanoBrain : MonoBehaviour { + +// public NucleusObj rootNucleus; + public List neuroids = new(); public Neuroid AddNeuron(string name) { diff --git a/Assets/NanoBrain/Neuroid.cs b/Assets/NanoBrain/Neuroid.cs index 7e03903..33bb553 100644 --- a/Assets/NanoBrain/Neuroid.cs +++ b/Assets/NanoBrain/Neuroid.cs @@ -13,6 +13,14 @@ public class Neuroid : Nucleus { Debug.LogError("No neuroid network"); } + public Neuroid(NanoBrainObj brain, string name) : base(name) { + this.newBrain = brain; + if (this.newBrain != null) + this.newBrain.neuroids.Add(this); + else + Debug.LogError("No neuroid network"); + } + public void SetWeight(Neuroid input, float weight) { this.synapses[input] = weight; } diff --git a/Assets/NanoBrain/Nucleus.cs b/Assets/NanoBrain/Nucleus.cs index ce38a1d..e5646e7 100644 --- a/Assets/NanoBrain/Nucleus.cs +++ b/Assets/NanoBrain/Nucleus.cs @@ -5,11 +5,12 @@ public class Nucleus { public int stale = 0; public NanoBrain brain { get; protected set; } + public NanoBrainObj newBrain { get; protected set; } public virtual string name { get; set; } public readonly Dictionary synapses = new(); - public HashSet receivers = new(); + public HashSet receivers = new(); public virtual Vector3 outputValue { get; set; } public int layerIx; @@ -18,7 +19,7 @@ public class Nucleus { this.name = name; } - public virtual void AddReceiver(Neuroid receiver) { + public virtual void AddReceiver(Nucleus receiver) { //Debug.Log($"add receiver to {this} for {receiver} {receiver.GetHashCode()} {this.receivers.Count} {receiver.synapses.Count}"); this.receivers.Add(receiver); receiver.synapses[this] = 1.0f; // new(this); diff --git a/Assets/_Recovery.meta b/Assets/NanoBrain/VisualEditor.meta similarity index 77% rename from Assets/_Recovery.meta rename to Assets/NanoBrain/VisualEditor.meta index 8077f23..d012778 100644 --- a/Assets/_Recovery.meta +++ b/Assets/NanoBrain/VisualEditor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 895037c7e323e03ada7f43d011f1390b +guid: 62a58c801eda0c9eab7a49fb1d0840cb folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/_Recovery/0.unity.meta b/Assets/NanoBrain/VisualEditor/Editor.meta similarity index 67% rename from Assets/_Recovery/0.unity.meta rename to Assets/NanoBrain/VisualEditor/Editor.meta index 8162e27..c068f8e 100644 --- a/Assets/_Recovery/0.unity.meta +++ b/Assets/NanoBrain/VisualEditor/Editor.meta @@ -1,5 +1,6 @@ fileFormatVersion: 2 -guid: e5398245724c5668992c64c27db35040 +guid: e47ea55fc051fcdcb8ae6197d1105cc0 +folderAsset: yes DefaultImporter: externalObjects: {} userData: diff --git a/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs b/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs new file mode 100644 index 0000000..c496504 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs @@ -0,0 +1,477 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using System.Linq; +using System.Collections.Generic; + +public class NucleusLayer { + public int ix = 0; + public List neuroids = new(); +} + +public class NanoBrainEditor : EditorWindow { + public static NanoBrainObj brain; + + public static VisualElement inspectorContainer; + + [MenuItem("Window/NanoBrain Editor")] + public static void ShowWindow() { + GetWindow("NanoBrain Editor"); + } + + GraphBoardView board; + + private void OnEnable() { + if (brain == null) { + brain = CreateInstance(); + EditorUtility.SetDirty(brain); + } + + VisualElement root = rootVisualElement; + root.styleSheets.Add(Resources.Load("GraphStyles")); + + root.Add(board); + root.Add(inspectorContainer); + + VisualElement main = new() { + name = "main", + style = { + flexDirection = FlexDirection.Row, + flexGrow = 1 + } + }; + board = new GraphBoardView(); + board.style.flexGrow = 1; + inspectorContainer = new VisualElement { + name = "inspector", + style = { + width = 400 + } + }; + + main.Add(board); + main.Add(inspectorContainer); + root.Add(main); + + board.SetGraph(brain.rootNucleus); + } +} + +public class GraphBoardView : VisualElement { + Nucleus currentNucleus; + private List layers = new(); + private Dictionary neuroidPositions = new(); + + Vector2 pan = Vector2.zero; + //float zoom = 1f; + bool draggingCanvas = false; + Vector2 lastMouse; + GraphNodeWrapper currentWrapper; + + public GraphBoardView() { + name = "content"; + style.flexGrow = 1; + + IMGUIContainer imguiContainer = new(OnIMGUI); + imguiContainer.style.position = Position.Absolute; + imguiContainer.style.left = 0; imguiContainer.style.top = 0; + imguiContainer.style.right = 0; imguiContainer.style.bottom = 0; + imguiContainer.pickingMode = PickingMode.Position; + imguiContainer.focusable = true; + Add(imguiContainer); + + //RegisterCallback(OnWheel); + RegisterCallback(OnMouseDown); + RegisterCallback(OnMouseMove); + RegisterCallback(OnMouseUp); + } + + public void SetGraph(Nucleus nucleus) { + this.currentNucleus = nucleus; + Rebuild(); + } + + void Rebuild() { + BuildLayers(); + + if (currentNucleus == null) { + NanoBrainEditor.inspectorContainer.Clear(); + return; + } + + if (currentWrapper != null) + Object.DestroyImmediate(currentWrapper); + currentWrapper = ScriptableObject.CreateInstance().Init(currentNucleus, NanoBrainEditor.brain); + DrawInspector(); + } + + private void BuildLayers() { + // A temporary list to track what's been added to layers + this.layers = new(); + int layerIx = 0; + + Nucleus selectedNucleus = this.currentNucleus; + if (selectedNucleus == null) + return; + NeuroidLayer currentLayer = new() { ix = layerIx }; + + foreach (Nucleus outputNeuroid in selectedNucleus.receivers) { + if (outputNeuroid != null) { + AddToLayer(currentLayer, outputNeuroid); + // Debug.Log($"layer {layerIx} nucleus {outputNeuroid.name}"); + } + } + if (currentLayer.neuroids.Count > 0) { + this.layers.Add(currentLayer); + layerIx++; + currentLayer = new() { ix = layerIx }; + } + + AddToLayer(currentLayer, selectedNucleus); + this.layers.Add(currentLayer); + // Debug.Log($"layer {layerIx} nucleus {selectedNucleus.name}"); + + layerIx++; + currentLayer = new() { ix = layerIx }; + + foreach (Nucleus input in selectedNucleus.synapses.Keys) { + AddToLayer(currentLayer, input); + // Debug.Log($"layer {layerIx} nucleus {input.name}"); + } + if (currentLayer.neuroids.Count > 0) { + this.layers.Add(currentLayer); + } + } + + private void AddToLayer(NeuroidLayer layer, Nucleus nucleus) { + layer.neuroids.Add(nucleus); + nucleus.layerIx = layer.ix; + // Store its position + Vector2Int neuroidPosition = new(layer.ix, layer.neuroids.Count - 1); + neuroidPositions[nucleus] = neuroidPosition; + + } + + // basic pan/zoom handling + // void OnWheel(WheelEvent e) { + // if (e.ctrlKey) { + // float delta = -e.delta.y * 0.001f; + // zoom = Mathf.Clamp(zoom + delta, 0.25f, 2f); + // content.transform.rotation = Quaternion.identity; // keep transform accessible + // content.transform.scale = new Vector3(zoom, zoom, 1); + // e.StopPropagation(); + // } + // else { + // pan += e.delta; + // content.style.left = pan.x; + // content.style.top = pan.y; + // } + // } + + void OnMouseDown(MouseDownEvent e) { + if (e.button == 2) { draggingCanvas = true; lastMouse = e.mousePosition; e.StopPropagation(); } + } + void OnMouseMove(MouseMoveEvent e) { + if (draggingCanvas) { + var delta = e.mousePosition - lastMouse; + pan += delta; + //content.style.left = pan.x; + //content.style.top = pan.y; + lastMouse = e.mousePosition; + } + } + void OnMouseUp(MouseUpEvent e) { if (e.button == 2) draggingCanvas = false; } + + void OnIMGUI() { + if (currentNucleus == null) + return; + + Handles.BeginGUI(); + foreach (NeuroidLayer layer in layers) + DrawLayer(layer); + Handles.EndGUI(); + } + + private void DrawLayer(NeuroidLayer layer) { + int nodeCount = layer.neuroids.Count; + float maxValue = 0; + foreach (Nucleus nucleus in layer.neuroids) { + if (nucleus is Neuroid neuroid) { + float value = neuroid.outputValue.magnitude; + if (value > maxValue) + maxValue = value; + } + } + float spacing = 400f / nodeCount; + float margin = 10 + spacing / 2; + foreach (Nucleus layerNucleus in layer.neuroids) { + Vector2Int layerNeuroidPos = this.neuroidPositions[layerNucleus]; + Vector3 parentPos = new(100 + layerNeuroidPos.x * 100, margin + layerNeuroidPos.y * spacing, 0.1f); + + //int i = 0; + float inputSpacing = 400f / layerNucleus.synapses.Count; + float inputMargin = 10 + inputSpacing / 2; + int minStale = 10000; + foreach ((Nucleus nucleus, float weight) in layerNucleus.synapses) { + if (this.neuroidPositions.ContainsKey(nucleus)) { + Vector2Int inputNeuroidPos = this.neuroidPositions[nucleus]; + if (inputNeuroidPos.x == layerNeuroidPos.x + 1) { + Vector3 pos = new(100 + inputNeuroidPos.x * 100, inputMargin + inputNeuroidPos.y * inputSpacing, 0.0f); + + float brightness = weight / 10.0f; + Handles.color = new Color(brightness, brightness, brightness); + Handles.DrawLine(parentPos, pos); + } + } + if (nucleus is Neuroid neuroid && neuroid.stale < minStale) + minStale = neuroid.stale; + } + + if (layerNucleus.synapses.Count > 0 && minStale > 2 && layerNucleus.stale < 3) + Debug.LogWarning($"Strange {minStale} is big duing update"); + + + float size = 20; + if (layerNucleus.isSleeping) + Handles.color = Color.darkRed; + else { + float brightness = layerNucleus.outputValue.magnitude / maxValue; + Handles.color = new Color(brightness, brightness, brightness); + } + Handles.DrawSolidDisc(parentPos, Vector3.forward, size); + Vector3 labelPos = parentPos - Vector3.down * (size + 0.2f); // below disc along up axis + GUIStyle style = new GUIStyle(EditorStyles.label) { + alignment = TextAnchor.UpperCenter, + normal = { textColor = Color.white }, + fontStyle = FontStyle.Bold + }; + Handles.Label(labelPos, layerNucleus.name, style); + + Rect neuronRect = new(parentPos.x - size, parentPos.y - size, size * 2, size * 2); + int id = GUIUtility.GetControlID(FocusType.Passive); + Event e = Event.current; + EventType et = e.GetTypeForControl(id); + if (e != null && neuronRect.Contains(e.mousePosition)) { + // Process Hover + HandleMouseHover(layerNucleus, neuronRect); + // Process click + Debug.Log($"{et} {e.type}"); + if (e.type == EventType.MouseDown && e.button == 0) { + // Consume the event so the scene doesn't also handle it + e.Use(); + HandleDiscClicked(layerNucleus); + } + } + } + } + + private void HandleMouseHover(Nucleus neuroid, Rect rect) { + GUIContent tooltip; + if (neuroid is SensoryNeuroid sensoryNeuroid) { + tooltip = new( + $"{sensoryNeuroid.name}" + + $"\nThing {sensoryNeuroid.receptor.thingId}" + + $"\nValue: {neuroid.outputValue}" + + $"\nStale: {neuroid.stale}"); + } + else { + tooltip = new( + $"{neuroid.name}" + + $"\nsynapse count {neuroid.synapses.Count}" + + $"\nValue: {neuroid.outputValue}" + + $"\nStale: {neuroid.stale}"); + } + + Vector2 mousePosition = Event.current.mousePosition; + + // Display tooltip with some offset + Vector2 tooltipSize = GUI.skin.box.CalcSize(tooltip); + Rect tooltipRect = new Rect(mousePosition.x + 10, mousePosition.y + 10, tooltipSize.x, tooltipSize.y); + + GUI.Box(tooltipRect, tooltip); + } + + private void HandleDiscClicked(Nucleus nucleus) { + this.currentNucleus = nucleus; + BuildLayers(); + } + + + void DrawInspector() { + NanoBrainEditor.inspectorContainer.Clear(); + if (this.currentNucleus == null) + return; + + // create a SerializedObject wrapper so Unity inspector controls work (and Undo) + SerializedObject so = new SerializedObject(currentWrapper); + IMGUIContainer container = new IMGUIContainer(() => { + so.Update(); + currentNucleus.name = EditorGUILayout.TextField(currentNucleus.name); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Output Value", GUILayout.Width(100)); + EditorGUILayout.Vector3Field(GUIContent.none, currentNucleus.outputValue); + EditorGUILayout.EndHorizontal(); + if (currentNucleus.synapses.Count > 0) { + EditorGUILayout.LabelField("Synapses"); + EditorGUI.indentLevel++; + + List nuclei = currentNucleus.synapses.Keys.ToList(); + foreach (Nucleus nucleus in nuclei) { + EditorGUI.BeginDisabledGroup(nucleus.isSleeping); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(nucleus.name, GUILayout.Width(120)); + EditorGUI.indentLevel--; + EditorGUILayout.LabelField("Weight", GUILayout.Width(45)); + float weight = currentNucleus.synapses[nucleus]; + currentNucleus.synapses[nucleus] = EditorGUILayout.FloatField(weight, GUILayout.Width(40)); + EditorGUI.indentLevel++; + EditorGUILayout.Vector3Field(GUIContent.none, nucleus.outputValue, GUILayout.Width(180)); + EditorGUILayout.EndHorizontal(); + + EditorGUI.EndDisabledGroup(); + } + EditorGUI.indentLevel--; + } + if (GUILayout.Button("Add Neuron")) + AddInputNeuron(currentNucleus); + + }); + NanoBrainEditor.inspectorContainer.Add(container); + } + + protected virtual void AddInputNeuron(Nucleus receiver) { + Neuroid newNeuroid = new(NanoBrainEditor.brain, "New neuron"); + newNeuroid.AddReceiver(receiver); + Rebuild(); + } + + private Vector3 NodePosition(Nucleus nucleus, int layerNodeCount = 1) { + if (this.neuroidPositions.ContainsKey(nucleus)) { + Vector2Int nucleusPos = this.neuroidPositions[nucleus]; + return NodePosition(nucleusPos, layerNodeCount); + } + else { + return Vector3.zero; + } + } + private Vector3 NodePosition(Vector2Int location, int layerNodeCount = 1) { + float spacing = 400f / layerNodeCount; + float margin = 10 + spacing / 2; + float size = 20; + Vector3 parentPos = new(100 + location.x * 100 - size, margin + location.y * spacing - size, 0.1f); + return parentPos; + } + + // helper to save node position back to graph + // public void UpdateNodePosition(NucleusObj node, Vector2 worldPos) { + // Undo.RecordObject(graph, "Move Node"); + // node.position = (worldPos - pan) / zoom; + // EditorUtility.SetDirty(graph); + // } + + // create & delete APIs called by NodeView or toolbar + public void CreateNode(Vector2 worldPos) { + // Undo.RecordObject(graph, "Create Node"); + // var n = new NucleusObj("New Node"); //, position = (worldPos - pan) / zoom }; + // graph.nodes.Add(n); + // EditorUtility.SetDirty(graph); + // Rebuild(); + } + + // public void CreateEdge(string fromId, string toId) { + // if (fromId == toId) return; + // Undo.RecordObject(graph, "Create Edge"); + // graph.edges.Add(new GraphEdge { fromNodeId = fromId, toNodeId = toId }); + // EditorUtility.SetDirty(graph); + // Rebuild(); + // } +} + +/* +public class NodeView : VisualElement { + Nucleus data; + GraphBoardView board; + Label titleLabel; + //bool dragging = false; + Vector2 localDragStart; + + public NodeView(Nucleus node, GraphBoardView boardView) { + data = node; + board = boardView; + name = "node"; + style.width = 20; //node.size.x; + style.height = 20; //node.size.y; + + titleLabel = new Label(node.name) { name = "title" }; + Add(titleLabel); + + // ports + // var outPort = new Button(() => StartEdgeDrag(true)) { text = "◀", name = "out" }; + // var inPort = new Button(() => StartEdgeDrag(false)) { text = "▶", name = "in" }; + // Add(outPort); + // Add(inPort); + + RegisterCallback(OnMouseDown); + // RegisterCallback(OnMouseMove); + RegisterCallback(OnMouseUp); + //RegisterCallback(e => dragging = false); + } + + // void StartEdgeDrag(bool isOutput) { + // // simplified: on first click store source; on second click on target port call board.CreateEdge + // if (EdgeDragState.active == null) EdgeDragState.active = new EdgeDragState { fromNode = data, fromIsOutput = isOutput }; + // else { + // var src = EdgeDragState.active.fromNode; + // if (src != null && src.id != data.id) board.CreateEdge(src.id, data.id); + // EdgeDragState.active = null; + // } + // } + + void OnMouseDown(MouseDownEvent e) { + if (e.button == 0 && e.target == this) { + //dragging = true; + localDragStart = e.mousePosition; + e.StopPropagation(); + } + } + // void OnMouseMove(MouseMoveEvent e) { + // if (!dragging) return; + // var delta = e.mousePosition - localDragStart; + // var worldPos = new Vector2(layout.x + delta.x, layout.y + delta.y); + // style.left = worldPos.x; + // style.top = worldPos.y; + // // commit on every move + // board.UpdateNodePosition(data, worldPos); + // } + void OnMouseUp(MouseUpEvent e) { + //dragging = false; + } +} +*/ + +public class GraphNodeWrapper : ScriptableObject { + // expose fields that map to GraphNode + public string title; + public Vector2 position; + Nucleus node; + NanoBrainObj graph; // needed to write back and mark dirty + + public GraphNodeWrapper Init(Nucleus node, NanoBrainObj graphAsset) { + this.node = node; + this.graph = graphAsset; + this.title = " A " + node.name; + //position = node.position; + return this; + } + void OnValidate() { + if (node != null) { + node.name = title; + //node.position = position; +#if UNITY_EDITOR + UnityEditor.EditorUtility.SetDirty(graph); +#endif + } + } +} +//static class EdgeDragState { public static EdgeDragState active; public GraphNode fromNode; public bool fromIsOutput; } \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs.meta b/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs.meta new file mode 100644 index 0000000..99dedcd --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/Editor/NanoBrainEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c57f78e25f0e55b96a50fd5592b26317 \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs b/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs new file mode 100644 index 0000000..751854b --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using UnityEngine; + +public class NanoBrainObj : ScriptableObject { + public Nucleus rootNucleus = new("root"); + + public List neuroids = new(); + + public Neuroid AddNeuron(string name) { + Neuroid neuroid = new(this, name); + return neuroid; + } + + public void UpdateNeurons() { + foreach (Neuroid neuroid in neuroids) { + neuroid.stale++; + if (neuroid.isSleeping) + neuroid.outputValue = Vector3.zero; + } + } + +} \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs.meta b/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs.meta new file mode 100644 index 0000000..40e85f2 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/NanoBrainObj.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 36081359186edfec998d891a1feeb17b \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/NeuroidObject.cs b/Assets/NanoBrain/VisualEditor/NeuroidObject.cs new file mode 100644 index 0000000..e69de29 diff --git a/Assets/NanoBrain/VisualEditor/NeuroidObject.cs.meta b/Assets/NanoBrain/VisualEditor/NeuroidObject.cs.meta new file mode 100644 index 0000000..8d0614f --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/NeuroidObject.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d14e756f390f41a1c9923a0015329389 \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/NucleusObject.cs b/Assets/NanoBrain/VisualEditor/NucleusObject.cs new file mode 100644 index 0000000..989f603 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/NucleusObject.cs @@ -0,0 +1,28 @@ +// using System.Collections.Generic; +// using UnityEngine; + +// public class NucleusObj : ScriptableObject { +// public virtual string objName { get; set; } + +// public readonly Dictionary synapses = new(); +// public HashSet receivers = new(); +// public virtual Vector3 outputValue { get; set; } + +// public int stale = 0; + +// public NucleusObj(string name) { +// this.objName = name; +// } + +// public virtual void AddReceiver(NucleusObj receiver) { +// this.receivers.Add(receiver); +// receiver.synapses[this] = 1.0f; +// } + +// public bool isSleeping { +// get { +// return this.stale > 2; +// } +// } + +// } \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/NucleusObject.cs.meta b/Assets/NanoBrain/VisualEditor/NucleusObject.cs.meta new file mode 100644 index 0000000..e867330 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/NucleusObject.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ca2a41cdae50b5005b5cf10cebb28de6 \ No newline at end of file diff --git a/Assets/NanoBrain/VisualEditor/Resources.meta b/Assets/NanoBrain/VisualEditor/Resources.meta new file mode 100644 index 0000000..e9c19e4 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b61a93fc9332d2adae74fe4abe92d53 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss b/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss new file mode 100644 index 0000000..d059194 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss @@ -0,0 +1,15 @@ +#main { + +} +#content { + background-color: #2b2b2b, + position: absolute; +} +#inspector { + border-left-width: 1px; + border-left-color: #000; + border-left_style: solid; + padding: 3px; +} +.node { background-color: #222; border-radius:4px; padding:6px; } +#title { unity-font-style: bold; color: white; } diff --git a/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss.meta b/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss.meta new file mode 100644 index 0000000..2546c45 --- /dev/null +++ b/Assets/NanoBrain/VisualEditor/Resources/GraphStyles.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 28268b644fa8f3948851b25e41f5b03b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/Assets/Scenes/Boids/Scripts/RoamingNucleus.cs b/Assets/Scenes/Boids/Scripts/RoamingNucleus.cs index 7fbb301..f8a119d 100644 --- a/Assets/Scenes/Boids/Scripts/RoamingNucleus.cs +++ b/Assets/Scenes/Boids/Scripts/RoamingNucleus.cs @@ -11,7 +11,7 @@ public class Roaming : Nucleus { output.GetInputFrom(avoidance, -sc.avoidanceForce); } - public override void AddReceiver(Neuroid receiver) { + public override void AddReceiver(Nucleus receiver) { output.AddReceiver(receiver); } } \ No newline at end of file diff --git a/Assets/Scenes/Boids/Scripts/SwarmingNucleus.cs b/Assets/Scenes/Boids/Scripts/SwarmingNucleus.cs index 580761f..64f675f 100644 --- a/Assets/Scenes/Boids/Scripts/SwarmingNucleus.cs +++ b/Assets/Scenes/Boids/Scripts/SwarmingNucleus.cs @@ -30,7 +30,7 @@ public class Swarming : Nucleus { this.output.GetInputFrom(boundary, -sc.avoidanceForce); } - public override void AddReceiver(Neuroid receiver) { + public override void AddReceiver(Nucleus receiver) { this.output.AddReceiver(receiver); } } \ No newline at end of file diff --git a/Assets/_Recovery/0.unity b/Assets/_Recovery/0.unity deleted file mode 100644 index d2192f7..0000000 --- a/Assets/_Recovery/0.unity +++ /dev/null @@ -1,1123 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 1 - m_PVRFilteringGaussRadiusAO: 1 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &231291185 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 231291186} - - component: {fileID: 231291189} - - component: {fileID: 231291188} - - component: {fileID: 231291187} - m_Layer: 0 - m_Name: Wall (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &231291186 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 231291185} - serializedVersion: 2 - m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5} - m_LocalPosition: {x: -5, y: 5, z: 0} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0} ---- !u!65 &231291187 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 231291185} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &231291188 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 231291185} - m_Enabled: 0 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &231291189 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 231291185} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &246180153 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 246180154} - - component: {fileID: 246180157} - - component: {fileID: 246180156} - - component: {fileID: 246180155} - m_Layer: 0 - m_Name: Wall (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &246180154 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 246180153} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.7071068, z: -0.7071068, w: 0} - m_LocalPosition: {x: 0, y: 5, z: 5} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 90, y: 180, z: 0} ---- !u!65 &246180155 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 246180153} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &246180156 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 246180153} - m_Enabled: 0 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &246180157 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 246180153} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &301943977 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 301943980} - - component: {fileID: 301943979} - - component: {fileID: 301943978} - m_Layer: 0 - m_Name: Swarm - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &301943978 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 301943977} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0464906885ae3494f8fd0314719fb2db, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::SwarmControl - speed: 0.5 - inertia: 0.1 - alignmentForce: 1 - cohesionForce: 10 - separationForce: 5 - separationDistance: 0.5 - bodyForce: 20 - boundaryForce: 5 - spaceSize: {x: 10, y: 10, z: 10} - boundaryWidth: {x: 1, y: 1, z: 1} ---- !u!114 &301943979 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 301943977} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ec888ca5333d45a438f9f417fa5ce135, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::SwarmSpawn - count: 10 - boidPrefab: {fileID: 8702527964058765413, guid: f9c706268554ce449a8773675b2864b8, type: 3} - spawnAreaSize: {x: 0.5, y: 0.5, z: 0.5} - minDelay: 0.1 - maxDelay: 1 ---- !u!4 &301943980 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 301943977} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &704151342 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 704151343} - - component: {fileID: 704151346} - - component: {fileID: 704151345} - - component: {fileID: 704151344} - m_Layer: 0 - m_Name: Ceiling - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &704151343 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 704151342} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 10, z: 0} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &704151344 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 704151342} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &704151345 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 704151342} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &704151346 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 704151342} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &837238090 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 837238092} - - component: {fileID: 837238091} - - component: {fileID: 837238093} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &837238091 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 837238090} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &837238092 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 837238090} - serializedVersion: 2 - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!114 &837238093 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 837238090} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!1 &1633626499 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1633626502} - - component: {fileID: 1633626501} - - component: {fileID: 1633626500} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1633626500 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633626499} - m_Enabled: 1 ---- !u!20 &1633626501 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633626499} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1633626502 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633626499} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1690670936 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1690670937} - - component: {fileID: 1690670940} - - component: {fileID: 1690670939} - - component: {fileID: 1690670938} - m_Layer: 0 - m_Name: Floor - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1690670937 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690670936} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1690670938 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690670936} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1690670939 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690670936} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1690670940 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1690670936} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1738679977 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1738679978} - - component: {fileID: 1738679981} - - component: {fileID: 1738679980} - - component: {fileID: 1738679979} - m_Layer: 0 - m_Name: Wall - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1738679978 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1738679977} - serializedVersion: 2 - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 5, z: -5} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!65 &1738679979 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1738679977} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1738679980 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1738679977} - m_Enabled: 0 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1738679981 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1738679977} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1826482026 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1826482027} - m_Layer: 0 - m_Name: Boundary - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1826482027 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1826482026} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0, y: -5, z: -0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1690670937} - - {fileID: 1738679978} - - {fileID: 231291186} - - {fileID: 246180154} - - {fileID: 1924016461} - - {fileID: 704151343} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1924016460 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1924016461} - - component: {fileID: 1924016464} - - component: {fileID: 1924016463} - - component: {fileID: 1924016462} - m_Layer: 0 - m_Name: Wall (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1924016461 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1924016460} - serializedVersion: 2 - m_LocalRotation: {x: -0.5, y: 0.5, z: -0.5, w: -0.5} - m_LocalPosition: {x: 5, y: 5, z: 0} - m_LocalScale: {x: 10, y: 1, z: 10} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1826482027} - m_LocalEulerAnglesHint: {x: 90, y: 270, z: 0} ---- !u!65 &1924016462 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1924016460} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1924016463 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1924016460} - m_Enabled: 0 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1924016464 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1924016460} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1633626502} - - {fileID: 837238092} - - {fileID: 301943980} - - {fileID: 1826482027} diff --git a/NanoBrain-Unity.slnx b/NanoBrain-Unity.slnx index 90452ad..398dc64 100644 --- a/NanoBrain-Unity.slnx +++ b/NanoBrain-Unity.slnx @@ -1,4 +1,4 @@  - +