How to collapse.

1.	Create Cube, this will be a ground cube which will be used for collision.

2.	Set its name to "Ground", position to [0 ,0, 0] and scale to [15, 1, 10]

3.	Create Cylinder. 

4.	Set its position to [0, 8.5, 0] and scale to [2, 8, 2]

5.	Add RayFire Shatter to the Cylinder object, in Voronoi properties set Amount to 500 and click the Fragment button. New object Cylinder_root will be created.

6.	Destroy or Deactivate Cylinder object, we won’t need it anymore.

7.	Select Cylinder_root  object and set its name to "Pillar".

8.	Add RayFire Rigid to the Pillar object and set Initialization to At Start.

9.	Set Simulation type to Inactive. 

10.	Set Object type to Mesh Root.

11.	In Activation properties set Offset property to 0.2 and enable Connectivity property.

12.	Add RayFire Connectivity component to Pillar object.

13.	In the Connectivity component set Connectivity Type to By Triangles. Such connectivty type should be set only for fragments which share the same faces and stay close to each other.

14.	Add RayFire Unyielding component to Pillar object. It is very important to define Unyielding fragments.

15.	In the RayFire Unyielding component set Center to [0,-8,0] and Size to [3,1,3] to overlap fragments at the bottom of Pillar.

16.	In Scene view set Shading mode to Shaded.

17.	In Scene view set Shading mode to Shaded and disable Selection Wire in Gizmos. These two steps are not critical to do but it is just easier to see all details during collapse with such setup.

18.	Start Play Mode. 

19.	In the RayFire Connectivity component start very slowly drag By Area slider in Collapse section on top of component UI.

	You should notice that while you move the slider Connectivity structure starts to lose green connections. Every time it loses connection it makes a connectivity check and activates all fragments which have no any connection anymore or not connected to at least one Unyielding fragment at the bottom of the Pillar.
	Keep in mind that after the fragment activates By Collapse it starts to fall down and push other Inactive fragments which at some point also activate because of By Offset activation and start to push other Inactive objects. So, in some cases it is enough just to initiate a starting collapse which will continue on it’s own after some time.
	In order to initiate collapse in your code you can use public static method in RFCollapse class:

RFCollapse.AreaCollapse (RayfireConnectivity connectivity, float areaValue)
RFCollapse.AreaCollapse (RayfireConnectivity connectivity, int areaPercentage)
RFCollapse.SizeCollapse (RayfireConnectivity connectivity, float sizeValue)
RFCollapse.SizeCollapse (RayfireConnectivity connectivity, int sizePercentage)
RFCollapse.RandomCollapse (RayfireConnectivity connectivity, int randomPercentage, int seedValue)

For instance, 
	RFCollapse.SizeCollapse (RayfireConnectivity connectivity, float sizeValue) method will activate all shards with bounding box size less than sizeValue. 
	RFCollapse.SizeCollapse (RayfireConnectivity connectivity, int sizePercentage) method instead of float value takes integer value as input, in this case input value 20 means than 20 percent of the smallest fragment will be activated. If nex time you will input value 30 then another 10 percents of te smalles fragments will be activated.
	AreaCollapse methods works in the same way, except that this method destroys connections, so fragment will be activated only if it has no any connections with other fragments.
	RandomCollapse takes only integer value as input and activates random percentage of fragments depends on input seed value, so you can get the same random activations every time which may be useful for coop games.

20.	Turn Off play Mode.

21.	In the Connectivity component set Collapse Initiate property to By Method.

22.	Open Collapse properties and set Type to By Area. 

23.	Set Start property to 0 and End property to 15.

24.	Set Steps property to 25.

25.	Set Duration property to 25.

	When you initialize Connectivity and establish all connections among fragments and cache shared area among every fragment. When you initiate Area Collapse you need to input float or integer value. In case you input float value then Connectivity removes all connections among fragments with shared area less than input value.
	In case you input integer value then it is used as a percentage relative to the whole shared area range starting from the smallest area to the biggest area. 
	Right now the current setup means that you are going to remove 15% of all connections starting from the smallest and AreaCollapse will be initiated 25 times during 25 seconds

26.	Start Play Mode.

27.	In the Connectivity component click on Start Collapse button.

	Notice that every second structure loses green connections and some fragments activate. Also it is possible to Start Collapse by Collapse properties using public static method:
RFCollapse.StartCollapse(RayfireConnectivity connectivity)

	Another way to start collapse is to set Start Collapse property to At Start. In this case Collapse will start immediately when the object will be initialized. 

	And finally you can Start Collapse By Integrity. When the Connectivity structure is initialized it starts with 100% Integrity readonly property. You can see current Integrity on top of the Connectivity component. Every time a connected structure loses fragments Integrity gets lower. Setting Start Collapse property to By Integrity you can initiate collapse when your structure Integrity will become lower than defined Collapse By Integrity property value.