Utility - GeoPlayerRu/PixPhys-Unofficial-Wiki GitHub Wiki

Utility has functions that used for utility things.
GetAllChildrens(Transform trans) is used for getting all children of object. Returns list of objects.
trans - your object
FixColliders(this GameObject obj) is used for fixing collisions of object. (Automaticly creates new collider for object) obj is self by default
GetTopObject is used for getting object on top of specific position. Has two overloads:
GetTopObject(Vector2 pos, LayerMask layer)
GetTopObject(Vector2 pos)
pos - position in Vector2
layer - layer
GetMainObject(Transform target) is used for getting root object, I think.
target - your target object SetLayer(this GameObject obj, int layer) is used for setting object on different layer.
obj is self by default
layer - layer
AddConnection(GameObject obj, string ConnectionName, Vector3 localPos, ConnectionType type, ConnectionDataType dataType, int MaxConnections = 128, float MaxDistance = 15f)
obj - object, where connection will be create ConnectionName - name of your connection localPos - position related to obj type - See Connection System
dataType - See Connection System
MaxConnections - max count of connections per object
MaxDistance - max distance before connection will break
It is very useful when you create mechanic parts.
GetFirstValidContact(ContactPoint2D[] buffer, int count)
buffer - idk
count - idk
CalculateBreakForce(AnchoredJoint2D joint, float Strength, float referenceMass = 5f, float massInfluence = 1f) is used for tools.
joint - anchored joint
strength - strenght of joint
referenceMass - idk
massInfluence - idk