Posts: 133
Thanks: 1494 in 13 Posts
10 Achievements
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.