public void DisableGizmo() { GroundSceneCallbacks.AddPreDrawLoopCall(() => { imgui_impl.Disable(); }); }
public void EnableGizmo(UtinniCore.Utinni.Object target) { GroundSceneCallbacks.AddPreDrawLoopCall(() => { imgui_impl.Enable(target); }); }
public void OnPositionChanged() { GroundSceneCallbacks.AddPreDrawLoopCall(() => { var obj = Game.PlayerLookAtTargetObject; if (obj != null) { WorldSnapshotReaderWriter.Node node = WorldSnapshotReaderWriter.Get().GetNodeById((int)obj.NetworkId, obj.ParentObject); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new WorldSnapshotNodePositionChangedCommand(node, node.Transform, obj.Transform))); node.Transform.Position = obj.Transform.Position; } } }); }