how to set buoyancy effector 2d in a sprite sape in unity code example
Example: unity buoncy changing
void Start()
{
StartCoroutine("coRoutineTest", 1f);
}
IEnumerator coRoutineTest (float waitTIme)
{
while (true)
{
buoyancy.surfaceLevel = Random.Range(4f, 2f);
yield return new WaitForSeconds(waitTIme);
}
}