File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
UnityClient/Packages/vbl.urchin/Scripts/Managers Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,20 @@ def delete(self):
5353 """
5454 client .sio .emit ('urchin-probe-delete' , IDData (id = self .data .id ).to_json_string ())
5555 self .in_unity = False
56+
57+ def __del__ (self ):
58+ """Delete probe objects when object is deleted
59+
60+ Parameters
61+ ----------
62+ references probe being deleted
63+
64+ Examples
65+ --------
66+ >>> del p1
67+ """
68+ if self .in_unity :
69+ self .delete ()
5670
5771 def set_color (self ,color ):
5872 """Set colors of probe objects
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public void Delete(IDData data)
117117 {
118118 if ( _probes . ContainsKey ( data . ID ) )
119119 {
120- Destroy ( _probes [ data . ID ] ) ;
120+ Destroy ( _probes [ data . ID ] . gameObject ) ;
121121 _probes . Remove ( data . ID ) ;
122122 }
123123 }
You can’t perform that action at this time.
0 commit comments