You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evdokimov Maksim edited this page Jul 20, 2021
·
12 revisions
NOTE THAT ALL THEESE FUNCTIONS CAN BE CALLED ONLY IF YOU USE Utility!
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
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.