Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 10th Oct 2014 at 7:57 PM
Default How to remove GameObject?
Hi.
How to remove GameObject?
For example, GameObject was spawned with
Code:
 ResourceKey rk = new ResourceKey();
            rk = ResourceKey.Parse("0x319E4F1D-0x58000000-0x000000000098D11C");
            GameObject gmStatic = GlobalFunctions.CreateObject(rk, this.Actor.Position, 0, this.Actor.Position) as GameObject;

And I want remove this object.
I have try code like
Code:
 gmStatic.RemoveFromWorld();
            
            gmStatic.SetHiddenFlags(HiddenFlags.Everything);
            gmStatic.SetOpacity(0f, 0f);

but the object is not deleted and it remains in place.
Back to top