'Ambiguous name when using three_d and egui

recently I am using three_d this crate in my project, but when I use three_d and egui in the same script it causes an ambiguous name error

use three_d::*;
use egui::*;

error

--> src/lib.rs:6:5
  |
6 | use egui::*;
  |     ^^^^ ambiguous name
  |
  = note: ambiguous because of multiple potential import sources
  = note: `egui` could refer to a crate passed with `--extern`
  = help: use `::egui` to refer to this crate unambiguously

I would like to use egui this crate because I want to add image to TopBottomPanel, like below


  camera_visualizer
                .update(&mut frame_input, |gui_context| {
                    use three_d::egui::*;                  

                    TopBottomPanel::top("test panel").show(gui_context, |ui| {
                        ui.label("Hello World!");
                        ui.add(egui::Image::new(texture_id, size)) # <--this line
                    });
                })
                .unwrap();

any idea how to made this code work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source