Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by issmail · Jan 10, 2017 at 11:11 AM · build-errorerror messagenamespacemissing-reference

Assets/Standard Assets/Detonator/System/DetonatorBurstEmitter.cs(66,53): error CS0246: The type or namespace name `EllipsoidParticleEmitter' could not be found. Are you missing a using directive or an assembly reference?

Hi all i'm noob in unity 3d and i get this error

 Assets/Standard Assets/Detonator/System/DetonatorBurstEmitter.cs(66,53): error CS0246: The type or namespace name `EllipsoidParticleEmitter' could not be found. Are you missing a using directive or an assembly reference?
 

my DetonatorBurstEmitter.cs

 using UnityEngine;
 using System.Collections;
 
 /*
     DetonatorBurstEmitter is an interface for DetonatorComponents to use to create particles
     
     - Handles common tasks for Detonator... almost every DetonatorComponent uses this for particles
     - Builds the gameobject with emitter, animator, renderer
     - Everything incoming is automatically scaled by size, timeScale, color
     - Enable oneShot functionality
 
     You probably don't want to use this directly... though you certainly can.
 */
 
 public class DetonatorBurstEmitter : DetonatorComponent
 {
     private ParticleEmitter _particleEmitter;
     private ParticleRenderer _particleRenderer;
     private ParticleAnimator _particleAnimator;
 
     private float _baseDamping = 0.1300004f;
     private float _baseSize = 1f;
     private Color _baseColor = Color.white;
     
     public float damping = 1f;
     public float startRadius = 1f;
     public float maxScreenSize = 2f;
     public bool explodeOnAwake = false;
     public bool oneShot = true;
     public float sizeVariation = 0f;
     public float particleSize = 1f;
     public float count = 1;
     public float sizeGrow = 20f;
     public bool exponentialGrowth = true;
     public float durationVariation = 0f;
     public bool useWorldSpace = true;
     public float upwardsBias = 0f;
     public float angularVelocity = 20f;
     public bool randomRotation = true;
     
     public ParticleRenderMode renderMode;
     
     //TODO make this based on some var
     /*
     _sparksRenderer.particleRenderMode = ParticleRenderMode.Stretch;
     _sparksRenderer.lengthScale = 0f;
     _sparksRenderer.velocityScale = 0.7f;
     */
     
     public bool useExplicitColorAnimation = false;
     public Color[] colorAnimation = new Color[5];
     
     private bool _delayedExplosionStarted = false;
     private float _explodeDelay;
     
     public Material material;
     
     //unused
     override public void Init() 
     {
         print ("UNUSED");
     } 
     
     public void Awake()
     {
         _particleEmitter = (gameObject.AddComponent<EllipsoidParticleEmitter>()) as ParticleEmitter;
         _particleRenderer = (gameObject.AddComponent<ParticleRenderer>()) as ParticleRenderer;
         _particleAnimator = (gameObject.AddComponent<ParticleAnimator>()) as ParticleAnimator;
 
         _particleEmitter.hideFlags = HideFlags.HideAndDontSave;
         _particleRenderer.hideFlags = HideFlags.HideAndDontSave;
         _particleAnimator.hideFlags = HideFlags.HideAndDontSave;
         
         _particleAnimator.damping = _baseDamping;
 
         _particleEmitter.emit = false;
         _particleRenderer.maxParticleSize = maxScreenSize;
         _particleRenderer.material = material;
         _particleRenderer.material.color = Color.white; //workaround for this not being settable elsewhere
         _particleAnimator.sizeGrow = sizeGrow;
         
         if (explodeOnAwake)
         {
             Explode();
         }
     }
     
     private float _emitTime;
     private float speed = 3.0f;
     private float initFraction = 0.1f;
     static float epsilon = 0.01f;
     
     void Update () 
     {
         //do exponential particle scaling once emitted
         if (exponentialGrowth)
         {
             float elapsed = Time.time - _emitTime;
             float oldSize = SizeFunction(elapsed - epsilon);
             float newSize = SizeFunction(elapsed);
             float growth = ((newSize / oldSize) - 1) / epsilon;
             _particleAnimator.sizeGrow = growth;
         }
         else
         {
             _particleAnimator.sizeGrow = sizeGrow;
         }
         
         //delayed explosion
         if (_delayedExplosionStarted)
         {
             _explodeDelay = (_explodeDelay - Time.deltaTime);
             if (_explodeDelay <= 0f)
             {
                 Explode();
             }
         }
     }
     
     private float SizeFunction (float elapsedTime) 
     {
         float divided = 1 - (1 / (1 + elapsedTime * speed));
         return initFraction + (1 - initFraction) * divided;
     }
     
     public void Reset()
     {
         size = _baseSize;
         color = _baseColor;
         damping = _baseDamping;
     }
 
     
     private float _tmpParticleSize; //calculated particle size... particleSize * randomized size (by sizeVariation)
     private Vector3 _tmpPos; //calculated position... randomized inside sphere of incoming radius * size
     private Vector3 _tmpDir; //calculated velocity - randomized inside sphere - incoming velocity * size
     private Vector3 _thisPos; //handle on this gameobject's position, set inside
     private float _tmpDuration; //calculated duration... incoming duration * incoming timescale
     private float _tmpCount; //calculated count... incoming count * incoming detail
     private float _scaledDuration; //calculated duration... duration * timescale
     private float _scaledDurationVariation; 
     private float _scaledStartRadius; 
     private float _scaledColor; //color with alpha adjusted according to detail and duration
     private float _randomizedRotation;
     private float _tmpAngularVelocity; //random angular velocity from -angularVelocity to +angularVelocity, if randomRotation is true;
     
     override public void Explode()
     {
         if (on)
         {
             _particleEmitter.useWorldSpace = useWorldSpace;
             
             _scaledDuration = timeScale * duration;
             _scaledDurationVariation = timeScale * durationVariation;
             _scaledStartRadius = size * startRadius;
 
             _particleRenderer.particleRenderMode = renderMode;
             
             if (!_delayedExplosionStarted)
             {
                 _explodeDelay = explodeDelayMin + (Random.value * (explodeDelayMax - explodeDelayMin));
             }
             if (_explodeDelay <= 0) 
             {
                 Color[] modifiedColors = _particleAnimator.colorAnimation;
                 
                 if (useExplicitColorAnimation)
                 {
                     modifiedColors[0] = colorAnimation[0];
                     modifiedColors[1] = colorAnimation[1];
                     modifiedColors[2] = colorAnimation[2];
                     modifiedColors[3] = colorAnimation[3];
                     modifiedColors[4] = colorAnimation[4];
                 }
                 else //auto fade
                 {
                     modifiedColors[0] = new Color(color.r, color.g, color.b, (color.a * .7f));
                     modifiedColors[1] = new Color(color.r, color.g, color.b, (color.a * 1f));
                     modifiedColors[2] = new Color(color.r, color.g, color.b, (color.a * .5f));
                     modifiedColors[3] = new Color(color.r, color.g, color.b, (color.a * .3f));
                     modifiedColors[4] = new Color(color.r, color.g, color.b, (color.a * 0f));
                 }
                 _particleAnimator.colorAnimation = modifiedColors;
                 _particleRenderer.material = material;
                 _particleAnimator.force = force;
                 _tmpCount = count * detail;
                 if (_tmpCount < 1) _tmpCount = 1;
                 
                 if (_particleEmitter.useWorldSpace == true)
                 {
                     _thisPos = this.gameObject.transform.position;
                 }
                 else
                 {
                     _thisPos = new Vector3(0,0,0);
                 }
 
                 for (int i = 1; i <= _tmpCount; i++)
                 {
                     _tmpPos =  Vector3.Scale(Random.insideUnitSphere, new Vector3(_scaledStartRadius, _scaledStartRadius, _scaledStartRadius)); 
                     _tmpPos = _thisPos + _tmpPos;
                                     
                     _tmpDir = Vector3.Scale(Random.insideUnitSphere, new Vector3(velocity.x, velocity.y, velocity.z)); 
                     _tmpDir.y = (_tmpDir.y + (2 * (Mathf.Abs(_tmpDir.y) * upwardsBias)));
                     
                     if (randomRotation == true)
                     {
                         _randomizedRotation = Random.Range(-1f,1f);
                         _tmpAngularVelocity = Random.Range(-1f,1f) * angularVelocity;
                         
                     }
                     else
                     {
                         _randomizedRotation = 0f;
                         _tmpAngularVelocity = angularVelocity;
                     }
                     
                     _tmpDir = Vector3.Scale(_tmpDir, new Vector3(size, size, size));
                     
                      _tmpParticleSize = size * (particleSize + (Random.value * sizeVariation));
                     
                     _tmpDuration = _scaledDuration + (Random.value * _scaledDurationVariation);
                     _particleEmitter.Emit(_tmpPos, _tmpDir, _tmpParticleSize, _tmpDuration, color, _randomizedRotation, _tmpAngularVelocity);
                 }
                     
                 _emitTime = Time.time;
                 _delayedExplosionStarted = false;
                 _explodeDelay = 0f;
             }
             else
             {
                 //tell update to start reducing the start delay and call explode again when it's zero
                 _delayedExplosionStarted = true;
             }
         }
     }
 
 }
 




Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image doublemax · Jan 10, 2017 at 11:30 AM 1
Share

EllipsoidParticleEmitter is an obsolete class from Unity 3.5 and not available in newer versions. (A search in the Unity manual would have told you the same)

avatar image issmail doublemax · Jan 10, 2017 at 11:53 AM 0
Share

thanks for your comment i using 4.7 and the developer tell the project work in 4.x and higher what i need to do

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by issmail · Jan 11, 2017 at 11:01 PM

what happened here please i need a help

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

88 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

I cant build WebGL 3 Answers

Building error with the asset Hexplanet Pro 0 Answers

Build error,How do you prevent this errorwhen you build? 0 Answers

I can't build and run. 0 Answers

GameObject not being detected, even though its there............ 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges