10-06-2019, 08:32 AM
(This post was last modified: 10-06-2019, 08:33 AM by josemendez.)
Hi,
Well, a marquee tool is inherently a UI tool. I still don't get what you want to achieve.
Anyway, to create a marquee selection tool, project the particle positions to screen space, then compare their screen space positions to the rect coordinates to see which are inside of it. See:
https://docs.unity3d.com/ScriptReference...Point.html
Quote:I asked about marquee tool before, but I want to choose particles by only script not using UI.
Well, a marquee tool is inherently a UI tool. I still don't get what you want to achieve.
Anyway, to create a marquee selection tool, project the particle positions to screen space, then compare their screen space positions to the rect coordinates to see which are inside of it. See:
https://docs.unity3d.com/ScriptReference...Point.html