Exemplo n.º 1
0
 /// <summary>
 /// Create VGO_PS_VelocityOverLifetimeModule from VelocityOverLifetimeModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_VelocityOverLifetimeModule CreateVgoModule(VelocityOverLifetimeModule module)
 {
     return(new VGO_PS_VelocityOverLifetimeModule()
     {
         enabled = module.enabled,
         x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.x),
         y = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.y),
         z = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.z),
         xMultiplier = module.xMultiplier,
         yMultiplier = module.yMultiplier,
         zMultiplier = module.zMultiplier,
         space = module.space,
         orbitalX = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalX),
         orbitalY = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalY),
         orbitalZ = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalZ),
         orbitalXMultiplier = module.orbitalXMultiplier,
         orbitalYMultiplier = module.orbitalYMultiplier,
         orbitalZMultiplier = module.orbitalZMultiplier,
         orbitalOffsetX = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalOffsetX),
         orbitalOffsetY = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalOffsetY),
         orbitalOffsetZ = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.orbitalOffsetZ),
         orbitalOffsetXMultiplier = module.orbitalOffsetXMultiplier,
         orbitalOffsetYMultiplier = module.orbitalOffsetYMultiplier,
         orbitalOffsetZMultiplier = module.orbitalOffsetZMultiplier,
         radial = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.radial),
         radialMultiplier = module.radialMultiplier,
         speedModifier = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.speedModifier),
         speedModifierMultiplier = module.speedModifierMultiplier,
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// Set ParticleSystem rotationBySpeed field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_RotationBySpeedModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            RotationBySpeedModule module = particleSystem.rotationBySpeed;

            module.enabled      = vgoModule.enabled;
            module.separateAxes = vgoModule.separateAxes;

            if (vgoModule.separateAxes)
            {
                module.x           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
                module.y           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.y);
                module.z           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.z);
                module.xMultiplier = vgoModule.xMultiplier;
                module.yMultiplier = vgoModule.yMultiplier;
                module.zMultiplier = vgoModule.zMultiplier;
            }
            else
            {
                module.x           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
                module.xMultiplier = vgoModule.xMultiplier;
            }

            module.range = ArrayConverter.ToVector2(vgoModule.range);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Create VGO_PS_VelocityOverLifetimeModule from VelocityOverLifetimeModule.
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        protected virtual VGO_PS_LimitVelocityOverLifetimeModule CreateVgoModule(LimitVelocityOverLifetimeModule module)
        {
            var vgoModule = new VGO_PS_LimitVelocityOverLifetimeModule()
            {
                enabled                        = module.enabled,
                separateAxes                   = module.separateAxes,
                space                          = module.space,
                dampen                         = module.dampen,
                drag                           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.drag),
                dragMultiplier                 = module.dragMultiplier,
                multiplyDragByParticleSize     = module.multiplyDragByParticleSize,
                multiplyDragByParticleVelocity = module.multiplyDragByParticleVelocity,
            };

            if (module.separateAxes)
            {
                vgoModule.limitX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.limitX);
                vgoModule.limitY           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.limitY);
                vgoModule.limitZ           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.limitZ);
                vgoModule.limitXMultiplier = module.limitXMultiplier;
                vgoModule.limitYMultiplier = module.limitYMultiplier;
                vgoModule.limitZMultiplier = module.limitZMultiplier;
            }
            else
            {
                vgoModule.limitX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.limit);
                vgoModule.limitXMultiplier = module.limitMultiplier;
            }

            return(vgoModule);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Create VGO_PS_SizeOverLifetimeModule from SizeOverLifetimeModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_SizeOverLifetimeModule CreateVgoModule(SizeOverLifetimeModule module)
 {
     if (module.separateAxes)
     {
         return(new VGO_PS_SizeOverLifetimeModule()
         {
             enabled = module.enabled,
             separateAxes = module.separateAxes,
             x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.x),
             y = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.y),
             z = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.z),
             xMultiplier = module.xMultiplier,
             yMultiplier = module.yMultiplier,
             zMultiplier = module.zMultiplier,
         });
     }
     else
     {
         return(new VGO_PS_SizeOverLifetimeModule()
         {
             enabled = module.enabled,
             separateAxes = module.separateAxes,
             x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.size),
             xMultiplier = module.sizeMultiplier,
         });
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// Set ParticleSystem sizeOverLifetime field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_SizeOverLifetimeModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            SizeOverLifetimeModule module = particleSystem.sizeOverLifetime;

            module.enabled      = vgoModule.enabled;
            module.separateAxes = vgoModule.separateAxes;

            if (vgoModule.separateAxes)
            {
                module.x           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
                module.y           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.y);
                module.z           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.z);
                module.xMultiplier = vgoModule.xMultiplier;
                module.yMultiplier = vgoModule.yMultiplier;
                module.zMultiplier = vgoModule.zMultiplier;
            }
            else
            {
                module.size           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
                module.sizeMultiplier = vgoModule.xMultiplier;
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// Create VGO_PS_RotationBySpeedModule from RotationBySpeedModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_RotationBySpeedModule CreateVgoModule(RotationBySpeedModule module)
 {
     if (module.separateAxes)
     {
         return(new VGO_PS_RotationBySpeedModule()
         {
             enabled = module.enabled,
             separateAxes = module.separateAxes,
             x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.x),
             y = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.y),
             z = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.z),
             xMultiplier = module.xMultiplier,
             yMultiplier = module.yMultiplier,
             zMultiplier = module.zMultiplier,
             range = module.range.ToArray(),
         });
     }
     else
     {
         return(new VGO_PS_RotationBySpeedModule()
         {
             enabled = module.enabled,
             separateAxes = module.separateAxes,
             x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.x),
             xMultiplier = module.xMultiplier,
             range = module.range.ToArray(),
         });
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Set ParticleSystem limitVelocityOverLifetime field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_LimitVelocityOverLifetimeModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            LimitVelocityOverLifetimeModule module = particleSystem.limitVelocityOverLifetime;

            module.enabled      = vgoModule.enabled;
            module.separateAxes = vgoModule.separateAxes;

            if (vgoModule.separateAxes)
            {
                module.limitX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.limitX);
                module.limitY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.limitY);
                module.limitZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.limitZ);
                module.limitXMultiplier = vgoModule.limitXMultiplier;
                module.limitYMultiplier = vgoModule.limitYMultiplier;
                module.limitZMultiplier = vgoModule.limitZMultiplier;
            }
            else
            {
                module.limit           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.limitX);
                module.limitMultiplier = vgoModule.limitXMultiplier;
            }

            module.space                          = vgoModule.space;
            module.dampen                         = vgoModule.dampen;
            module.drag                           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.drag);
            module.dragMultiplier                 = vgoModule.dragMultiplier;
            module.multiplyDragByParticleSize     = vgoModule.multiplyDragByParticleSize;
            module.multiplyDragByParticleVelocity = vgoModule.multiplyDragByParticleVelocity;
        }
Exemplo n.º 8
0
 /// <summary>
 /// Create VGO_PS_TrailModule from TrailModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_TrailModule CreateVgoModule(TrailModule module)
 {
     return(new VGO_PS_TrailModule()
     {
         enabled = module.enabled,
         mode = module.mode,
         ratio = module.ratio,
         lifetime = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.lifetime),
         lifetimeMultiplier = module.lifetimeMultiplier,
         minVertexDistance = module.minVertexDistance,
         worldSpace = module.worldSpace,
         dieWithParticles = module.dieWithParticles,
         ribbonCount = module.ribbonCount,
         splitSubEmitterRibbons = module.splitSubEmitterRibbons,
         attachRibbonsToTransform = module.attachRibbonsToTransform,
         textureMode = module.textureMode,
         sizeAffectsWidth = module.sizeAffectsWidth,
         sizeAffectsLifetime = module.sizeAffectsLifetime,
         inheritParticleColor = module.inheritParticleColor,
         colorOverLifetime = VgoParticleSystemMinMaxGradientConverter.CreateFrom(module.colorOverLifetime),
         widthOverTrail = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.widthOverTrail),
         widthOverTrailMultiplier = module.widthOverTrailMultiplier,
         colorOverTrail = VgoParticleSystemMinMaxGradientConverter.CreateFrom(module.colorOverTrail),
         generateLightingData = module.generateLightingData,
         shadowBias = module.shadowBias,
     });
 }
Exemplo n.º 9
0
        /// <summary>
        /// Create VGO_PS_EmissionModule from EmissionModule.
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        protected virtual VGO_PS_EmissionModule CreateVgoModule(EmissionModule module)
        {
            var vgoModule = new VGO_PS_EmissionModule()
            {
                enabled                    = module.enabled,
                rateOverTime               = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.rateOverTime),
                rateOverTimeMultiplier     = module.rateOverTimeMultiplier,
                rateOverDistance           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.rateOverDistance),
                rateOverDistanceMultiplier = module.rateOverDistanceMultiplier,
                //BurstCount = module.burstCount,
            };

            if (module.burstCount > 0)
            {
                Burst[] bursts = new Burst[module.burstCount];

                module.GetBursts(bursts);

                if ((bursts != null) && bursts.Any())
                {
                    vgoModule.bursts = new VGO_PS_Burst[bursts.Length];

                    for (int idx = 0; idx < bursts.Length; idx++)
                    {
                        vgoModule.bursts[idx] = VgoParticleSystemBurstConverter.CreateFrom(bursts[idx]);
                    }
                }
            }

            return(vgoModule);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Set ParticleSystem emission field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_EmissionModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            EmissionModule module = particleSystem.emission;

            module.enabled                    = vgoModule.enabled;
            module.rateOverTime               = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.rateOverTime);
            module.rateOverTimeMultiplier     = vgoModule.rateOverTimeMultiplier;
            module.rateOverDistance           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.rateOverDistance);
            module.rateOverDistanceMultiplier = vgoModule.rateOverDistanceMultiplier;
            //module.burstCount = vgoModule.BurstCount;

            if ((vgoModule.bursts != null) && vgoModule.bursts.Any())
            {
                module.burstCount = vgoModule.bursts.Length;

                for (int idx = 0; idx < vgoModule.bursts.Length; idx++)
                {
                    module.SetBurst(idx, VgoParticleSystemBurstConverter.CreateBurst(vgoModule.bursts[idx]));
                }
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Set ParticleSystem noiseModule field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_NoiseModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            NoiseModule module = particleSystem.noise;

            module.enabled      = vgoModule.enabled;
            module.separateAxes = vgoModule.separateAxes;

            if (vgoModule.separateAxes)
            {
                module.strengthX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.strengthX);
                module.strengthY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.strengthY);
                module.strengthZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.strengthZ);
                module.strengthXMultiplier = vgoModule.strengthXMultiplier;
                module.strengthYMultiplier = vgoModule.strengthYMultiplier;
                module.strengthZMultiplier = vgoModule.strengthZMultiplier;
            }
            else
            {
                module.strength           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.strengthX);
                module.strengthMultiplier = vgoModule.strengthXMultiplier;
            }

            module.frequency             = vgoModule.frequency;
            module.scrollSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.scrollSpeed);
            module.scrollSpeedMultiplier = vgoModule.scrollSpeedMultiplier;
            module.damping          = vgoModule.damping;
            module.octaveCount      = vgoModule.octaveCount;
            module.octaveMultiplier = vgoModule.octaveMultiplier;
            module.octaveScale      = vgoModule.octaveScale;
            module.quality          = vgoModule.quality;
            module.remapEnabled     = vgoModule.remapEnabled;

            if (vgoModule.remapEnabled)
            {
                if (vgoModule.separateAxes)
                {
                    module.remapX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.remapX);
                    module.remapY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.remapY);
                    module.remapZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.remapZ);
                    module.remapXMultiplier = vgoModule.remapXMultiplier;
                    module.remapYMultiplier = vgoModule.remapYMultiplier;
                    module.remapZMultiplier = vgoModule.remapZMultiplier;
                }
                else
                {
                    module.remap           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.remapX);
                    module.remapMultiplier = vgoModule.remapXMultiplier;
                }
            }

            module.positionAmount = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.positionAmount);
            module.rotationAmount = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.rotationAmount);
            module.sizeAmount     = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.sizeAmount);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Set ParticleSystem shape field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        /// <param name="textureItemList"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_ShapeModule vgoModule, IList <TextureItem> textureItemList)
        {
            if (vgoModule == null)
            {
                return;
            }

            ShapeModule module = particleSystem.shape;

            module.enabled               = vgoModule.enabled;
            module.shapeType             = vgoModule.shapeType;
            module.angle                 = vgoModule.angle;
            module.radius                = vgoModule.radius;
            module.donutRadius           = vgoModule.donutRadius;
            module.radiusMode            = vgoModule.radiusMode;
            module.radiusSpread          = vgoModule.radiusSpread;
            module.radiusSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.radiusSpeed);
            module.radiusSpeedMultiplier = vgoModule.radiusSpeedMultiplier;
            module.radiusThickness       = vgoModule.radiusThickness;
            module.boxThickness          = ArrayConverter.ToVector3(vgoModule.boxThickness, reverseZ: true);
            module.arc                      = vgoModule.arc;
            module.arcMode                  = vgoModule.arcMode;
            module.arcSpread                = vgoModule.arcSpread;
            module.arcSpeed                 = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.arcSpeed);
            module.arcSpeedMultiplier       = vgoModule.arcSpeedMultiplier;
            module.length                   = vgoModule.length;
            module.meshShapeType            = vgoModule.meshShapeType;
            module.meshSpawnMode            = vgoModule.meshSpawnMode;
            module.meshSpawnSpread          = vgoModule.meshSpawnSpread;
            module.meshSpawnSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.meshSpawnSpeed);
            module.meshSpawnSpeedMultiplier = vgoModule.meshSpawnSpeedMultiplier;
            //module.mesh;
            //module.meshRenderer;
            //module.skinnedMeshRenderer;
            module.useMeshMaterialIndex = vgoModule.useMeshMaterialIndex;
            module.meshMaterialIndex    = vgoModule.meshMaterialIndex;
            module.useMeshColors        = vgoModule.useMeshColors;
            //module.sprite;
            //module.spriteRenderer;
            module.normalOffset = vgoModule.normalOffset;
            if ((textureItemList != null) && (-1 < vgoModule.textureIndex) && (vgoModule.textureIndex < textureItemList.Count))
            {
                module.texture = textureItemList[vgoModule.textureIndex].Texture;
            }
            module.textureClipChannel           = vgoModule.textureClipChannel;
            module.textureClipThreshold         = vgoModule.textureClipThreshold;
            module.textureColorAffectsParticles = vgoModule.textureColorAffectsParticles;
            module.textureAlphaAffectsParticles = vgoModule.textureAlphaAffectsParticles;
            module.textureBilinearFiltering     = vgoModule.textureBilinearFiltering;
            module.textureUVChannel             = vgoModule.textureUVChannel;
            module.position                 = ArrayConverter.ToVector3(vgoModule.position, reverseZ: true);
            module.rotation                 = ArrayConverter.ToVector3(vgoModule.rotation, reverseZ: true);
            module.scale                    = ArrayConverter.ToVector3(vgoModule.scale);
            module.alignToDirection         = vgoModule.alignToDirection;
            module.randomPositionAmount     = vgoModule.randomPositionAmount;
            module.sphericalDirectionAmount = vgoModule.sphericalDirectionAmount;
            module.randomDirectionAmount    = vgoModule.randomDirectionAmount;
        }
Exemplo n.º 13
0
        /// <summary>
        /// Create VGO_PS_ShapeModule from ShapeModule.
        /// </summary>
        /// <param name="module"></param>
        /// <param name="gltf"></param>
        /// <returns></returns>
        /// <remarks>
        /// @notice TextureIO.ExportTexture() may export the same texture multiple times.
        /// </remarks>
        protected virtual VGO_PS_ShapeModule CreateVgoModule(ShapeModule module, glTF gltf)
        {
            var vgoShapeModule = new VGO_PS_ShapeModule()
            {
                enabled               = module.enabled,
                shapeType             = module.shapeType,
                angle                 = module.angle,
                radius                = module.radius,
                donutRadius           = module.donutRadius,
                radiusMode            = module.radiusMode,
                radiusSpread          = module.radiusSpread,
                radiusSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.radiusSpeed),
                radiusSpeedMultiplier = module.radiusSpeedMultiplier,
                radiusThickness       = module.radiusThickness,
                boxThickness          = module.boxThickness.ReverseZ().ToArray(),
                arc                      = module.arc,
                arcMode                  = module.arcMode,
                arcSpread                = module.arcSpread,
                arcSpeed                 = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.arcSpeed),
                arcSpeedMultiplier       = module.arcSpeedMultiplier,
                length                   = module.length,
                meshShapeType            = module.meshShapeType,
                meshSpawnMode            = module.meshSpawnMode,
                meshSpawnSpread          = module.meshSpawnSpread,
                meshSpawnSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.meshSpawnSpread),
                meshSpawnSpeedMultiplier = module.meshSpawnSpeedMultiplier,
                //mesh
                //meshRenderer
                //skinnedMeshRenderer
                useMeshMaterialIndex = module.useMeshMaterialIndex,
                meshMaterialIndex    = module.meshMaterialIndex,
                useMeshColors        = module.useMeshColors,
                //sprite
                //spriteRenderer
                normalOffset                 = module.normalOffset,
                textureIndex                 = -1,
                textureClipChannel           = module.textureClipChannel,
                textureClipThreshold         = module.textureClipThreshold,
                textureColorAffectsParticles = module.textureColorAffectsParticles,
                textureAlphaAffectsParticles = module.textureAlphaAffectsParticles,
                textureBilinearFiltering     = module.textureBilinearFiltering,
                textureUVChannel             = module.textureUVChannel,
                position                 = module.position.ReverseZ().ToArray(),
                rotation                 = module.rotation.ReverseZ().ToArray(),
                scale                    = module.scale.ToArray(),
                alignToDirection         = module.alignToDirection,
                randomPositionAmount     = module.randomPositionAmount,
                sphericalDirectionAmount = module.sphericalDirectionAmount,
                randomDirectionAmount    = module.randomDirectionAmount,
            };

            if (module.texture != null)
            {
                vgoShapeModule.textureIndex = TextureIO.ExportTexture(gltf, gltf.buffers.Count - 1, module.texture, glTFTextureTypes.Unknown);
            }

            return(vgoShapeModule);
        }
Exemplo n.º 14
0
 /// <summary>
 /// Create VGO_PS_InheritVelocityModule from InheritVelocityModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_InheritVelocityModule CreateVgoModule(InheritVelocityModule module)
 {
     return(new VGO_PS_InheritVelocityModule()
     {
         enabled = module.enabled,
         mode = module.mode,
         curve = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.curve),
         curveMultiplier = module.curveMultiplier,
     });
 }
Exemplo n.º 15
0
 /// <summary>
 /// Create VGO_PS_Burst from Burst.
 /// </summary>
 /// <param name="minMaxCurve"></param>
 /// <returns></returns>
 public static VGO_PS_Burst CreateFrom(Burst burst)
 {
     return(new VGO_PS_Burst()
     {
         time = burst.time,
         count = VgoParticleSystemMinMaxCurveConverter.CreateFrom(burst.count),
         cycleCount = burst.cycleCount,
         repeatInterval = burst.repeatInterval,
         probability = burst.probability,
     });
 }
Exemplo n.º 16
0
 /// <summary>
 /// Create VGO_PS_ExternalForcesModule from ExternalForcesModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_ExternalForcesModule CreateVgoModule(ExternalForcesModule module)
 {
     return(new VGO_PS_ExternalForcesModule()
     {
         enabled = module.enabled,
         multiplierCurve = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.multiplierCurve),
         multiplier = module.multiplier,
         influenceFilter = module.influenceFilter,
         influenceMask = module.influenceMask.value,
     });
 }
Exemplo n.º 17
0
        /// <summary>
        /// Create VGO_PS_NoiseModule from NoiseModule.
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        protected virtual VGO_PS_NoiseModule CreateVgoModule(NoiseModule module)
        {
            var vgoModule = new VGO_PS_NoiseModule()
            {
                enabled               = module.enabled,
                separateAxes          = module.separateAxes,
                frequency             = module.frequency,
                scrollSpeed           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.scrollSpeed),
                scrollSpeedMultiplier = module.scrollSpeedMultiplier,
                damping               = module.damping,
                octaveCount           = module.octaveCount,
                octaveMultiplier      = module.octaveMultiplier,
                octaveScale           = module.octaveScale,
                quality               = module.quality,
                remapEnabled          = module.remapEnabled,
                positionAmount        = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.positionAmount),
                rotationAmount        = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.rotationAmount),
                sizeAmount            = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.sizeAmount),
            };

            if (module.separateAxes)
            {
                vgoModule.strengthX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.strengthX);
                vgoModule.strengthY           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.strengthY);
                vgoModule.strengthZ           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.strengthZ);
                vgoModule.strengthXMultiplier = module.strengthXMultiplier;
                vgoModule.strengthYMultiplier = module.strengthYMultiplier;
                vgoModule.strengthZMultiplier = module.strengthZMultiplier;

                if (module.remapEnabled)
                {
                    vgoModule.remapX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.remapX);
                    vgoModule.remapY           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.remapY);
                    vgoModule.remapZ           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.remapZ);
                    vgoModule.remapXMultiplier = module.remapXMultiplier;
                    vgoModule.remapYMultiplier = module.remapYMultiplier;
                    vgoModule.remapZMultiplier = module.remapZMultiplier;
                }
            }
            else
            {
                vgoModule.strengthX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.strengthX);
                vgoModule.strengthXMultiplier = module.strengthXMultiplier;

                if (module.remapEnabled)
                {
                    vgoModule.remapX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.remapX);
                    vgoModule.remapXMultiplier = module.remapXMultiplier;
                }
            }

            return(vgoModule);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Set ParticleSystem inhelitVelocity field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoForceOverLifetimeModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_InheritVelocityModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            InheritVelocityModule module = particleSystem.inheritVelocity;

            module.enabled         = vgoModule.enabled;
            module.mode            = vgoModule.mode;
            module.curve           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.curve);
            module.curveMultiplier = vgoModule.curveMultiplier;
        }
Exemplo n.º 19
0
 /// <summary>
 /// Create VGO_PS_ForceOverLifetimeModule from ForceOverLifetimeModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_ForceOverLifetimeModule CreateVgoModule(ForceOverLifetimeModule module)
 {
     return(new VGO_PS_ForceOverLifetimeModule()
     {
         enabled = module.enabled,
         x = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.x),
         y = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.y),
         z = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.z),
         xMultiplier = module.xMultiplier,
         yMultiplier = module.yMultiplier,
         zMultiplier = module.zMultiplier,
         space = module.space,
         randomized = module.randomized,
     });
 }
Exemplo n.º 20
0
 /// <summary>
 /// Create VGO_PS_LightsModule from LightsModule.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 protected virtual VGO_PS_LightsModule CreateVgoModule(LightsModule module)
 {
     return(new VGO_PS_LightsModule()
     {
         enabled = module.enabled,
         ratio = module.ratio,
         useRandomDistribution = module.useRandomDistribution,
         light = VgoLightConverter.CreateFrom(module.light),
         useParticleColor = module.useParticleColor,
         sizeAffectsRange = module.sizeAffectsRange,
         alphaAffectsIntensity = module.alphaAffectsIntensity,
         range = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.range),
         rangeMultiplier = module.rangeMultiplier,
         intensity = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.intensity),
         intensityMultiplier = module.intensityMultiplier,
         maxLights = module.maxLights,
     });
 }
Exemplo n.º 21
0
        /// <summary>
        /// Set ParticleSystem externalForcesModule field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_ExternalForcesModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            ExternalForcesModule module = particleSystem.externalForces;

            module.enabled         = vgoModule.enabled;
            module.multiplierCurve = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.multiplierCurve);
            module.multiplier      = vgoModule.multiplier;
            module.influenceFilter = vgoModule.influenceFilter;
            module.influenceMask   = new LayerMask()
            {
                value = vgoModule.influenceMask
            };
        }
Exemplo n.º 22
0
        /// <summary>
        /// Set ParticleSystem forceOverLifetime field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_ForceOverLifetimeModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            ForceOverLifetimeModule module = particleSystem.forceOverLifetime;

            module.enabled     = vgoModule.enabled;
            module.x           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
            module.y           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.y);
            module.z           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.z);
            module.xMultiplier = vgoModule.xMultiplier;
            module.yMultiplier = vgoModule.yMultiplier;
            module.zMultiplier = vgoModule.zMultiplier;
            module.space       = vgoModule.space;
            module.randomized  = vgoModule.randomized;
        }
Exemplo n.º 23
0
        /// <summary>
        /// Set ParticleSystem lightsModule field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_LightsModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            LightsModule module = particleSystem.lights;

            module.enabled = vgoModule.enabled;
            module.ratio   = vgoModule.ratio;
            module.useRandomDistribution = vgoModule.useRandomDistribution;
            module.useParticleColor      = vgoModule.useParticleColor;
            module.sizeAffectsRange      = vgoModule.sizeAffectsRange;
            module.alphaAffectsIntensity = vgoModule.alphaAffectsIntensity;
            module.range               = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.range);
            module.rangeMultiplier     = vgoModule.rangeMultiplier;
            module.intensity           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.intensity);
            module.intensityMultiplier = vgoModule.intensityMultiplier;
            module.maxLights           = vgoModule.maxLights;

            if (vgoModule.light != null)
            {
                // @notice
                Light goLight = particleSystem.gameObject.GetComponent <Light>();

                if (goLight == null)
                {
                    goLight = particleSystem.gameObject.AddComponent <Light>();
                }

                VgoLightConverter.SetComponentValue(goLight, vgoModule.light);

                goLight.enabled = false;

                module.light = goLight;

                if (Application.isEditor)
                {
                    // @todo
                }
            }
        }
Exemplo n.º 24
0
        /// <summary>
        /// Set ParticleSystem velocityOverLifetime field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_VelocityOverLifetimeModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            VelocityOverLifetimeModule module = particleSystem.velocityOverLifetime;

            module.enabled = vgoModule.enabled;

            module.xMultiplier = vgoModule.xMultiplier;
            module.yMultiplier = vgoModule.yMultiplier;
            module.zMultiplier = vgoModule.zMultiplier;
            module.x           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.x);
            module.y           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.y);
            module.z           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.z);

            module.space = vgoModule.space;

            module.orbitalX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalX);
            module.orbitalY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalY);
            module.orbitalZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalZ);
            module.orbitalXMultiplier = vgoModule.orbitalXMultiplier;
            module.orbitalYMultiplier = vgoModule.orbitalYMultiplier;
            module.orbitalZMultiplier = vgoModule.orbitalZMultiplier;

            module.orbitalOffsetX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalOffsetX);
            module.orbitalOffsetY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalOffsetY);
            module.orbitalOffsetZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.orbitalOffsetZ);
            module.orbitalOffsetXMultiplier = vgoModule.orbitalOffsetXMultiplier;
            module.orbitalOffsetYMultiplier = vgoModule.orbitalOffsetYMultiplier;
            module.orbitalOffsetZMultiplier = vgoModule.orbitalOffsetZMultiplier;

            module.radial           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.radial);
            module.radialMultiplier = vgoModule.radialMultiplier;

            module.speedModifier           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.speedModifier);
            module.speedModifierMultiplier = vgoModule.speedModifierMultiplier;
        }
Exemplo n.º 25
0
        /// <summary>
        /// Set ParticleSystem noiseModule field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_TrailModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            TrailModule module = particleSystem.trails;

            module.enabled = vgoModule.enabled;
            module.mode    = vgoModule.mode;

            // PerParticle
            module.ratio              = vgoModule.ratio;
            module.lifetime           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.lifetime);
            module.lifetimeMultiplier = vgoModule.lifetimeMultiplier;
            module.minVertexDistance  = vgoModule.minVertexDistance;
            module.worldSpace         = vgoModule.worldSpace;
            module.dieWithParticles   = vgoModule.dieWithParticles;

            // Ribbon
            module.ribbonCount              = vgoModule.ribbonCount;
            module.splitSubEmitterRibbons   = vgoModule.splitSubEmitterRibbons;
            module.attachRibbonsToTransform = vgoModule.attachRibbonsToTransform;

            module.textureMode              = vgoModule.textureMode;
            module.sizeAffectsWidth         = vgoModule.sizeAffectsWidth;
            module.sizeAffectsLifetime      = vgoModule.sizeAffectsLifetime;
            module.inheritParticleColor     = vgoModule.inheritParticleColor;
            module.colorOverLifetime        = VgoParticleSystemMinMaxGradientConverter.CreateMinMaxGradient(vgoModule.colorOverLifetime);
            module.widthOverTrail           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.widthOverTrail);
            module.widthOverTrailMultiplier = vgoModule.widthOverTrailMultiplier;
            module.colorOverTrail           = VgoParticleSystemMinMaxGradientConverter.CreateMinMaxGradient(vgoModule.colorOverTrail);
            module.generateLightingData     = vgoModule.generateLightingData;
            module.shadowBias = vgoModule.shadowBias;
        }
Exemplo n.º 26
0
        /// <summary>
        /// Create VGO_PS_MainModule from MainModule.
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        protected virtual VGO_PS_MainModule CreateVgoModule(MainModule module)
        {
            var vgoModule = new VGO_PS_MainModule()
            {
                duration                  = module.duration,
                loop                      = module.loop,
                prewarm                   = module.prewarm,
                startDelay                = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startDelay),
                startDelayMultiplier      = module.startDelayMultiplier,
                startLifetime             = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startLifetime),
                startLifetimeMultiplier   = module.startLifetimeMultiplier,
                startSpeed                = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startSpeed),
                startSpeedMultiplier      = module.startSpeedMultiplier,
                startSize3D               = module.startSize3D,
                startRotation3D           = module.startRotation3D,
                flipRotation              = module.flipRotation,
                startColor                = VgoParticleSystemMinMaxGradientConverter.CreateFrom(module.startColor),
                gravityModifier           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.gravityModifier),
                gravityModifierMultiplier = module.gravityModifierMultiplier,
                simulationSpace           = module.simulationSpace,
                simulationSpeed           = module.simulationSpeed,
                customSimulationSpace     = VgoTransformConverter.CreateFrom(module.customSimulationSpace),
                useUnscaledTime           = module.useUnscaledTime,
                scalingMode               = module.scalingMode,
                playOnAwake               = module.playOnAwake,
                emitterVelocityMode       = module.emitterVelocityMode,
                maxParticles              = module.maxParticles,
                stopAction                = module.stopAction,
                cullingMode               = module.cullingMode,
                ringBufferMode            = module.ringBufferMode,
            };

            if (module.startSize3D)
            {
                vgoModule.startSizeX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startSizeX);
                vgoModule.startSizeY           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startSizeY);
                vgoModule.startSizeZ           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startSizeZ);
                vgoModule.startSizeXMultiplier = module.startSizeXMultiplier;
                vgoModule.startSizeYMultiplier = module.startSizeYMultiplier;
                vgoModule.startSizeZMultiplier = module.startSizeZMultiplier;
            }
            else
            {
                vgoModule.startSize           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startSize);
                vgoModule.startSizeMultiplier = module.startSizeMultiplier;
            }

            if (module.startRotation3D)
            {
                vgoModule.startRotationX           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startRotationX);
                vgoModule.startRotationY           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startRotationY);
                vgoModule.startRotationZ           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startRotationZ);
                vgoModule.StartRotationXMultiplier = module.startRotationXMultiplier;
                vgoModule.StartRotationYMultiplier = module.startRotationYMultiplier;
                vgoModule.StartRotationZMultiplier = module.startRotationZMultiplier;
            }
            else
            {
                vgoModule.startRotation           = VgoParticleSystemMinMaxCurveConverter.CreateFrom(module.startRotation);
                vgoModule.StartRotationMultiplier = module.startRotationMultiplier;
            }

            if (module.ringBufferMode == ParticleSystemRingBufferMode.LoopUntilReplaced)
            {
                vgoModule.ringBufferLoopRange = module.ringBufferLoopRange.ToArray();
            }

            return(vgoModule);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Set ParticleSystem main field value.
        /// </summary>
        /// <param name="particleSystem"></param>
        /// <param name="vgoModule"></param>
        protected virtual void SetModuleValue(ParticleSystem particleSystem, VGO_PS_MainModule vgoModule)
        {
            if (vgoModule == null)
            {
                return;
            }

            MainModule module = particleSystem.main;

            // @notice
            if (Application.isPlaying == false)
            {
                module.duration = vgoModule.duration;
            }

            module.loop                    = vgoModule.loop;
            module.prewarm                 = vgoModule.prewarm;
            module.startDelay              = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startDelay);
            module.startDelayMultiplier    = vgoModule.startDelayMultiplier;
            module.startLifetime           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startLifetime);
            module.startLifetimeMultiplier = vgoModule.startLifetimeMultiplier;
            module.startSpeed              = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startSpeed);
            module.startSpeedMultiplier    = vgoModule.startSpeedMultiplier;

            module.startSize3D = vgoModule.startSize3D;

            if (vgoModule.startSize3D)
            {
                module.startSizeX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startSizeX);
                module.startSizeY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startSizeY);
                module.startSizeZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startSizeZ);
                module.startSizeXMultiplier = vgoModule.startSizeXMultiplier;
                module.startSizeYMultiplier = vgoModule.startSizeYMultiplier;
                module.startSizeZMultiplier = vgoModule.startSizeZMultiplier;
            }
            else
            {
                module.startSize           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startSize);
                module.startSizeMultiplier = vgoModule.startSizeMultiplier;
            }

            module.startRotation3D = vgoModule.startRotation3D;

            if (vgoModule.startRotation3D)
            {
                module.startRotationX           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startRotationX);
                module.startRotationY           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startRotationY);
                module.startRotationZ           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startRotationZ);
                module.startRotationXMultiplier = vgoModule.StartRotationXMultiplier;
                module.startRotationYMultiplier = vgoModule.StartRotationYMultiplier;
                module.startRotationZMultiplier = vgoModule.StartRotationZMultiplier;
            }
            else
            {
                module.startRotation           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.startRotation);
                module.startRotationMultiplier = vgoModule.StartRotationMultiplier;
            }

            module.flipRotation              = vgoModule.flipRotation;
            module.startColor                = VgoParticleSystemMinMaxGradientConverter.CreateMinMaxGradient(vgoModule.startColor);
            module.gravityModifier           = VgoParticleSystemMinMaxCurveConverter.CreateMinMaxCurve(vgoModule.gravityModifier);
            module.gravityModifierMultiplier = vgoModule.gravityModifierMultiplier;

            module.simulationSpace = vgoModule.simulationSpace;
            module.simulationSpeed = vgoModule.simulationSpeed;
            VgoTransformConverter.SetComponentValue(module.customSimulationSpace, vgoModule.customSimulationSpace);

            module.useUnscaledTime     = vgoModule.useUnscaledTime;
            module.scalingMode         = vgoModule.scalingMode;
            module.playOnAwake         = vgoModule.playOnAwake;
            module.emitterVelocityMode = vgoModule.emitterVelocityMode;
            module.maxParticles        = vgoModule.maxParticles;
            module.stopAction          = vgoModule.stopAction;
            module.cullingMode         = vgoModule.cullingMode;
            module.ringBufferMode      = vgoModule.ringBufferMode;

            if (vgoModule.ringBufferMode == ParticleSystemRingBufferMode.LoopUntilReplaced)
            {
                module.ringBufferLoopRange = ArrayConverter.ToVector2(vgoModule.ringBufferLoopRange);
            }
        }