protected virtual void Start() { // Check for existing Rigidbody2D or Rigidbody rigid2d = GetComponent <Rigidbody2D>(); rigid = GetComponent <Rigidbody>(); // Create Rigidbody2D if no Rigidbody2D or Rigidbody exists if (rigid2d == null && rigid == null) { rigid2d = SaFrMo.GetOrCreate <Rigidbody2D>(gameObject); } }
protected virtual void Start() { rigid = SaFrMo.GetOrCreate <Rigidbody> (gameObject); }