https://github.com/endarren/criteriadata
A base scriptable object that can be used to see if an object mets certain criteria in Unity.
https://github.com/endarren/criteriadata
unity
Last synced: over 1 year ago
JSON representation
A base scriptable object that can be used to see if an object mets certain criteria in Unity.
- Host: GitHub
- URL: https://github.com/endarren/criteriadata
- Owner: Endarren
- License: apache-2.0
- Created: 2019-02-13T13:44:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T05:33:50.000Z (over 6 years ago)
- Last Synced: 2025-03-17T05:34:17.661Z (over 1 year ago)
- Topics: unity
- Language: C#
- Homepage:
- Size: 42 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CriteriaData
A base scriptable object that can be used to see if an object mets certain criteria in Unity3D.
# How to Create
Right-click in the Project Tab. In the pop up, go to Create -> Endar Scripts -> Criteria and pick the one you want to use.
# How to Use
CriteriaDataBase has a method called MetsCriteria. Send the object you want checked as a parameter into this method. The method will return true if the object mets the specified criteria.
# Included Criteria
* CriteriaData - Checks if a GameObject has a certain tag and/or is on a layer.
* RigidbodyCriteriaData - Checks a GameObject to see if its RigidBody has velocity, angular velocity, mass, gravity, and/or kinematic settings matching the required settings.
* CompoundCriteria - Checks if an object mets a minimum number of other CriteriaData.
# Extendable
You can make your own CriteriaData scripts by inheriting from CriteriaDataBase.