Esempio n. 1
0
 private void DrawContent()
 {
     foreach (GPUParticleEmitter cur in targets)
     {
         EditorGUILayout.BeginHorizontal();
         if (Application.isPlaying)
         {
             EditorGUILayout.LabelField(cur.name + ": " + cur.GetAliveCount() + " / " + cur.maxParticles + " Particles alive");
             GPUParticleEmitterEditor.GetInstance().Repaint();
         }
         else
         {
             EditorGUILayout.LabelField(cur.name + ": 0 / " + cur.maxParticles + " Particles alive");
         }
         EditorGUILayout.EndHorizontal();
     }
 }
        private void OnEnable()
        {
            instance = this;

            modules = new List <Module>
            {
                new SystemModule(targets),
                new GeneralModule(serializedObject, targets),
                new ColorModule(serializedObject, targets),
                new SizeModule(serializedObject, targets),
                new LifetimeModule(serializedObject),
                new EmissionModule(serializedObject),
                new InheritVelocityModule(serializedObject),
                new NoiseModule(serializedObject),
                new ConstantInfluenceModule(serializedObject),
                new AssetsModule(serializedObject),
            };
        }
        private void OnEnable()
        {
            instance = this;

            if (logo == null)
            {
                logo = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/GPUParticles/Resources/Logo.png");
            }

            modules = new List <Module>
            {
                new SystemModule(targets),
                new GeneralModule(serializedObject, targets),
                new ColorModule(serializedObject, targets),
                new SizeModule(serializedObject, targets),
                new LifetimeModule(serializedObject),
                new EmissionModule(serializedObject),
                new InheritVelocityModule(serializedObject),
                new NoiseModule(serializedObject),
                new ConstantInfluenceModule(serializedObject),
                new AssetsModule(serializedObject),
            };
        }