• 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 /
avatar image
0
Question by sedapp · Jun 10, 2018 at 10:24 PM · unity 5particlesparticlesystemcs0246

error CS0246: The type or namespace name `Particle' could not be found.

Im getting an error saying: Assets/Scripts/Effects/FX_Maker/IGSoft_Resources/Scripts/NcEffect/NcParticleSystem.cs(562,12): error CS0246: The type or namespace name `Particle' could not be found.

The script I have is this:

 void LegacySetRuntimeParticleScale(bool bScale)
 {
     if (m_bLegacyRuntimeScale == false)
         return;

     if (m_pe != null)
     {
         Particle[] parts = m_pe.Particles;
         m_pe.Particles = LegacyScaleParticle(parts, bScale, true);
     }
 }

 public Particle[] LegacyScaleParticle(Particle[] parts, bool bScale, bool bPosUpdate)
 {
     float fScale;

     if (bScale)
          fScale = NcTransformTool.GetTransformScaleMeanValue(transform);
     else fScale = 1 / NcTransformTool.GetTransformScaleMeanValue(transform);

     for (int n = 0; n < parts.Length; n++)
     {
          if (IsMeshParticleEmitter() == false)
         {
             if (m_bWorldSpace)
             {
                 if (bPosUpdate)
                 {
                     Vector3 move =  (m_OldPos - transform.position);
                     if (bScale)
                         parts[n].position -= move * (1 - 1/fScale);
                 }
                 parts[n].position -= transform.position;
                 parts[n].position *= fScale;
                 parts[n].position += transform.position;
             } else {
                  parts[n].position *= fScale;
             }
         }
         parts[n].angularVelocity *= fScale;
         parts[n].velocity *= fScale;
         parts[n].size *= fScale;
     }
     return parts;
 }

Comment
Add comment · Show 6
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 Hellium · Jun 11, 2018 at 05:58 AM 0
Share

Which version of Unity are you using?

If I'm not wrong, the legacy Particle system has been completely removed In Unity 2018

avatar image sedapp Hellium · Jun 11, 2018 at 11:21 PM 0
Share

Im using the last version of unity 2018.1.3

avatar image Hellium · Jun 11, 2018 at 12:09 PM 0
Share

Do you have using UnityEngine.ParticleSystem$$anonymous$$odule; at the top of your script?

avatar image sedapp Hellium · Jun 11, 2018 at 11:35 PM 0
Share

NN, using UnityEngine; using System.Reflection;

avatar image Hellium sedapp · Jun 12, 2018 at 05:58 AM 0
Share

Then, try to add this namespace ;-)

avatar image NicoleGrieder · May 31, 2019 at 10:38 PM 0
Share

unity compiler says: 'ParticleSystem$$anonymous$$odule' does not exist in the namespace 'UnityEngine'

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by richardkettlewell · Jun 11, 2018 at 06:23 AM

As Hellium suggests, most likely you are using the Legacy Particle System in 2018.1, but it’s script API has been totally removed in that version.

In 2018.3, the legacy particle system is entirely gone. You may use our updater to update your assets: https://forum.unity.com/threads/release-legacy-particle-system-updater.510879/

Comment
Add comment · Show 3 · 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
avatar image sedapp · Jun 11, 2018 at 11:53 AM 0
Share

Yes, I tried this before and still the same problem. the line public Particle[] LegacyScaleParticle(Particle[] parts, bool bScale, bool bPosUpdate) here where the problem exist.

avatar image richardkettlewell ♦♦ · Jun 11, 2018 at 07:06 PM 0
Share

The updater doesn’t update scripts at the moment but we are working on making this easier. For now you need to do it manually.

avatar image issamoshi · Mar 30, 2019 at 08:50 PM 0
Share

How do i use this updater please?

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

178 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 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 avatar image avatar image

Related Questions

Customising Particle Effects for exploding rocks?? 1 Answer

Spawning Particle Systems for Gun Sparks 1 Answer

How to prevent particle system from restarting when value changes from script? 1 Answer

Particles follow particle emitter 0 Answers

shuirken particle system and colliders2d 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