private void UpdateOutputPins()
        {
            FOrder.SliceCount         = FBufferSemantic.SliceCount = FElementCountBuf.SliceCount = FValueRange.SliceCount =
                FStrideBuf.SliceCount = FModeBuf.SliceCount = FResetCounterBuf.SliceCount = 0;

            if (FParticleSystemName.SliceCount != 0)
            {
                var particleSystemData = ParticleSystemRegistry.Instance.GetByParticleSystemName(FParticleSystemName[0]);
                if (particleSystemData != null)
                {
                    // gett all buffer settings
                    var pbsl = particleSystemData.BufferSettings
                               .SelectMany(kvp => kvp.Value).ToArray();

                    // now find the buffer settings specified by enum
                    for (int i = 0; i < pbsl.Count(); i++)
                    {
                        ParticleSystemBufferSettings pbs = pbsl[i];
                        for (int j = 0; j < FBufferName.SliceCount; j++)
                        {
                            if (pbs.bufferSemantic == FBufferName[j])
                            {
                                // we found the specified buffer settings
                                FOrder.Add(i);
                                FBufferSemantic.Add(pbs.bufferSemantic);
                                FElementCountBuf.Add(pbs.elementCount);
                                FValueRange.Add(pbs.valueRange);
                                FStrideBuf.Add(pbs.stride);
                                FModeBuf.Add(pbs.bufferMode);
                                FResetCounterBuf.Add(pbs.resetCounter);

                                break;
                            }
                        }
                    }
                }

                FOrder.Flush();
                FBufferSemantic.Flush();
                FElementCountBuf.Flush();
                FValueRange.Flush();
                FStrideBuf.Flush();
                FModeBuf.Flush();
                FResetCounterBuf.Flush();
            }
        }
        private void SetBufferSettings(int SpreadMax)
        {
            var particleSystemRegistry = ParticleSystemRegistry.Instance;
            List <ParticleSystemBufferSettings> psbsl = new List <ParticleSystemBufferSettings>();

            for (int i = 0; i < SpreadMax; i++)
            {
                ParticleSystemBufferSettings psbs = new ParticleSystemBufferSettings(FBufferSemantic[i], FEleCount[i], FValueRange[i], FStride[i], FBufMode[i], Convert.ToBoolean(FResetCounter[i]));
                psbsl.Add(psbs);
            }
            if (psbsl.Count > 0)
            {
                particleSystemRegistry.SetBufferSettings(FParticleSystemName[0], this.BufferNodeId, psbsl);
            }
            else
            {
                particleSystemRegistry.RemoveBufferSettings(this.BufferNodeId);
            }
        }