/// <summary> /// Add object to physics simulation /// </summary> void OnEnable() { if (inList == false) { UCPhysics.AddPhysicsObject(this); inList = true; } }
/// <summary> /// Add to physics simulation and update bounds /// </summary> void Start() // run this and also onEnable cause sometimes on enable isnt called. { UpdateBounds(center, size); if (!inList) { UCPhysics.AddPhysicsObject(this); inList = true; } }