Centrix14 / usr

Unity Simple Radar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usr - Unity Simple Radar

this is a simple radar module for unity

Using it is very simple:

  1. Add it to your project
  2. Connect it to the "main" object
  3. All objects that should interact with the radar should be named as follows:
groupN

here group, is a some prefix, N, number of the object. For example you can have such a scene tree:

...
hero
enemy1
enemy2
enemy3
enemy4
...
  1. Select radar settings using the function:
public void USRoptions(GameObject main, Color opt_color, float opt_range, float opt_scale, float opt_panel_x, float opt_panel_y, float opt_panel_z, float opt_point_size)

I know there are a lot of arguments, but let's get down to business

  • main - Main object
  • opt_color - Color of points on the radar
  • opt_range - The range of the radar
  • opt_scale - Radar image zoom
  • opt_panel_x / opt_panel_y / opt_panel_z - Coordinates of the radar panel
  • opt_point_size - Size of a point on the radar
  1. Use the following code to launch the radar:
// Find all the objects of the group since before group_start group_end
CrawlGroup("group_name", group_start, group_end);

// To display the radar
DisplayVisibleGO();

That's all!

18.12.2020 by Centrix14

About

Unity Simple Radar

License:GNU General Public License v3.0


Languages

Language:C# 100.0%