Fix cluster instance count always 1
This commit is contained in:
parent
a4776f9dea
commit
95a63d9f2d
@ -184,16 +184,17 @@ namespace NanoBrain {
|
|||||||
if (synapseData.clusterName != this.name) {
|
if (synapseData.clusterName != this.name) {
|
||||||
// Add reference to external cluster
|
// Add reference to external cluster
|
||||||
// Do we know the external cluster already?
|
// Do we know the external cluster already?
|
||||||
|
ExternalClusterData externalClusterData = clusterData.GetCluster(synapseData.clusterName);
|
||||||
Cluster extCluster = this.GetCluster(synapseData.clusterName);
|
Cluster extCluster = this.GetCluster(synapseData.clusterName);
|
||||||
if (extCluster == null) {
|
if (extCluster == null) {
|
||||||
// if not: create new external cluster
|
// if not: create new external cluster
|
||||||
Debug.Log("New ext cluster");
|
Debug.Log("New ext cluster");
|
||||||
ExternalClusterData externalClusterData = clusterData.GetCluster(synapseData.clusterName);
|
|
||||||
ClusterPrefab extPrefab = Resources.Load(externalClusterData.prefabName) as ClusterPrefab;
|
ClusterPrefab extPrefab = Resources.Load(externalClusterData.prefabName) as ClusterPrefab;
|
||||||
extCluster = new(extPrefab, this, instanceCount) {
|
extCluster = new(extPrefab, this, instanceCount) {
|
||||||
name = externalClusterData.name
|
name = externalClusterData.name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
extCluster.instanceCount = externalClusterData.instanceCount;
|
||||||
// Do we have the synapse already?
|
// Do we have the synapse already?
|
||||||
Neuron extNeuron = extCluster.GetNeuron(synapseData.neuronName);
|
Neuron extNeuron = extCluster.GetNeuron(synapseData.neuronName);
|
||||||
Synapse synapse = receiver.GetSynapse(extNeuron); //extCluster, synapseData.neuronName);
|
Synapse synapse = receiver.GetSynapse(extNeuron); //extCluster, synapseData.neuronName);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user