Getting Started
Last updated
Last updated
Download the Collector System package from the Unity Asset Store.
Import the package into your Unity project.
Create a Collet item prefab. This collect item prefab will be instantiated as a child of Canvas so it should have RectTransform. For the visual, you can have Image or anything which can be rendered in Canvas.
Create a GSUICollectorCaller ScriptableObject. Right click in the Project tab and select Create -> GameShell -> UI -> Effect -> Collector -> GSUICollectorCaller
Create a Collector with Target: It should be a child of main canvas(normally located in Game UI's resource area). Add the GSUICollector component to it.
Setup the Collector:
Assign prefab you made from #1 to GSUICollector component.
Assign GSUICollectorCaller ScriptableObject to GSUICollector component. Multiple caller can be assigned.
Collector component automatically find Container(for instantiate prefab), Target(for collect item's destination) and Canvas(the main canvas) so you do can leave them empty but you can also assign manually here if it is needed.
You can also set size of the object pool for prefab
Configure GSUICollectorCaller ScriptableObject. - Total Amount: amount of prefabs need to be instantiated - interval: how many times collected within total amount, basically divide total amount with this value - Interval Time: time(sec) between intervals - Is Follow: should follow target if it changes position during collecting animaiton? - Source: Starting point. Can be Canvas object, World Canvas object, World object. You can leave this empty if you pass it from code. - Movement Duration: animation time from source position to target position. - Easing curve: animation following curve(x axis: time, y axis:position(0-source target)