示例#1
0
        private void ensureTransformDoesNotExist(AttachmentPointFlags singlePoint)
        {
            if (!singlePoint.IsSinglePoint())
            {
                Debug.LogError("Tried to ensure transform exists for singlePoint, but it contains more than one set flag");
                return;
            }

            var pointBehaviour = GetBehaviourForPoint(singlePoint);

            if (pointBehaviour != null)
            {
                InternalUtility.Destroy(pointBehaviour.gameObject);
                setBehaviourForPoint(singlePoint, null);

                pointBehaviour = null;

                _attachmentPointsDirty = true;

        #if UNITY_EDITOR
                EditorUtility.SetDirty(this);
        #endif
            }
        }