Every collection in Smart Library has a list of rules in its settings. Rules allow you define conditions that an asset must meet to be added to the Collection.
There are multiple types of rules, each one used to check a different aspect of an asset. Custom rules can also be added for your own project’s needs.


Evaluation

Each rule has an Operand, which can be AND (&&), AND NOT (&& !), OR (||), OR NOT (|| !). These determine how the result of the rule will be evaluated with the results of the rest of the rules. AND operands have a higher precedence than OR operands and will be evaluated first.

Rules in the Inspector can be read from left to right.

If the asset’s Type is GameObject,
AND the asset’s Name Contains ‘river'” then allow in to the collection.


Scope

There are times when you may want the result of several rules together to be evaluated with the rest of the rules, for this there are scopes.

All of the rules in the scope are evaluated separately from the rest of the rules, the result of the scope is then used by the rest of the rules. They are the equivalent of using parentheses’ around a logical operation in C#.

Using menu to the right of each rule you can add it to the same scope as the rule above or below it, creating a new scope it is not already in one.

An example use of a scope is if you only want to allow an asset that is one of several types to be in the collection, along with having other rules.

Go to Top