파티클 시스템은 Unity의 C# 잡 시스템을 사용하여 파티클에 커스텀 동작을 적용합니다.
Unity는 C# 잡 시스템의 작업을 워커 스레드에 배포하며, 버스트 컴파일러를 이용합니다. GetParticles() 및 SetParticles() 메서드는 동일한 기능을 제공하지만, 메인 스레드에서 실행되고 Unity의 버스트 컴파일러를 사용하지 않습니다.
기본적으로 파티클 시스템 잡은 해당 파티클 시스템에 속한 하나 이상의 파티클에만 액세스할 수 있습니다.Unity는 ParticleSystemJobData 구조체를 사용하여 이 데이터를 잡에 전달합니다.잡에 필요한 모든 다른 데이터를 추가 파라미터로 전달해야 합니다.
파티클 데이터에 액세스할 수 있도록 Unity는 다음의 잡 타입을 지원합니다.
이 잡 타입은 단일 워커 스레드에서 단일 잡을 실행합니다. 이 잡은 파티클 시스템에 속하는 모든 파티클에 액세스합니다. 이 잡 타입에 관한 예제 코드는 IJobParticleSystem.Execute() 스크립팅 레퍼런스를 참조하십시오.
이 잡 타입은 다수의 워커 스레드에서 다수의 잡을 실행합니다. 각각의 잡은 해당 잡의 Execute() 함수로 지정된 인덱스에서 파티클에 액세스만 할 수 있습니다. 이 잡 타입에 대한 예시 코드는 IJobParticleSystemParallelFor.Execute() 스크립팅 레퍼런스를 참조하십시오.
이 잡 타입은 다수의 워커 스레드에서 다수의 잡을 실행합니다. 각각의 잡은 해당 잡의 Execute() 함수로 지정된 범위 안에 있는 파티클에 액세스만 할 수 있습니다. 이 잡 타입에 대한 예시 코드는 IJobParticleSystemParallelForBatch.Execute() 스크립팅 레퍼런스를 참조하십시오.
다른 C# 잡과 마찬가지로 버스트 컴파일러를 사용하여 파티클 잡을 고도로 최적화된 버스트 잡으로 컴파일할 수 있습니다. 자세한 내용은 버스트 컴파일러 문서를 참조하십시오.
Unity 2019.3의 새로운 기능
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.