Current location - Education and Training Encyclopedia - Graduation thesis - Unity3D making small land
Unity3D making small land
In this mode, the speed of making small maps is quite fast. You just need to import the NGUI plug-in, render the whole scene into a map, and make the map into an atlas of NGUI (the above is purely NGUI operation, please search for it yourself if you don't understand ~ I'm lazy). Next is the point ~

Firstly, a small map panel is established in 2DUI of NGUI, and cutting is started in the UIPanel, whether it is hard cutting or soft cutting, as long as it can be cut.

This is the panel setting of my little map. You can study the specific settings yourself.

Then create a sprite in this panel, which is your scene map, and match the ZY scaled by the sprite with the XZ length of the scene (this is the lazy point, and the XY scaled by the sprite will be as big as your scene).

The next step is to put something in the center of your panel as a positioning character, slowly start debugging and aligning, and adjust the position of the character in the game and the position of the minimap accordingly.

Finally ~ ~ code part

What really deals with map movement is that 17 and 18 are all located.

Drag this code to your sprite map, and then drag your character to the player properties, and you can see a cool little map.

Scene projection minimap:

This way is in the official demo of Unity3D? Training camp is in place. When running this demonstration, we can see a small circular map radar in the upper left corner. This small map also needs a rendered scene map as a map, and then needs a patch with a round hole (in fact, the shape of the hole is decided by yourself, and whatever shape you like). This patch requires a transparent Alpha_Cancel shader shader shader ball, and the map is also a map map. Then you need a camera to look at this map. The camera and the character are kept in the same XZ coordinate (write a simple script of synchronous position), and the hole patch is always kept in the same position of the camera, so that you can see the movement of the thumbnail after running. If you need something with directions in BootCamp, just create a transparent channel patch and bring your favorite style pointer map. Since this scheme has an official DEMO, I won't say much ~ just learn by yourself. You can search and edit @ cheng = hui = yi = record = zhi = unity3d. I hope it will help your problem.