private void ApplayParams(RopeGenerator tmpRope)
 {
     tmpRope.Radius            = _radius;
     tmpRope.Length            = _length;
     tmpRope.MassOfBone        = _massOfBone;
     tmpRope.BoneCount         = _boneCount;
     tmpRope.JointAngleLimit   = _jointAngleLimit;
     tmpRope.RestrictFirstBone = _restrictFirstBone;
 }
        void LoadDefaultValues()
        {
            var tmpRope = new RopeGenerator(null, null, null);

            _radius            = tmpRope.Radius;
            _length            = tmpRope.Length;
            _massOfBone        = tmpRope.MassOfBone;
            _boneCount         = tmpRope.BoneCount;
            _jointAngleLimit   = tmpRope.JointAngleLimit;
            _restrictFirstBone = tmpRope.RestrictFirstBone;

            _meshGeneratorType = MeshGeneratorType.Cylinder;
        }
        private void MakeRope()
        {
            if (_meshGenerator == null)
            {
                Debug.LogError("MeshGenerator is not specified");
                return;
            }

            var go = new GameObject("New Rope (" + (++_genCounter).ToString() + ")");

            go.transform.localPosition = new Vector3(0, 0, 0);

            if (_parrent != null)
            {
                go.transform.parent = _parrent.transform;
            }

            var tmpRope = new RopeGenerator(_meshGenerator, _material, go);

            ApplayParams(tmpRope);
            tmpRope.MakeOne();
        }