본문 바로가기
핵심만 간단하게/유니티 관련

유니티 파티클 재생 Play() 안 될 때

by 지네입니다 2022. 5. 8.

■문제

특정 상황에서 오브젝트에 달려있는 파티클을 재생하려는데 파티클.Play()로 재생이 안 됨

 

■원인

모르겠다...나의 짧은 지식으론 알 수가 없었다고 한다.

 

■해결

if(!파티클.isPlaying)로 상태 체크를 해야 파티클.Play()가 정상적으로 작동했다. 이유는...모르겠다...

Public ParticleSystem particle;

if(!particle.isPlaying) // 재생할 때
	particle.Play();
    
if(particle.isPlaying) // 정지할 때
	particle.Stop();

 

■참고

https://answers.unity.com/questions/513517/particlesystemplay-does-not-play-particle.html

 

ParticleSystem.Play() does not play particle. - Unity Answers

 

answers.unity.com

300x250

댓글