Преглед изворни кода

Destroy gravity control dragpoint properly

habeebweeb пре 4 година
родитељ
комит
e986279d3d

+ 0 - 5
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/DragPoint/DragPointOther.cs

@@ -71,10 +71,5 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
     internal class DragPointGravity : DragPointGeneral
     {
         protected override void ApplyDragType() => ApplyProperties(Moving, Moving, false);
-        protected override void OnDestroy()
-        {
-            GameObject.Destroy(MyGameObject);
-            base.OnDestroy();
-        }
     }
 }

+ 2 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/Meido.cs

@@ -219,6 +219,8 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
             DestroyGravityControl(ref hairGravityControl);
             DestroyGravityControl(ref skirtGravityControl);
+            GameObject.Destroy(hairGravityDragPoint?.gameObject);
+            GameObject.Destroy(skirtGravityDragPoint?.gameObject);
 
             Maid.SetPos(Vector3.zero);
             Maid.SetRot(Vector3.zero);