Exemplo n.º 1
0
                // ...

                void OnFocus()
                {
                    // (Re-)verify current list of particles.

                    ParticleEditorUtility.getSelectedParticleSystems(
                        ref particleSystems, ref selectedGameObjectsWithParticleSystems);
                }
Exemplo n.º 2
0
                // ...

                void Update()
                {
                    // (Re-)verify current list of particles.

                    particleSystemsFromLastFrame =
                        new List <ParticleSystem>(particleSystems);

                    ParticleEditorUtility.getSelectedParticleSystems(
                        ref particleSystems, ref selectedGameObjectsWithParticleSystems);

                    particlePlayback.update(particleSystems);
                }
Exemplo n.º 3
0
                // ...

                void OnFocus()
                {
                    // (Re-)verify current list of particles.

                    ParticleEditorUtility.getSelectedParticleSystems(
                        ref particleSystems, ref selectedGameObjectsWithParticleSystems);

                    // Nothing selected. Undo any changes.

                    if (particleSystems.Count == 0 && realtimeScaling)
                    {
                        loadFromParticleScaleValues();
                    }
                }
Exemplo n.º 4
0
                // ...

                void Update()
                {
                    // (Re-)verify current list of particles.

                    particleSystemsFromLastFrame =
                        new List <ParticleSystem>(particleSystems);

                    ParticleEditorUtility.getSelectedParticleSystems(
                        ref particleSystems, ref selectedGameObjectsWithParticleSystems);

                    // Nothing selected. Undo any changes.

                    if (particleSystems.Count == 0 && realtimeScaling)
                    {
                        loadFromParticleScaleValues();
                    }

                    particlePlayback.update(particleSystems);
                }
Exemplo n.º 5
0
                // ...

                void OnSelectionChange()
                {
                    // Clear if set to clear on selection change.

                    if (particlePlayback.clearParticlesOnSelectionChange)
                    {
                        ParticleEditorUtility.clearParticles(particleSystems);
                        ParticleEditorUtility.clearParticles(particleSystemsFromLastFrame);

                        particlePlayback.repaintEditorCameraWindows();
                    }

                    // Pause all selected particles.

                    else if (!Application.isPlaying)
                    {
                        particlePlayback.pause(particleSystems);
                    }

                    // Clear for updated selection.

                    particleSystemScaleValues.Clear();
                    realtimeScaling = false;

                    // (Re-)verify current list of particles.

                    ParticleEditorUtility.getSelectedParticleSystems(ref particleSystems, ref selectedGameObjectsWithParticleSystems);

                    for (int i = 0; i < particleSystems.Count; i++)
                    {
                        particleSystemScaleValues.Add(new ParticleScaleValues(particleSystems[i]));
                    }

                    // Nothing selected. Undo any changes.

                    if (particleSystems.Count == 0 && realtimeScaling)
                    {
                        loadFromParticleScaleValues();
                    }
                }
Exemplo n.º 6
0
                // ...

                void OnSelectionChange()
                {
                    // Clear if set to clear on selection change.

                    if (particlePlayback.clearParticlesOnSelectionChange)
                    {
                        ParticleEditorUtility.clearParticles(particleSystems);
                        ParticleEditorUtility.clearParticles(particleSystemsFromLastFrame);

                        particlePlayback.repaintEditorCameraWindows();
                    }

                    // Pause all selected particles.

                    else if (!Application.isPlaying)
                    {
                        particlePlayback.pause(particleSystems);
                    }

                    // (Re-)verify current list of particles.

                    ParticleEditorUtility.getSelectedParticleSystems(ref particleSystems, ref selectedGameObjectsWithParticleSystems);
                }