Skip to content

Unity Package: Quickly set up object tags without using the standard Unity tag system.

License

Notifications You must be signed in to change notification settings

Jason-Skillman/Scriptable-Tags

Repository files navigation

Scriptable-Tags

Quickly set up object tags without using the standard Unity tag system.

How to install

This package can be installed through the Unity Package Manager with Unity version 2019.3 or greater.

Open up the package manager Window/Package Manager and click on Add package from git URL....

unity_package_manager_git_drop_down

Paste in this repository's url.

https://github.com/Jason-Skillman/Scriptable-Tags.git

unity_package_manager_git_with_url

Click Add and the package will be installed in your project.


NOTE: For Unity version 2019.2 or lower

If you are using Unity 2019.2 or lower than you will not be able to install the package with the above method. Here are a few other ways to install the package.

  1. You can clone this git repository into your project's Packages folder.
  2. Another alternative would be to download this package from GitHub as a zip file. Unzip and in the Package Manager click on Add package from disk... and select the package's root folder.

Git submodule

Alternatively you can also install this package as a git submodule.

$ git submodule add https://github.com/Jason-Skillman/Scriptable-Tags.git Packages/Scriptable-Tags

How to use

  1. Add the Tag Component to the object you want to tag.
  2. To create a new Tag scritable object, right click in the project window and navigate to Create/Scriptable Tags/Tag.
  3. Give the tag a name in the inspector.
  4. Add the new tag to the tag component.
  5. To check if an object has a tag you can use the ContainsTag() function.
public Tag tag;

...

if(gameObject.ContainsTag(tag)) { }

About

Unity Package: Quickly set up object tags without using the standard Unity tag system.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages