- Home /
Question by
KiraELL · Feb 04, 2019 at 04:07 AM ·
c#particlesystemparticleemitter
NcParticleSystem.cs(562,40): error CS0246: The type or namespace name 'Particle' could not be found
After Updating my project to 2018.3 got this error.
error CS0246: The type or namespace name 'Particle' could not be found
The type or namespace name 'ParticleEmitter' could not be found
The type or namespace name 'ParticleAnimator' could not be found
The type or namespace name 'ParticleRenderer' could not be found
I tried this https://forum.unity.com/threads/release-legacy-particle-system-updater.510879/ , but cannot fix.
Here's the code im getting error:
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;
}
protected ParticleSystem m_ps;
protected ParticleEmitter m_pe;
protected ParticleAnimator m_pa;
protected ParticleRenderer m_pr;
Comment